Coverage Report

Created: 2025-11-16 07:15

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cryptofuzz-normal-math/executor.cpp
Line
Count
Source
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
130k
#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
879
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
879
    (void)module;
53
879
    (void)op;
54
55
879
    if ( result.second != std::nullopt ) {
56
598
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
598
    }
58
879
}
59
60
879
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
879
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
879
    return module->OpDigest(op);
64
879
}
65
66
/* Specialization for operation::HMAC */
67
814
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
814
    (void)module;
69
814
    (void)op;
70
71
814
    if ( result.second != std::nullopt ) {
72
367
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
367
    }
74
814
}
75
76
814
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
814
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
814
    return module->OpHMAC(op);
80
814
}
81
82
/* Specialization for operation::UMAC */
83
158
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
158
    (void)module;
85
158
    (void)op;
86
87
158
    if ( result.second != std::nullopt ) {
88
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
0
    }
90
158
}
91
92
158
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
158
    return module->OpUMAC(op);
94
158
}
95
96
/* Specialization for operation::CMAC */
97
715
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
715
    (void)module;
99
715
    (void)op;
100
101
715
    if ( result.second != std::nullopt ) {
102
264
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
264
    }
104
715
}
105
106
715
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
715
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
715
    return module->OpCMAC(op);
110
715
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
2.68k
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
2.68k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
2.68k
    if ( result.second != std::nullopt ) {
119
1.36k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
1.36k
        if ( result.second->tag != std::nullopt ) {
121
227
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
227
        }
123
1.36k
    }
124
125
2.68k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
1.33k
        using fuzzing::datasource::ID;
127
128
1.33k
        bool tryDecrypt = true;
129
130
1.33k
        if ( module->ID == CF_MODULE("OpenSSL") ) {
131
0
            switch ( op.cipher.cipherType.Get() ) {
132
0
                case    ID("Cryptofuzz/Cipher/AES_128_OCB"):
133
0
                case    ID("Cryptofuzz/Cipher/AES_256_OCB"):
134
0
                    tryDecrypt = false;
135
0
                    break;
136
0
                case    ID("Cryptofuzz/Cipher/AES_128_GCM"):
137
0
                case    ID("Cryptofuzz/Cipher/AES_192_GCM"):
138
0
                case    ID("Cryptofuzz/Cipher/AES_256_GCM"):
139
0
                case    ID("Cryptofuzz/Cipher/AES_128_CCM"):
140
0
                case    ID("Cryptofuzz/Cipher/AES_192_CCM"):
141
0
                case    ID("Cryptofuzz/Cipher/AES_256_CCM"):
142
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_CCM"):
143
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_CCM"):
144
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_CCM"):
145
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_GCM"):
146
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_GCM"):
147
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_GCM"):
148
0
                    if ( op.tagSize == std::nullopt ) {
149
                        /* OpenSSL fails to decrypt its own CCM and GCM ciphertexts if
150
                         * a tag is not included
151
                         */
152
0
                        tryDecrypt = false;
153
0
                    }
154
0
                    break;
155
0
            }
156
0
        }
157
158
1.33k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
1.33k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
1.33k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
1.33k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
1.33k
                    op.cleartext.GetSize() + 32,
171
172
1.33k
                    op.aad,
173
174
                    /* Empty modifier */
175
1.33k
                    {});
176
177
1.33k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
1.33k
            if ( cleartext == std::nullopt ) {
180
                /* Decryption failed, OpSymmetricDecrypt() returned std::nullopt */
181
0
                printf("Cannot decrypt ciphertext\n\n");
182
0
                printf("Operation:\n%s\n", op.ToString().c_str());
183
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
184
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
185
0
                abort(
186
0
                        {module->name},
187
0
                        op.Name(),
188
0
                        op.GetAlgorithmString(),
189
0
                        "cannot decrypt ciphertext"
190
0
                );
191
1.33k
            } else if ( cleartext->Get() != op.cleartext.Get() ) {
192
                /* Decryption ostensibly succeeded, but the cleartext returned by OpSymmetricDecrypt()
193
                 * does not match to original cleartext */
194
195
0
                printf("Cannot decrypt ciphertext (but decryption ostensibly succeeded)\n\n");
196
0
                printf("Operation:\n%s\n", op.ToString().c_str());
197
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
198
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
199
0
                printf("Purported cleartext: %s\n", util::HexDump(cleartext->Get()).c_str());
200
0
                abort(
201
0
                        {module->name},
202
0
                        op.Name(),
203
0
                        op.GetAlgorithmString(),
204
0
                        "cannot decrypt ciphertext"
205
0
                );
206
0
            }
207
1.33k
        }
208
1.33k
    }
209
2.68k
}
210
211
2.68k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
2.68k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
2.68k
    return module->OpSymmetricEncrypt(op);
215
2.68k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
1.14k
template<> void ExecutorBase<component::MAC, operation::SymmetricDecrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op, const ExecutorBase<component::MAC, operation::SymmetricDecrypt>::ResultPair& result) const {
219
1.14k
    (void)module;
220
1.14k
    (void)op;
221
222
1.14k
    if ( result.second != std::nullopt ) {
223
176
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
176
    }
225
1.14k
}
226
227
1.14k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
1.14k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
1.14k
    return module->OpSymmetricDecrypt(op);
231
1.14k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
164
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
164
    (void)module;
236
164
    (void)op;
237
238
164
    if ( result.second != std::nullopt ) {
239
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
0
    }
241
164
}
242
243
164
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
164
    return module->OpKDF_SCRYPT(op);
245
164
}
246
247
/* Specialization for operation::KDF_HKDF */
248
818
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
818
    (void)module;
250
818
    (void)op;
251
252
818
    if ( result.second != std::nullopt ) {
253
344
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
344
    }
255
818
}
256
257
818
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
818
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
818
    return module->OpKDF_HKDF(op);
261
818
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
166
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
166
    (void)module;
266
166
    (void)op;
267
268
166
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
166
}
272
273
166
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
166
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
166
    return module->OpKDF_PBKDF(op);
277
166
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
180
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
180
    (void)module;
282
180
    (void)op;
283
284
180
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
180
}
288
289
180
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
180
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
180
    return module->OpKDF_PBKDF1(op);
293
180
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
552
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
552
    (void)module;
298
552
    (void)op;
299
300
552
    if ( result.second != std::nullopt ) {
301
361
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
361
    }
303
552
}
304
305
552
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
552
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
552
    return module->OpKDF_PBKDF2(op);
309
552
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
28
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
28
    (void)module;
314
28
    (void)op;
315
316
28
    if ( result.second != std::nullopt ) {
317
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
0
    }
319
28
}
320
321
28
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
28
    return module->OpKDF_ARGON2(op);
323
28
}
324
325
/* Specialization for operation::KDF_SSH */
326
149
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
149
    (void)module;
328
149
    (void)op;
329
330
149
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
149
}
334
335
149
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
149
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
149
    return module->OpKDF_SSH(op);
339
149
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
178
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
178
    (void)module;
344
178
    (void)op;
345
346
178
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
178
}
350
351
178
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
178
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
178
    return module->OpKDF_TLS1_PRF(op);
355
178
}
356
357
/* Specialization for operation::KDF_X963 */
358
143
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
143
    (void)module;
360
143
    (void)op;
361
362
143
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
143
}
366
367
143
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
143
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
143
    return module->OpKDF_X963(op);
371
143
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
17
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
17
    (void)module;
376
17
    (void)op;
377
378
17
    if ( result.second != std::nullopt ) {
379
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
0
    }
381
17
}
382
383
17
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
17
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
17
    return module->OpKDF_BCRYPT(op);
387
17
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
202
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
202
    (void)module;
392
202
    (void)op;
393
394
202
    if ( result.second != std::nullopt ) {
395
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
0
    }
397
202
}
398
399
202
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
202
    if ( op.mech.mode == true ) {
401
115
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
115
    }
403
404
202
    return module->OpKDF_SP_800_108(op);
405
202
}
406
407
/* Specialization for operation::KDF_SRTP */
408
192
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
192
    (void)module;
410
192
    (void)op;
411
192
    (void)result;
412
192
}
413
414
192
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
192
    return module->OpKDF_SRTP(op);
416
192
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
148
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
148
    (void)module;
421
148
    (void)op;
422
148
    (void)result;
423
148
}
424
425
148
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
148
    return module->OpKDF_SRTCP(op);
427
148
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
7.00k
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
7.00k
    (void)module;
432
433
7.00k
    if ( result.second != std::nullopt  ) {
434
3.00k
        const auto curveID = op.curveType.Get();
435
3.00k
        const auto privkey = op.priv.ToTrimmedString();
436
3.00k
        const auto pub_x = result.second->first.ToTrimmedString();
437
3.00k
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
3.00k
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
3.00k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
3.00k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
3.00k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
3.00k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
3.00k
    }
446
7.00k
}
447
448
7.00k
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
7.00k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
7.00k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
7.00k
    if ( size == 0 || size > 4096 ) {
454
81
        return std::nullopt;
455
81
    }
456
457
6.92k
    return module->OpECC_PrivateToPublic(op);
458
7.00k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
4.56k
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
4.56k
    (void)module;
463
4.56k
    (void)op;
464
4.56k
    (void)result;
465
4.56k
}
466
467
4.56k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
4.56k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
4.56k
    return module->OpECC_ValidatePubkey(op);
471
4.56k
}
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
2.72k
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
2.72k
    (void)operations;
479
2.72k
    (void)results;
480
2.72k
    (void)data;
481
2.72k
    (void)size;
482
2.72k
}
483
484
6.67k
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
6.67k
    (void)module;
486
487
6.67k
    if ( result.second != std::nullopt  ) {
488
1.90k
        const auto curveID = op.curveType.Get();
489
1.90k
        const auto privkey = result.second->priv.ToTrimmedString();
490
1.90k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
1.90k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
1.90k
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
1.90k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
1.90k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
1.90k
        {
498
1.90k
            auto opValidate = operation::ECC_ValidatePubkey(
499
1.90k
                    op.curveType,
500
1.90k
                    result.second->pub,
501
1.90k
                    op.modifier);
502
503
1.90k
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
1.90k
            CF_ASSERT(
505
1.90k
                    validateResult == std::nullopt ||
506
1.90k
                    *validateResult == true,
507
1.90k
                    "Cannot validate generated public key");
508
1.90k
        }
509
1.90k
    }
510
6.67k
}
511
512
6.67k
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
6.67k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
6.67k
    return module->OpECC_GenerateKeyPair(op);
516
6.67k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
837
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
837
    (void)module;
521
522
837
    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
837
}
565
566
837
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
837
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
837
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
548
    const size_t size = op.priv.ToTrimmedString().size();
571
572
548
    if ( size == 0 || size > 4096 ) {
573
3
        return std::nullopt;
574
3
    }
575
576
545
    return module->OpECCSI_Sign(op);
577
548
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
8.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
8.64k
    (void)module;
582
583
8.64k
    if ( result.second != std::nullopt  ) {
584
4.96k
        const auto curveID = op.curveType.Get();
585
4.96k
        const auto cleartext = op.cleartext.ToHex();
586
4.96k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
4.96k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
4.96k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
4.96k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
4.96k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
4.96k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
4.96k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
4.96k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
4.96k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
4.96k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
4.96k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
4.96k
        {
601
4.96k
            auto opVerify = operation::ECDSA_Verify(
602
4.96k
                    op,
603
4.96k
                    *(result.second),
604
4.96k
                    op.modifier);
605
606
4.96k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
4.96k
            CF_ASSERT(
608
4.96k
                    verifyResult == std::nullopt ||
609
4.96k
                    *verifyResult == true,
610
4.96k
                    "Cannot verify generated signature");
611
4.96k
        }
612
4.96k
    }
613
8.64k
}
614
615
8.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
8.64k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
8.64k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
8.36k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
8.36k
    if ( size == 0 || size > 4096 ) {
622
3
        return std::nullopt;
623
3
    }
624
625
8.36k
    return module->OpECDSA_Sign(op);
626
8.36k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
53
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
53
    (void)module;
631
632
53
    if ( result.second != std::nullopt  ) {
633
0
        const auto curveID = op.curveType.Get();
634
0
        const auto cleartext = op.cleartext.ToHex();
635
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
0
    }
649
53
}
650
651
53
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
53
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
53
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
53
    const size_t size = op.priv.ToTrimmedString().size();
656
657
53
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
53
    return module->OpECGDSA_Sign(op);
662
53
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
57
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
57
    (void)module;
667
668
57
    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
57
}
686
687
57
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
57
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
57
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
57
    const size_t size = op.priv.ToTrimmedString().size();
692
693
57
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
57
    return module->OpECRDSA_Sign(op);
698
57
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
54
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
54
    (void)module;
703
704
54
    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
54
}
722
723
54
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
54
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
54
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
54
    const size_t size = op.priv.ToTrimmedString().size();
728
729
54
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
54
    return module->OpSchnorr_Sign(op);
734
54
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
513
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
513
    (void)module;
739
513
    (void)op;
740
513
    (void)result;
741
513
}
742
743
513
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
513
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
513
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
161
    return module->OpECCSI_Verify(op);
748
513
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
5.65k
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
5.65k
    (void)module;
753
5.65k
    (void)op;
754
5.65k
    (void)result;
755
5.65k
}
756
757
5.65k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
5.65k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
5.65k
    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
5.37k
    return module->OpECDSA_Verify(op);
772
5.65k
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
39
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
39
    (void)module;
777
39
    (void)op;
778
39
    (void)result;
779
39
}
780
781
39
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
39
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
39
    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
39
    return module->OpECGDSA_Verify(op);
796
39
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
45
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
45
    (void)module;
801
45
    (void)op;
802
45
    (void)result;
803
45
}
804
805
45
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
45
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
45
    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
45
    return module->OpECRDSA_Verify(op);
820
45
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
45
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
45
    (void)module;
825
45
    (void)op;
826
45
    (void)result;
827
45
}
828
829
45
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
45
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
45
    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
45
    return module->OpSchnorr_Verify(op);
844
45
}
845
846
49
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
49
    (void)module;
848
49
    (void)op;
849
49
    (void)result;
850
49
}
851
852
49
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
49
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
49
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
49
    return module->OpECDSA_Recover(op);
857
49
}
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
99
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
99
    (void)module;
869
99
    (void)op;
870
99
    (void)result;
871
99
}
872
873
99
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
99
    const std::vector<size_t> sizes = {
875
99
        op.parameters.p.ToTrimmedString().size(),
876
99
        op.parameters.q.ToTrimmedString().size(),
877
99
        op.parameters.g.ToTrimmedString().size(),
878
99
        op.pub.ToTrimmedString().size(),
879
99
        op.signature.first.ToTrimmedString().size(),
880
99
        op.signature.second.ToTrimmedString().size(),
881
99
    };
882
883
584
    for (const auto& size : sizes) {
884
584
        if ( size == 0 || size > 4096 ) {
885
4
            return std::nullopt;
886
4
        }
887
584
    }
888
889
95
    return module->OpDSA_Verify(op);
890
99
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
34
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
34
    (void)operations;
897
34
    (void)results;
898
34
    (void)data;
899
34
    (void)size;
900
34
}
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
78
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
78
    (void)module;
910
78
    (void)op;
911
78
    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
78
}
934
935
78
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
78
    const std::vector<size_t> sizes = {
937
78
        op.parameters.p.ToTrimmedString().size(),
938
78
        op.parameters.q.ToTrimmedString().size(),
939
78
        op.parameters.g.ToTrimmedString().size(),
940
78
        op.priv.ToTrimmedString().size(),
941
78
    };
942
943
303
    for (const auto& size : sizes) {
944
303
        if ( size == 0 || size > 4096 ) {
945
8
            return std::nullopt;
946
8
        }
947
303
    }
948
949
70
    return module->OpDSA_Sign(op);
950
78
}
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
50
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
50
    (void)result;
963
50
    (void)module;
964
50
    (void)op;
965
50
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
50
}
969
970
50
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
50
    return module->OpDSA_PrivateToPublic(op);
972
50
}
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
34
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
34
    (void)operations;
980
34
    (void)results;
981
34
    (void)data;
982
34
    (void)size;
983
34
}
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
80
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
80
    (void)result;
994
80
    (void)module;
995
80
    (void)op;
996
80
    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
80
}
1003
1004
80
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
80
    const std::vector<size_t> sizes = {
1006
80
        op.p.ToTrimmedString().size(),
1007
80
        op.q.ToTrimmedString().size(),
1008
80
        op.g.ToTrimmedString().size(),
1009
80
    };
1010
1011
233
    for (const auto& size : sizes) {
1012
233
        if ( size == 0 || size > 4096 ) {
1013
7
            return std::nullopt;
1014
7
        }
1015
233
    }
1016
1017
73
    return module->OpDSA_GenerateKeyPair(op);
1018
80
}
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
17
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
17
    (void)operations;
1026
17
    (void)results;
1027
17
    (void)data;
1028
17
    (void)size;
1029
17
}
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
45
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
45
    (void)result;
1040
45
    (void)module;
1041
45
    (void)op;
1042
45
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1043
0
        const auto P = result.second->p.ToTrimmedString();
1044
0
        const auto Q = result.second->q.ToTrimmedString();
1045
0
        const auto G = result.second->g.ToTrimmedString();
1046
1047
0
        Pool_DSA_PQG.Set({P, Q, G});
1048
1049
0
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1050
0
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1051
0
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1052
0
    }
1053
45
}
1054
1055
45
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
45
    return module->OpDSA_GenerateParameters(op);
1057
45
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
917
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
917
    (void)module;
1062
917
    (void)op;
1063
917
    (void)result;
1064
917
}
1065
1066
917
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
917
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
917
    return module->OpECDH_Derive(op);
1070
917
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
746
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
746
    (void)operations;
1076
746
    (void)results;
1077
746
    (void)data;
1078
746
    (void)size;
1079
746
}
1080
1.70k
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
1.70k
    (void)module;
1082
1.70k
    (void)op;
1083
1.70k
    (void)result;
1084
1.70k
}
1085
1086
1.70k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
1.70k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
1.70k
    return module->OpECIES_Encrypt(op);
1090
1.70k
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
1.91k
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
1.91k
    (void)module;
1095
1.91k
    (void)op;
1096
1.91k
    (void)result;
1097
1.91k
}
1098
1099
1.91k
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
1.91k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
1.91k
    return module->OpECIES_Decrypt(op);
1103
1.91k
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
2.86k
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
2.86k
    (void)module;
1108
1109
2.86k
    if ( result.second != std::nullopt  ) {
1110
231
        const auto curveID = op.curveType.Get();
1111
231
        const auto x = result.second->first.ToTrimmedString();
1112
231
        const auto y = result.second->second.ToTrimmedString();
1113
1114
231
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
231
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
231
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
231
    }
1119
2.86k
}
1120
1121
2.86k
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
2.86k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
2.86k
    return module->OpECC_Point_Add(op);
1125
2.86k
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
45
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
45
    (void)module;
1130
1131
45
    if ( result.second != std::nullopt  ) {
1132
0
        const auto curveID = op.curveType.Get();
1133
0
        const auto x = result.second->first.ToTrimmedString();
1134
0
        const auto y = result.second->second.ToTrimmedString();
1135
1136
0
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
0
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
0
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
0
    }
1141
45
}
1142
1143
45
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
45
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
45
    return module->OpECC_Point_Sub(op);
1147
45
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
4.01k
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
4.01k
    (void)module;
1152
1153
4.01k
    if ( result.second != std::nullopt  ) {
1154
326
        const auto curveID = op.curveType.Get();
1155
326
        const auto x = result.second->first.ToTrimmedString();
1156
326
        const auto y = result.second->second.ToTrimmedString();
1157
1158
326
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
326
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
326
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
326
    }
1163
4.01k
}
1164
1165
4.01k
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
4.01k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
4.01k
    return module->OpECC_Point_Mul(op);
1169
4.01k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
244
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::ResultPair& result) const {
1173
244
    (void)module;
1174
1175
244
    if ( result.second != std::nullopt  ) {
1176
39
        const auto curveID = op.curveType.Get();
1177
39
        const auto x = result.second->first.ToTrimmedString();
1178
39
        const auto y = result.second->second.ToTrimmedString();
1179
1180
39
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
39
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
39
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
39
    }
1185
244
}
1186
1187
244
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op) const {
1188
244
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
244
    return module->OpECC_Point_Neg(op);
1191
244
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
5.03k
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
5.03k
    (void)module;
1196
1197
5.03k
    if ( result.second != std::nullopt  ) {
1198
101
        const auto curveID = op.curveType.Get();
1199
101
        const auto x = result.second->first.ToTrimmedString();
1200
101
        const auto y = result.second->second.ToTrimmedString();
1201
1202
101
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
101
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
101
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
101
    }
1207
5.03k
}
1208
1209
5.03k
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
5.03k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
5.03k
    return module->OpECC_Point_Dbl(op);
1213
5.03k
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
98
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
98
    (void)module;
1218
98
    (void)result;
1219
98
    (void)op;
1220
98
}
1221
1222
98
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
98
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
98
    return module->OpECC_Point_Cmp(op);
1226
98
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
2.57k
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
2.57k
    (void)module;
1231
2.57k
    (void)op;
1232
2.57k
    (void)result;
1233
2.57k
}
1234
1235
2.57k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
2.57k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
2.51k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
2.48k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
2.42k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
2.35k
    return module->OpDH_Derive(op);
1242
2.42k
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
3.98k
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
3.98k
    (void)result;
1247
3.98k
    (void)op;
1248
3.98k
    (void)module;
1249
1250
3.98k
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
530
        const auto priv = result.second->first.ToTrimmedString();
1252
530
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
530
        Pool_DH_PrivateKey.Set(priv);
1255
530
        Pool_DH_PublicKey.Set(pub);
1256
530
    }
1257
3.98k
}
1258
1259
3.98k
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
3.98k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
3.95k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
3.88k
    return module->OpDH_GenerateKeyPair(op);
1264
3.95k
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
52.7k
template<> void ExecutorBase<component::Bignum, operation::BignumCalc>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc& op, const ExecutorBase<component::Bignum, operation::BignumCalc>::ResultPair& result) const {
1268
52.7k
    (void)module;
1269
52.7k
    (void)op;
1270
1271
52.7k
    if ( result.second != std::nullopt  ) {
1272
18.7k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
18.7k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
18.6k
            Pool_Bignum.Set(bignum);
1276
18.6k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
800
                Pool_Bignum_Primes.Set(bignum);
1278
800
            }
1279
18.6k
        }
1280
18.7k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
1.20k
            if ( bignum == "1" ) {
1282
538
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
538
            }
1284
1.20k
        }
1285
18.7k
    }
1286
52.7k
}
1287
1288
52.7k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
52.7k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
52.7k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
52.7k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
52.6k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
52.6k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
52.6k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
73
        return std::nullopt;
1299
73
    }
1300
1301
52.5k
    switch ( op.calcOp.Get() ) {
1302
543
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
543
            if ( op.bn1.GetSize() > 4 ) {
1305
65
                return std::nullopt;
1306
65
            }
1307
478
            break;
1308
478
        case    CF_CALCOP("Exp(A,B)"):
1309
224
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
164
                return std::nullopt;
1311
164
            }
1312
60
            break;
1313
117
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
117
            if ( op.bn1.GetSize() > 4 ) {
1315
69
                return std::nullopt;
1316
69
            }
1317
48
            break;
1318
355
        case    CF_CALCOP("Exp2(A)"):
1319
355
            if ( op.bn0.GetSize() > 4 ) {
1320
92
                return std::nullopt;
1321
92
            }
1322
263
            break;
1323
52.5k
    }
1324
1325
52.1k
    return module->OpBignumCalc(op);
1326
52.5k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
140
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
140
    (void)module;
1331
140
    (void)op;
1332
1333
140
    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
140
}
1345
1346
140
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
140
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
140
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
139
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
132
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
122
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
111
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
101
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
91
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
85
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
74
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
74
    return module->OpBignumCalc_Fp2(op);
1364
74
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
634
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
634
    (void)module;
1369
634
    (void)op;
1370
1371
634
    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
634
}
1400
1401
634
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
634
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
634
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
623
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
612
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
606
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
596
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
586
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
578
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
568
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
557
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
549
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
538
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
530
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
521
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
511
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
501
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
491
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
481
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
473
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
463
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
453
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
443
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
432
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
425
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
415
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
405
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
395
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
385
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
379
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
371
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
363
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
357
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
347
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
336
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
326
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
316
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
305
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
295
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
285
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
275
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
265
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
255
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
245
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
234
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
223
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
212
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
207
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
197
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
190
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
180
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
180
    return module->OpBignumCalc_Fp12(op);
1462
180
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
63
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
63
    (void)module;
1467
1468
63
    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
63
}
1479
1480
63
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
63
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
63
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
63
    if ( size == 0 || size > 4096 ) {
1486
0
        return std::nullopt;
1487
0
    }
1488
1489
63
    return module->OpBLS_PrivateToPublic(op);
1490
63
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
60
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
60
    (void)module;
1495
60
    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
60
}
1510
1511
60
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
60
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
60
    if ( size == 0 || size > 4096 ) {
1515
1
        return std::nullopt;
1516
1
    }
1517
1518
59
    return module->OpBLS_PrivateToPublic_G2(op);
1519
60
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
62
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
62
    (void)module;
1524
1525
62
    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
62
}
1553
1554
62
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
62
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
62
    if ( size == 0 || size > 4096 ) {
1558
1
        return std::nullopt;
1559
1
    }
1560
1561
61
    return module->OpBLS_Sign(op);
1562
62
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
48
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
48
    (void)module;
1567
48
    (void)op;
1568
48
    (void)result;
1569
48
}
1570
1571
48
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
48
    return module->OpBLS_Verify(op);
1588
48
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
59
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
59
    (void)module;
1593
59
    (void)op;
1594
1595
59
    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
59
}
1624
1625
59
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
59
    return module->OpBLS_BatchSign(op);
1627
59
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
69
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
69
    (void)module;
1632
69
    (void)op;
1633
69
    (void)result;
1634
69
}
1635
1636
69
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
69
    return module->OpBLS_BatchVerify(op);
1638
69
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
66
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
66
    (void)module;
1643
66
    (void)op;
1644
66
    (void)result;
1645
66
}
1646
1647
66
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
66
    return module->OpBLS_Aggregate_G1(op);
1649
66
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
79
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
79
    (void)module;
1654
79
    (void)op;
1655
79
    (void)result;
1656
79
}
1657
1658
79
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
79
    return module->OpBLS_Aggregate_G2(op);
1660
79
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
50
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
50
    (void)module;
1665
50
    (void)op;
1666
1667
50
    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
50
}
1684
1685
50
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
50
    return module->OpBLS_Pairing(op);
1687
50
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
48
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
48
    (void)module;
1692
48
    (void)op;
1693
1694
48
    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
48
}
1711
1712
48
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
48
    return module->OpBLS_MillerLoop(op);
1714
48
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
48
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
48
    (void)module;
1719
48
    (void)op;
1720
1721
48
    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
48
}
1738
1739
48
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
48
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
48
    return module->OpBLS_FinalExp(op);
1742
48
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
48
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
48
    (void)module;
1747
1748
48
    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
48
}
1759
1760
48
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
48
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
48
    return module->OpBLS_HashToG1(op);
1763
48
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
44
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
44
    (void)module;
1768
1769
44
    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
44
}
1780
1781
44
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
44
    return module->OpBLS_MapToG1(op);
1783
44
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
45
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
45
    (void)module;
1788
1789
45
    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
45
}
1804
1805
45
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
45
    return module->OpBLS_MapToG2(op);
1807
45
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
69
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
69
    (void)module;
1812
69
    (void)op;
1813
69
    (void)result;
1814
69
}
1815
1816
69
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
69
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
69
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
63
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
63
    return module->OpBLS_IsG1OnCurve(op);
1822
63
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
83
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
83
    (void)module;
1827
83
    (void)op;
1828
83
    (void)result;
1829
83
}
1830
1831
83
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
83
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
73
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
63
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
52
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
49
    return module->OpBLS_IsG2OnCurve(op);
1838
52
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
42
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
42
    (void)module;
1843
1844
42
    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
42
}
1857
1858
42
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
42
    return module->OpBLS_GenerateKeyPair(op);
1860
42
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
43
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
43
    (void)module;
1865
1866
43
    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
43
}
1877
1878
43
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
43
    return module->OpBLS_Decompress_G1(op);
1880
43
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
46
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
46
    (void)module;
1885
46
    (void)op;
1886
1887
46
    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
46
}
1893
1894
46
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
46
    return module->OpBLS_Compress_G1(op);
1896
46
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
46
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
46
    (void)module;
1901
1902
46
    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
46
}
1917
1918
46
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
46
    return module->OpBLS_Decompress_G2(op);
1920
46
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
44
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
44
    (void)module;
1925
1926
44
    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
44
}
1937
1938
44
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
44
    return module->OpBLS_Compress_G2(op);
1940
44
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
102
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
102
    (void)module;
1945
1946
102
    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
102
}
1957
1958
102
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
102
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
102
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
97
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
88
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
81
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
71
    return module->OpBLS_G1_Add(op);
1966
81
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
83
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
83
    (void)module;
1971
1972
83
    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
83
}
1983
1984
83
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
83
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
83
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
83
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
73
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
66
    return module->OpBLS_G1_Mul(op);
1991
73
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
128
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
128
    (void)module;
1996
128
    (void)op;
1997
128
    (void)result;
1998
128
}
1999
2000
128
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
128
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
128
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
118
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
107
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
96
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
90
    return module->OpBLS_G1_IsEq(op);
2008
96
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
73
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
73
    (void)module;
2013
2014
73
    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
73
}
2025
2026
73
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
73
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
73
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
66
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
65
    return module->OpBLS_G1_Neg(op);
2032
66
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
177
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
177
    (void)module;
2037
2038
177
    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
177
}
2053
2054
177
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
177
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
177
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
166
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
155
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
150
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
147
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
144
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
133
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
125
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
115
    return module->OpBLS_G2_Add(op);
2066
125
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
111
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
111
    (void)module;
2071
2072
111
    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
111
}
2087
2088
111
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
111
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
111
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
110
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
104
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
101
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
95
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
89
    return module->OpBLS_G2_Mul(op);
2097
95
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
168
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
168
    (void)module;
2102
168
    (void)op;
2103
168
    (void)result;
2104
168
}
2105
2106
168
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
168
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
168
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
167
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
161
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
156
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
151
    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
132
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
121
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
110
    return module->OpBLS_G2_IsEq(op);
2118
121
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
88
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
88
    (void)module;
2123
2124
88
    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
88
}
2139
2140
88
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
88
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
88
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
82
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
81
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
80
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
72
    return module->OpBLS_G2_Neg(op);
2148
80
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
116
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
116
    (void)module;
2153
2154
116
    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
116
}
2165
2166
116
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
116
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
918
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
918
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
908
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
908
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
908
    }
2174
2175
103
    return module->OpBLS_G1_MultiExp(op);
2176
116
}
2177
2178
/* Specialization for operation::Misc */
2179
45
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
45
    (void)module;
2181
45
    (void)op;
2182
45
    (void)result;
2183
45
}
2184
2185
45
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
45
    return module->OpMisc(op);
2187
45
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
47
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
47
    (void)module;
2192
2193
47
    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
47
}
2208
2209
47
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
47
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
47
    return module->OpBLS_HashToG2(op);
2212
47
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
161
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
161
{ }
2217
154
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
154
    this->modulo = component::Bignum(modulo);
2219
154
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
7
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
7
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
7
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
7
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
7
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
7
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
7
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
7
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
7
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
7
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
7
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
7
    CF_NORET(SetModulo("18446744069414584321"));
2279
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
7
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
7
    CF_NORET(SetModulo("18446744073709551616"));
2304
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
7
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
7
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
7
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
7
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
7
}
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
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
7
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
7
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
7
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
7
{ }
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
7
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
7
{ }
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
749
    operationID(operationID),
2348
749
    modules(modules),
2349
749
    options(options)
2350
749
{
2351
749
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
161
    operationID(operationID),
2348
161
    modules(modules),
2349
161
    options(options)
2350
161
{
2351
161
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
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
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
54
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
54
    (void)module;
2356
54
    (void)op;
2357
54
    (void)result;
2358
54
}
2359
2360
54
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
54
    return module->OpSR25519_Verify(op);
2362
54
}
2363
2364
template <class ResultType, class OperationType>
2365
749
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
749
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
161
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
161
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
19.3k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19.3k
    ResultSet ret;
2372
2373
59.8k
    for (const auto& result : results) {
2374
59.8k
        if ( result.second == std::nullopt ) {
2375
38.7k
            continue;
2376
38.7k
        }
2377
2378
21.1k
        ret.push_back(result);
2379
21.1k
    }
2380
2381
19.3k
    return ret;
2382
19.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
139
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
139
    ResultSet ret;
2372
2373
712
    for (const auto& result : results) {
2374
712
        if ( result.second == std::nullopt ) {
2375
229
            continue;
2376
229
        }
2377
2378
483
        ret.push_back(result);
2379
483
    }
2380
2381
139
    return ret;
2382
139
}
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
134
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
134
    ResultSet ret;
2372
2373
754
    for (const auto& result : results) {
2374
754
        if ( result.second == std::nullopt ) {
2375
433
            continue;
2376
433
        }
2377
2378
321
        ret.push_back(result);
2379
321
    }
2380
2381
134
    return ret;
2382
134
}
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
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
157
    for (const auto& result : results) {
2374
157
        if ( result.second == std::nullopt ) {
2375
157
            continue;
2376
157
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
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
104
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
104
    ResultSet ret;
2372
2373
647
    for (const auto& result : results) {
2374
647
        if ( result.second == std::nullopt ) {
2375
404
            continue;
2376
404
        }
2377
2378
243
        ret.push_back(result);
2379
243
    }
2380
2381
104
    return ret;
2382
104
}
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
444
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
444
    ResultSet ret;
2372
2373
2.29k
    for (const auto& result : results) {
2374
2.29k
        if ( result.second == std::nullopt ) {
2375
1.07k
            continue;
2376
1.07k
        }
2377
2378
1.21k
        ret.push_back(result);
2379
1.21k
    }
2380
2381
444
    return ret;
2382
444
}
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
189
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
189
    ResultSet ret;
2372
2373
1.01k
    for (const auto& result : results) {
2374
1.01k
        if ( result.second == std::nullopt ) {
2375
864
            continue;
2376
864
        }
2377
2378
147
        ret.push_back(result);
2379
147
    }
2380
2381
189
    return ret;
2382
189
}
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
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
163
    for (const auto& result : results) {
2374
163
        if ( result.second == std::nullopt ) {
2375
163
            continue;
2376
163
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
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
101
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
101
    ResultSet ret;
2372
2373
645
    for (const auto& result : results) {
2374
645
        if ( result.second == std::nullopt ) {
2375
457
            continue;
2376
457
        }
2377
2378
188
        ret.push_back(result);
2379
188
    }
2380
2381
101
    return ret;
2382
101
}
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
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
177
    for (const auto& result : results) {
2374
177
        if ( result.second == std::nullopt ) {
2375
177
            continue;
2376
177
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
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
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
165
    for (const auto& result : results) {
2374
165
        if ( result.second == std::nullopt ) {
2375
165
            continue;
2376
165
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
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
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
179
    for (const auto& result : results) {
2374
179
        if ( result.second == std::nullopt ) {
2375
179
            continue;
2376
179
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
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
73
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
73
    ResultSet ret;
2372
2373
436
    for (const auto& result : results) {
2374
436
        if ( result.second == std::nullopt ) {
2375
187
            continue;
2376
187
        }
2377
2378
249
        ret.push_back(result);
2379
249
    }
2380
2381
73
    return ret;
2382
73
}
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
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
12
    ResultSet ret;
2372
2373
27
    for (const auto& result : results) {
2374
27
        if ( result.second == std::nullopt ) {
2375
27
            continue;
2376
27
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
12
    return ret;
2382
12
}
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
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23
    ResultSet ret;
2372
2373
148
    for (const auto& result : results) {
2374
148
        if ( result.second == std::nullopt ) {
2375
148
            continue;
2376
148
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
23
    return ret;
2382
23
}
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
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22
    ResultSet ret;
2372
2373
142
    for (const auto& result : results) {
2374
142
        if ( result.second == std::nullopt ) {
2375
142
            continue;
2376
142
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
22
    return ret;
2382
22
}
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
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
16
    for (const auto& result : results) {
2374
16
        if ( result.second == std::nullopt ) {
2375
16
            continue;
2376
16
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
200
    for (const auto& result : results) {
2374
200
        if ( result.second == std::nullopt ) {
2375
200
            continue;
2376
200
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
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
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
191
    for (const auto& result : results) {
2374
191
        if ( result.second == std::nullopt ) {
2375
191
            continue;
2376
191
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
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
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    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
25
    return ret;
2382
25
}
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
1.04k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.04k
    ResultSet ret;
2372
2373
2.87k
    for (const auto& result : results) {
2374
2.87k
        if ( result.second == std::nullopt ) {
2375
1.71k
            continue;
2376
1.71k
        }
2377
2378
1.15k
        ret.push_back(result);
2379
1.15k
    }
2380
2381
1.04k
    return ret;
2382
1.04k
}
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
759
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
759
    ResultSet ret;
2372
2373
2.19k
    for (const auto& result : results) {
2374
2.19k
        if ( result.second == std::nullopt ) {
2375
1.46k
            continue;
2376
1.46k
        }
2377
2378
728
        ret.push_back(result);
2379
728
    }
2380
2381
759
    return ret;
2382
759
}
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
253
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
253
    ResultSet ret;
2372
2373
768
    for (const auto& result : results) {
2374
768
        if ( result.second == std::nullopt ) {
2375
768
            continue;
2376
768
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
253
    return ret;
2382
253
}
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
2.14k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.14k
    ResultSet ret;
2372
2373
6.34k
    for (const auto& result : results) {
2374
6.34k
        if ( result.second == std::nullopt ) {
2375
2.66k
            continue;
2376
2.66k
        }
2377
2378
3.68k
        ret.push_back(result);
2379
3.68k
    }
2380
2381
2.14k
    return ret;
2382
2.14k
}
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
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
51
    for (const auto& result : results) {
2374
51
        if ( result.second == std::nullopt ) {
2375
51
            continue;
2376
51
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
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
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
55
    for (const auto& result : results) {
2374
55
        if ( result.second == std::nullopt ) {
2375
55
            continue;
2376
55
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
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
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
51
    for (const auto& result : results) {
2374
51
        if ( result.second == std::nullopt ) {
2375
51
            continue;
2376
51
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
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
149
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
149
    ResultSet ret;
2372
2373
495
    for (const auto& result : results) {
2374
495
        if ( result.second == std::nullopt ) {
2375
495
            continue;
2376
495
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
149
    return ret;
2382
149
}
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
1.47k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.47k
    ResultSet ret;
2372
2373
4.23k
    for (const auto& result : results) {
2374
4.23k
        if ( result.second == std::nullopt ) {
2375
2.11k
            continue;
2376
2.11k
        }
2377
2378
2.12k
        ret.push_back(result);
2379
2.12k
    }
2380
2381
1.47k
    return ret;
2382
1.47k
}
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
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
14
    ResultSet ret;
2372
2373
38
    for (const auto& result : results) {
2374
38
        if ( result.second == std::nullopt ) {
2375
38
            continue;
2376
38
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
14
    return ret;
2382
14
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
44
    for (const auto& result : results) {
2374
44
        if ( result.second == std::nullopt ) {
2375
44
            continue;
2376
44
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
44
    for (const auto& result : results) {
2374
44
        if ( result.second == std::nullopt ) {
2375
44
            continue;
2376
44
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
48
    for (const auto& result : results) {
2374
48
        if ( result.second == std::nullopt ) {
2375
48
            continue;
2376
48
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
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
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
29
    ResultSet ret;
2372
2373
87
    for (const auto& result : results) {
2374
87
        if ( result.second == std::nullopt ) {
2375
87
            continue;
2376
87
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
29
    return ret;
2382
29
}
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
49
    for (const auto& result : results) {
2374
49
        if ( result.second == std::nullopt ) {
2375
49
            continue;
2376
49
        }
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
266
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
266
    ResultSet ret;
2372
2373
795
    for (const auto& result : results) {
2374
795
        if ( result.second == std::nullopt ) {
2375
685
            continue;
2376
685
        }
2377
2378
110
        ret.push_back(result);
2379
110
    }
2380
2381
266
    return ret;
2382
266
}
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
520
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
520
    ResultSet ret;
2372
2373
1.65k
    for (const auto& result : results) {
2374
1.65k
        if ( result.second == std::nullopt ) {
2375
1.62k
            continue;
2376
1.62k
        }
2377
2378
29
        ret.push_back(result);
2379
29
    }
2380
2381
520
    return ret;
2382
520
}
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
780
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
780
    ResultSet ret;
2372
2373
2.27k
    for (const auto& result : results) {
2374
2.27k
        if ( result.second == std::nullopt ) {
2375
2.07k
            continue;
2376
2.07k
        }
2377
2378
197
        ret.push_back(result);
2379
197
    }
2380
2381
780
    return ret;
2382
780
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
44
    for (const auto& result : results) {
2374
44
        if ( result.second == std::nullopt ) {
2375
44
            continue;
2376
44
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
769
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
769
    ResultSet ret;
2372
2373
2.24k
    for (const auto& result : results) {
2374
2.24k
        if ( result.second == std::nullopt ) {
2375
1.98k
            continue;
2376
1.98k
        }
2377
2378
261
        ret.push_back(result);
2379
261
    }
2380
2381
769
    return ret;
2382
769
}
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
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
61
    ResultSet ret;
2372
2373
179
    for (const auto& result : results) {
2374
179
        if ( result.second == std::nullopt ) {
2375
148
            continue;
2376
148
        }
2377
2378
31
        ret.push_back(result);
2379
31
    }
2380
2381
61
    return ret;
2382
61
}
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
750
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
750
    ResultSet ret;
2372
2373
1.92k
    for (const auto& result : results) {
2374
1.92k
        if ( result.second == std::nullopt ) {
2375
1.84k
            continue;
2376
1.84k
        }
2377
2378
79
        ret.push_back(result);
2379
79
    }
2380
2381
750
    return ret;
2382
750
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
92
    for (const auto& result : results) {
2374
92
        if ( result.second == std::nullopt ) {
2375
59
            continue;
2376
59
        }
2377
2378
33
        ret.push_back(result);
2379
33
    }
2380
2381
33
    return ret;
2382
33
}
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
716
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
716
    ResultSet ret;
2372
2373
2.05k
    for (const auto& result : results) {
2374
2.05k
        if ( result.second == std::nullopt ) {
2375
1.70k
            continue;
2376
1.70k
        }
2377
2378
348
        ret.push_back(result);
2379
348
    }
2380
2381
716
    return ret;
2382
716
}
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
7.00k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7.00k
    ResultSet ret;
2372
2373
20.2k
    for (const auto& result : results) {
2374
20.2k
        if ( result.second == std::nullopt ) {
2375
10.7k
            continue;
2376
10.7k
        }
2377
2378
9.50k
        ret.push_back(result);
2379
9.50k
    }
2380
2381
7.00k
    return ret;
2382
7.00k
}
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
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
42
    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
42
    return ret;
2382
42
}
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
177
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
177
    ResultSet ret;
2372
2373
523
    for (const auto& result : results) {
2374
523
        if ( result.second == std::nullopt ) {
2375
523
            continue;
2376
523
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
177
    return ret;
2382
177
}
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
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
55
    for (const auto& result : results) {
2374
55
        if ( result.second == std::nullopt ) {
2375
55
            continue;
2376
55
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
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
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
56
    for (const auto& result : results) {
2374
56
        if ( result.second == std::nullopt ) {
2375
56
            continue;
2376
56
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
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
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
53
    for (const auto& result : results) {
2374
53
        if ( result.second == std::nullopt ) {
2375
53
            continue;
2376
53
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
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
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
47
    for (const auto& result : results) {
2374
47
        if ( result.second == std::nullopt ) {
2375
47
            continue;
2376
47
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
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
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
58
    for (const auto& result : results) {
2374
58
        if ( result.second == std::nullopt ) {
2375
58
            continue;
2376
58
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
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
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
21
    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
21
    return ret;
2382
21
}
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
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
65
    for (const auto& result : results) {
2374
65
        if ( result.second == std::nullopt ) {
2375
65
            continue;
2376
65
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
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
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
77
    for (const auto& result : results) {
2374
77
        if ( result.second == std::nullopt ) {
2375
77
            continue;
2376
77
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
49
    for (const auto& result : results) {
2374
49
        if ( result.second == std::nullopt ) {
2375
49
            continue;
2376
49
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
47
    for (const auto& result : results) {
2374
47
        if ( result.second == std::nullopt ) {
2375
47
            continue;
2376
47
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
47
    for (const auto& result : results) {
2374
47
        if ( result.second == std::nullopt ) {
2375
47
            continue;
2376
47
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
47
    for (const auto& result : results) {
2374
47
        if ( result.second == std::nullopt ) {
2375
47
            continue;
2376
47
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
14
    ResultSet ret;
2372
2373
46
    for (const auto& result : results) {
2374
46
        if ( result.second == std::nullopt ) {
2375
46
            continue;
2376
46
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
14
    return ret;
2382
14
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
43
    for (const auto& result : results) {
2374
43
        if ( result.second == std::nullopt ) {
2375
43
            continue;
2376
43
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
44
    for (const auto& result : results) {
2374
44
        if ( result.second == std::nullopt ) {
2375
44
            continue;
2376
44
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
55
    for (const auto& result : results) {
2374
55
        if ( result.second == std::nullopt ) {
2375
55
            continue;
2376
55
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
78
    for (const auto& result : results) {
2374
78
        if ( result.second == std::nullopt ) {
2375
78
            continue;
2376
78
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
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
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
14
    ResultSet ret;
2372
2373
41
    for (const auto& result : results) {
2374
41
        if ( result.second == std::nullopt ) {
2375
41
            continue;
2376
41
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
14
    return ret;
2382
14
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
42
    for (const auto& result : results) {
2374
42
        if ( result.second == std::nullopt ) {
2375
42
            continue;
2376
42
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
45
    for (const auto& result : results) {
2374
45
        if ( result.second == std::nullopt ) {
2375
45
            continue;
2376
45
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
45
    for (const auto& result : results) {
2374
45
        if ( result.second == std::nullopt ) {
2375
45
            continue;
2376
45
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
43
    for (const auto& result : results) {
2374
43
        if ( result.second == std::nullopt ) {
2375
43
            continue;
2376
43
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    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
30
    return ret;
2382
30
}
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
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
71
    for (const auto& result : results) {
2374
71
        if ( result.second == std::nullopt ) {
2375
71
            continue;
2376
71
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
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
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    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
36
    return ret;
2382
36
}
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
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23
    ResultSet ret;
2372
2373
57
    for (const auto& result : results) {
2374
57
        if ( result.second == std::nullopt ) {
2375
57
            continue;
2376
57
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
23
    return ret;
2382
23
}
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
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
54
    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
54
    return ret;
2382
54
}
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
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
79
    for (const auto& result : results) {
2374
79
        if ( result.second == std::nullopt ) {
2375
79
            continue;
2376
79
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
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
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
48
    ResultSet ret;
2372
2373
130
    for (const auto& result : results) {
2374
130
        if ( result.second == std::nullopt ) {
2375
130
            continue;
2376
130
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
48
    return ret;
2382
48
}
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
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23
    ResultSet ret;
2372
2373
62
    for (const auto& result : results) {
2374
62
        if ( result.second == std::nullopt ) {
2375
62
            continue;
2376
62
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
23
    return ret;
2382
23
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    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
35
    return ret;
2382
35
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
44
    for (const auto& result : results) {
2374
44
        if ( result.second == std::nullopt ) {
2375
44
            continue;
2376
44
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
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
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
53
    for (const auto& result : results) {
2374
53
        if ( result.second == std::nullopt ) {
2375
53
            continue;
2376
53
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
4.72k
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
4.72k
    (void)operations;
2388
4.72k
    (void)results;
2389
4.72k
    (void)data;
2390
4.72k
    (void)size;
2391
4.72k
}
2392
2393
template <class ResultType, class OperationType>
2394
1.80k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1.80k
    (void)operation;
2396
2397
1.80k
    return false;
2398
1.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
111
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
111
    (void)operation;
2396
2397
111
    return false;
2398
111
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
37
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
37
    (void)operation;
2396
2397
37
    return false;
2398
37
}
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
45
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
45
    (void)operation;
2396
2397
45
    return false;
2398
45
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
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
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
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
383
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
383
    (void)operation;
2396
2397
383
    return false;
2398
383
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
215
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
215
    (void)operation;
2396
2397
215
    return false;
2398
215
}
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
678
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
678
    (void)operation;
2396
2397
678
    return false;
2398
678
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
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
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const
Line
Count
Source
2394
30
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
30
    (void)operation;
2396
2397
30
    return false;
2398
30
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const
Line
Count
Source
2394
8
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
8
    (void)operation;
2396
2397
8
    return false;
2398
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2394
61
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
61
    (void)operation;
2396
2397
61
    return false;
2398
61
}
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
83
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
83
    (void)operation;
2396
2397
83
    return false;
2398
83
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
10
    (void)operation;
2396
2397
10
    return false;
2398
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
26
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
26
    (void)operation;
2396
2397
26
    return false;
2398
26
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
10
    (void)operation;
2396
2397
10
    return false;
2398
10
}
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
110
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
110
    (void)operation;
2396
2397
110
    return false;
2398
110
}
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
3.05k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
3.05k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
3.01k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
3.01k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
2.88k
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
2.88k
    return false;
2408
2.88k
}
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
1.20k
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
1.20k
    if (
2419
1.20k
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
897
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
521
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
331
            return true;
2424
331
        }
2425
521
    }
2426
2427
876
    return false;
2428
1.20k
}
2429
2430
template <>
2431
0
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2432
0
    if (
2433
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2434
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2435
0
        if ( operation.UseRandomNonce() ) {
2436
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2437
0
            return true;
2438
0
        }
2439
0
    }
2440
2441
0
    return false;
2442
0
}
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
231
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
231
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
231
    return false;
2464
231
}
2465
2466
template <>
2467
26
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
26
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
26
    return false;
2471
26
}
2472
2473
template <>
2474
39
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
39
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
39
    return false;
2478
39
}
2479
2480
template <>
2481
72
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
72
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
71
    return false;
2485
72
}
2486
2487
template <class ResultType, class OperationType>
2488
70.0k
void ExecutorBase<ResultType, OperationType>::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
70.0k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
50.7k
        return;
2492
50.7k
    }
2493
2494
19.3k
    const auto filtered = filter(results);
2495
2496
19.3k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
12.8k
        return;
2499
12.8k
    }
2500
2501
6.43k
    if ( dontCompare(operations[0].second) == true ) {
2502
497
        return;
2503
497
    }
2504
2505
18.2k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
12.3k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
12.3k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
12.3k
        const bool equal = *prev == *cur;
2510
2511
12.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
12.3k
    }
2528
5.93k
}
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
306
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
306
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
167
        return;
2492
167
    }
2493
2494
139
    const auto filtered = filter(results);
2495
2496
139
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
111
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
483
    for (size_t i = 1; i < filtered.size(); i++) {
2506
372
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
372
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
372
        const bool equal = *prev == *cur;
2510
2511
372
        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
372
    }
2528
111
}
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
194
void ExecutorBase<ResultType, OperationType>::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
194
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
60
        return;
2492
60
    }
2493
2494
134
    const auto filtered = filter(results);
2495
2496
134
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
62
        return;
2499
62
    }
2500
2501
72
    if ( dontCompare(operations[0].second) == true ) {
2502
1
        return;
2503
1
    }
2504
2505
316
    for (size_t i = 1; i < filtered.size(); i++) {
2506
245
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
245
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
245
        const bool equal = *prev == *cur;
2510
2511
245
        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
245
    }
2528
71
}
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
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
1
        return;
2492
1
    }
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::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
172
void ExecutorBase<ResultType, OperationType>::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
172
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
68
        return;
2492
68
    }
2493
2494
104
    const auto filtered = filter(results);
2495
2496
104
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
65
        return;
2499
65
    }
2500
2501
39
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
243
    for (size_t i = 1; i < filtered.size(); i++) {
2506
204
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
204
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
204
        const bool equal = *prev == *cur;
2510
2511
204
        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
204
    }
2528
39
}
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
841
void ExecutorBase<ResultType, OperationType>::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
841
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
397
        return;
2492
397
    }
2493
2494
444
    const auto filtered = filter(results);
2495
2496
444
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
213
        return;
2499
213
    }
2500
2501
231
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.21k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
986
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
986
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
986
        const bool equal = *prev == *cur;
2510
2511
986
        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
986
    }
2528
231
}
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
321
void ExecutorBase<ResultType, OperationType>::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
321
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
132
        return;
2492
132
    }
2493
2494
189
    const auto filtered = filter(results);
2495
2496
189
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
163
        return;
2499
163
    }
2500
2501
26
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
147
    for (size_t i = 1; i < filtered.size(); i++) {
2506
121
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
121
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
121
        const bool equal = *prev == *cur;
2510
2511
121
        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
121
    }
2528
26
}
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
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
1
        return;
2492
1
    }
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::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
274
void ExecutorBase<ResultType, OperationType>::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
274
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
173
        return;
2492
173
    }
2493
2494
101
    const auto filtered = filter(results);
2495
2496
101
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
64
        return;
2499
64
    }
2500
2501
37
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
188
    for (size_t i = 1; i < filtered.size(); i++) {
2506
151
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
151
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
151
        const bool equal = *prev == *cur;
2510
2511
151
        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
151
    }
2528
37
}
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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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::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
189
void ExecutorBase<ResultType, OperationType>::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
189
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
116
        return;
2492
116
    }
2493
2494
73
    const auto filtered = filter(results);
2495
2496
73
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
45
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
249
    for (size_t i = 1; i < filtered.size(); i++) {
2506
204
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
204
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
204
        const bool equal = *prev == *cur;
2510
2511
204
        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
204
    }
2528
45
}
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
13
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
13
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
12
    const auto filtered = filter(results);
2495
2496
12
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
12
        return;
2499
12
    }
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_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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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::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
9
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
9
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
8
    const auto filtered = filter(results);
2495
2496
8
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8
        return;
2499
8
    }
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
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
2
        return;
2492
2
    }
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
}
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
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
1
        return;
2492
1
    }
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<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
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
1
        return;
2492
1
    }
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::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
5.18k
void ExecutorBase<ResultType, OperationType>::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
5.18k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
4.13k
        return;
2492
4.13k
    }
2493
2494
1.04k
    const auto filtered = filter(results);
2495
2496
1.04k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
666
        return;
2499
666
    }
2500
2501
383
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.02k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
646
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
646
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
646
        const bool equal = *prev == *cur;
2510
2511
646
        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
646
    }
2528
383
}
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
3.13k
void ExecutorBase<ResultType, OperationType>::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
3.13k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.37k
        return;
2492
2.37k
    }
2493
2494
759
    const auto filtered = filter(results);
2495
2496
759
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
544
        return;
2499
544
    }
2500
2501
215
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
687
    for (size_t i = 1; i < filtered.size(); i++) {
2506
472
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
472
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
472
        const bool equal = *prev == *cur;
2510
2511
472
        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
472
    }
2528
215
}
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
322
void ExecutorBase<ResultType, OperationType>::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
322
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
69
        return;
2492
69
    }
2493
2494
253
    const auto filtered = filter(results);
2495
2496
253
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
253
        return;
2499
253
    }
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
4.44k
void ExecutorBase<ResultType, OperationType>::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
4.44k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.29k
        return;
2492
2.29k
    }
2493
2494
2.14k
    const auto filtered = filter(results);
2495
2496
2.14k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
941
        return;
2499
941
    }
2500
2501
1.20k
    if ( dontCompare(operations[0].second) == true ) {
2502
331
        return;
2503
331
    }
2504
2505
2.61k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.74k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.74k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.74k
        const bool equal = *prev == *cur;
2510
2511
1.74k
        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.74k
    }
2528
876
}
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
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
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::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
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
2
        return;
2492
2
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
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
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
3
        return;
2492
3
    }
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<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
167
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
167
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
18
        return;
2492
18
    }
2493
2494
149
    const auto filtered = filter(results);
2495
2496
149
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
149
        return;
2499
149
    }
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
2.89k
void ExecutorBase<ResultType, OperationType>::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
2.89k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.42k
        return;
2492
1.42k
    }
2493
2494
1.47k
    const auto filtered = filter(results);
2495
2496
1.47k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
798
        return;
2499
798
    }
2500
2501
678
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.95k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.27k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.27k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.27k
        const bool equal = *prev == *cur;
2510
2511
1.27k
        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.27k
    }
2528
678
}
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
15
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
15
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
14
    const auto filtered = filter(results);
2495
2496
14
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
14
        return;
2499
14
    }
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::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
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
1
        return;
2492
1
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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<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
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
41
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
12
        return;
2492
12
    }
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::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
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
1
        return;
2492
1
    }
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
388
void ExecutorBase<ResultType, OperationType>::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
388
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
122
        return;
2492
122
    }
2493
2494
266
    const auto filtered = filter(results);
2495
2496
266
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
236
        return;
2499
236
    }
2500
2501
30
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
93
    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
30
}
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
774
void ExecutorBase<ResultType, OperationType>::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
774
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
254
        return;
2492
254
    }
2493
2494
520
    const auto filtered = filter(results);
2495
2496
520
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
512
        return;
2499
512
    }
2500
2501
8
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
18
    for (size_t i = 1; i < filtered.size(); i++) {
2506
10
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
10
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
10
        const bool equal = *prev == *cur;
2510
2511
10
        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
10
    }
2528
8
}
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
1.37k
void ExecutorBase<ResultType, OperationType>::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.37k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
596
        return;
2492
596
    }
2493
2494
780
    const auto filtered = filter(results);
2495
2496
780
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
719
        return;
2499
719
    }
2500
2501
61
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
187
    for (size_t i = 1; i < filtered.size(); i++) {
2506
126
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
126
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
126
        const bool equal = *prev == *cur;
2510
2511
126
        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
126
    }
2528
61
}
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
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
1
        return;
2492
1
    }
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::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
2.54k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2.54k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.77k
        return;
2492
1.77k
    }
2493
2494
769
    const auto filtered = filter(results);
2495
2496
769
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
686
        return;
2499
686
    }
2500
2501
83
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
251
    for (size_t i = 1; i < filtered.size(); i++) {
2506
168
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
168
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
168
        const bool equal = *prev == *cur;
2510
2511
168
        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
168
    }
2528
83
}
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
126
void ExecutorBase<ResultType, OperationType>::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
126
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
65
        return;
2492
65
    }
2493
2494
61
    const auto filtered = filter(results);
2495
2496
61
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
51
        return;
2499
51
    }
2500
2501
10
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
31
    for (size_t i = 1; i < filtered.size(); i++) {
2506
21
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
21
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
21
        const bool equal = *prev == *cur;
2510
2511
21
        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
21
    }
2528
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.85k
void ExecutorBase<ResultType, OperationType>::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
3.85k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
3.10k
        return;
2492
3.10k
    }
2493
2494
750
    const auto filtered = filter(results);
2495
2496
750
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
724
        return;
2499
724
    }
2500
2501
26
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
71
    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
26
}
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
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
6
        return;
2492
6
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
23
        return;
2499
23
    }
2500
2501
10
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
33
    for (size_t i = 1; i < filtered.size(); i++) {
2506
23
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
23
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
23
        const bool equal = *prev == *cur;
2510
2511
23
        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
23
    }
2528
10
}
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
1.23k
void ExecutorBase<ResultType, OperationType>::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.23k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
519
        return;
2492
519
    }
2493
2494
716
    const auto filtered = filter(results);
2495
2496
716
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
606
        return;
2499
606
    }
2500
2501
110
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
323
    for (size_t i = 1; i < filtered.size(); i++) {
2506
213
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
213
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
213
        const bool equal = *prev == *cur;
2510
2511
213
        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
213
    }
2528
110
}
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
39.4k
void ExecutorBase<ResultType, OperationType>::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.4k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
32.3k
        return;
2492
32.3k
    }
2493
2494
7.00k
    const auto filtered = filter(results);
2495
2496
7.00k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3.95k
        return;
2499
3.95k
    }
2500
2501
3.05k
    if ( dontCompare(operations[0].second) == true ) {
2502
165
        return;
2503
165
    }
2504
2505
8.15k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
5.26k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
5.26k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
5.26k
        const bool equal = *prev == *cur;
2510
2511
5.26k
        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
5.26k
    }
2528
2.88k
}
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
64
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
64
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
42
    const auto filtered = filter(results);
2495
2496
42
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
42
        return;
2499
42
    }
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
288
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
288
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
111
        return;
2492
111
    }
2493
2494
177
    const auto filtered = filter(results);
2495
2496
177
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
177
        return;
2499
177
    }
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
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
8
        return;
2492
8
    }
2493
2494
20
    const auto filtered = filter(results);
2495
2496
20
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
20
        return;
2499
20
    }
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
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
4
        return;
2492
4
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
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
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
9
        return;
2492
9
    }
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<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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
2493
2494
20
    const auto filtered = filter(results);
2495
2496
20
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
20
        return;
2499
20
    }
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
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
3
        return;
2492
3
    }
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::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
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
1
        return;
2492
1
    }
2493
2494
20
    const auto filtered = filter(results);
2495
2496
20
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
20
        return;
2499
20
    }
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
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
2
        return;
2492
2
    }
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::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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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::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
15
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
15
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
14
    const auto filtered = filter(results);
2495
2496
14
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
14
        return;
2499
14
    }
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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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<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
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
14
        return;
2492
14
    }
2493
2494
20
    const auto filtered = filter(results);
2495
2496
20
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
20
        return;
2499
20
    }
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
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
5
        return;
2492
5
    }
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::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
15
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
15
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
14
    const auto filtered = filter(results);
2495
2496
14
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
14
        return;
2499
14
    }
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
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
1
        return;
2492
1
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
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::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
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
1
        return;
2492
1
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
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
50
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
50
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
20
        return;
2492
20
    }
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
}
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
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
12
        return;
2492
12
    }
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_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
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
27
        return;
2492
27
    }
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::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
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
16
        return;
2492
16
    }
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::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
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
36
        return;
2492
36
    }
2493
2494
54
    const auto filtered = filter(results);
2495
2496
54
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
54
        return;
2499
54
    }
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
64
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
64
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
32
        return;
2492
32
    }
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_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
86
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
86
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
38
        return;
2492
38
    }
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::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
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
26
        return;
2492
26
    }
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::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
54
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
54
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
19
        return;
2492
19
    }
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::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
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
1
        return;
2492
1
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
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
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
19
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
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
}
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
132k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
132k
    (void)parentDs;
2551
132k
    return op;
2552
132k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) 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::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) 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::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
258
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
258
    (void)parentDs;
2551
258
    return op;
2552
258
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
799
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
799
    (void)parentDs;
2551
799
    return op;
2552
799
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
2.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.81k
    (void)parentDs;
2551
2.81k
    return op;
2552
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
1.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.29k
    (void)parentDs;
2551
1.29k
    return op;
2552
1.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
267
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
267
    (void)parentDs;
2551
267
    return op;
2552
267
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
896
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
896
    (void)parentDs;
2551
896
    return op;
2552
896
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
285
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
285
    (void)parentDs;
2551
285
    return op;
2552
285
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
278
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
278
    (void)parentDs;
2551
278
    return op;
2552
278
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
330
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
330
    (void)parentDs;
2551
330
    return op;
2552
330
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
728
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
728
    (void)parentDs;
2551
728
    return op;
2552
728
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
37
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
37
    (void)parentDs;
2551
37
    return op;
2552
37
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
281
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
281
    (void)parentDs;
2551
281
    return op;
2552
281
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
278
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
278
    (void)parentDs;
2551
278
    return op;
2552
278
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
24
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
24
    (void)parentDs;
2551
24
    return op;
2552
24
}
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
316
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
316
    (void)parentDs;
2551
316
    return op;
2552
316
}
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
366
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
366
    (void)parentDs;
2551
366
    return op;
2552
366
}
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
244
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
244
    (void)parentDs;
2551
244
    return op;
2552
244
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
7.36k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.36k
    (void)parentDs;
2551
7.36k
    return op;
2552
7.36k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
4.94k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.94k
    (void)parentDs;
2551
4.94k
    return op;
2552
4.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
6.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.97k
    (void)parentDs;
2551
6.97k
    return op;
2552
6.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) 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<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2549
8.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8.92k
    (void)parentDs;
2551
8.92k
    return op;
2552
8.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
82
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
82
    (void)parentDs;
2551
82
    return op;
2552
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2549
80
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
80
    (void)parentDs;
2551
80
    return op;
2552
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
75
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
75
    (void)parentDs;
2551
75
    return op;
2552
75
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
805
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
805
    (void)parentDs;
2551
805
    return op;
2552
805
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
5.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.97k
    (void)parentDs;
2551
5.97k
    return op;
2552
5.97k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
57
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
57
    (void)parentDs;
2551
57
    return op;
2552
57
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
67
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
67
    (void)parentDs;
2551
67
    return op;
2552
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
66
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
66
    (void)parentDs;
2551
66
    return op;
2552
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
68
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
68
    (void)parentDs;
2551
68
    return op;
2552
68
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
129
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
129
    (void)parentDs;
2551
129
    return op;
2552
129
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
97
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
97
    (void)parentDs;
2551
97
    return op;
2552
97
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
85
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
85
    (void)parentDs;
2551
85
    return op;
2552
85
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
82
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
82
    (void)parentDs;
2551
82
    return op;
2552
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
113
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
113
    (void)parentDs;
2551
113
    return op;
2552
113
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
1.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.19k
    (void)parentDs;
2551
1.19k
    return op;
2552
1.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
2.08k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.08k
    (void)parentDs;
2551
2.08k
    return op;
2552
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) 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::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
3.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.24k
    (void)parentDs;
2551
3.24k
    return op;
2552
3.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
76
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
76
    (void)parentDs;
2551
76
    return op;
2552
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
4.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.29k
    (void)parentDs;
2551
4.29k
    return op;
2552
4.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
274
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
274
    (void)parentDs;
2551
274
    return op;
2552
274
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
5.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.40k
    (void)parentDs;
2551
5.40k
    return op;
2552
5.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
135
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
135
    (void)parentDs;
2551
135
    return op;
2552
135
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
4.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.31k
    (void)parentDs;
2551
4.31k
    return op;
2552
4.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
2.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.91k
    (void)parentDs;
2551
2.91k
    return op;
2552
2.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
52.9k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
52.9k
    (void)parentDs;
2551
52.9k
    return op;
2552
52.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
167
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
167
    (void)parentDs;
2551
167
    return op;
2552
167
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
663
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
663
    (void)parentDs;
2551
663
    return op;
2552
663
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
94
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
94
    (void)parentDs;
2551
94
    return op;
2552
94
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
85
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
85
    (void)parentDs;
2551
85
    return op;
2552
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
86
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
86
    (void)parentDs;
2551
86
    return op;
2552
86
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
66
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
66
    (void)parentDs;
2551
66
    return op;
2552
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
152
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
152
    (void)parentDs;
2551
152
    return op;
2552
152
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
136
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
136
    (void)parentDs;
2551
136
    return op;
2552
136
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
134
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
134
    (void)parentDs;
2551
134
    return op;
2552
134
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
140
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
140
    (void)parentDs;
2551
140
    return op;
2552
140
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
80
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
80
    (void)parentDs;
2551
80
    return op;
2552
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
80
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
80
    (void)parentDs;
2551
80
    return op;
2552
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
81
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
81
    (void)parentDs;
2551
81
    return op;
2552
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
71
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
71
    (void)parentDs;
2551
71
    return op;
2552
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
73
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
73
    (void)parentDs;
2551
73
    return op;
2552
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
67
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
67
    (void)parentDs;
2551
67
    return op;
2552
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
67
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
67
    (void)parentDs;
2551
67
    return op;
2552
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
103
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
103
    (void)parentDs;
2551
103
    return op;
2552
103
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
109
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
109
    (void)parentDs;
2551
109
    return op;
2552
109
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2549
62
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
62
    (void)parentDs;
2551
62
    return op;
2552
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
65
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
65
    (void)parentDs;
2551
65
    return op;
2552
65
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
72
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
72
    (void)parentDs;
2551
72
    return op;
2552
72
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2549
81
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
81
    (void)parentDs;
2551
81
    return op;
2552
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
74
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
74
    (void)parentDs;
2551
74
    return op;
2552
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
130
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
130
    (void)parentDs;
2551
130
    return op;
2552
130
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
99
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
99
    (void)parentDs;
2551
99
    return op;
2552
99
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
154
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
154
    (void)parentDs;
2551
154
    return op;
2552
154
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
110
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
110
    (void)parentDs;
2551
110
    return op;
2552
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
209
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
209
    (void)parentDs;
2551
209
    return op;
2552
209
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
134
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
134
    (void)parentDs;
2551
134
    return op;
2552
134
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
209
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
209
    (void)parentDs;
2551
209
    return op;
2552
209
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
121
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
121
    (void)parentDs;
2551
121
    return op;
2552
121
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
190
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
190
    (void)parentDs;
2551
190
    return op;
2552
190
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
72
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
72
    (void)parentDs;
2551
72
    return op;
2552
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
113
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
113
    (void)parentDs;
2551
113
    return op;
2552
113
}
2553
2554
12
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
12
    (void)parentDs;
2556
12
    op.modulo = modulo;
2557
12
    return op;
2558
12
}
2559
2560
20
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
20
    (void)parentDs;
2562
20
    op.modulo = modulo;
2563
20
    return op;
2564
20
}
2565
2566
11
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
11
    (void)parentDs;
2568
11
    op.modulo = modulo;
2569
11
    return op;
2570
11
}
2571
2572
11
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
11
    (void)parentDs;
2574
11
    op.modulo = modulo;
2575
11
    return op;
2576
11
}
2577
2578
11
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
11
    (void)parentDs;
2580
11
    op.modulo = modulo;
2581
11
    return op;
2582
11
}
2583
2584
13
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
13
    (void)parentDs;
2586
13
    op.modulo = modulo;
2587
13
    return op;
2588
13
}
2589
2590
10
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
10
    (void)parentDs;
2592
10
    op.modulo = modulo;
2593
10
    return op;
2594
10
}
2595
2596
10
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
10
    (void)parentDs;
2598
10
    op.modulo = modulo;
2599
10
    return op;
2600
10
}
2601
2602
14
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
14
    (void)parentDs;
2604
14
    op.modulo = modulo;
2605
14
    return op;
2606
14
}
2607
2608
12
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
12
    (void)parentDs;
2610
12
    op.modulo = modulo;
2611
12
    return op;
2612
12
}
2613
2614
10
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
10
    (void)parentDs;
2616
10
    op.modulo = modulo;
2617
10
    return op;
2618
10
}
2619
2620
10
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
10
    (void)parentDs;
2622
10
    op.modulo = modulo;
2623
10
    return op;
2624
10
}
2625
2626
6
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
6
    (void)parentDs;
2628
6
    op.modulo = modulo;
2629
6
    return op;
2630
6
}
2631
2632
11
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
11
    (void)parentDs;
2634
11
    op.modulo = modulo;
2635
11
    return op;
2636
11
}
2637
2638
13
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
13
    (void)parentDs;
2640
13
    op.modulo = modulo;
2641
13
    return op;
2642
13
}
2643
2644
12
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
12
    (void)parentDs;
2646
12
    op.modulo = modulo;
2647
12
    return op;
2648
12
}
2649
2650
12
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
12
    (void)parentDs;
2652
12
    op.modulo = modulo;
2653
12
    return op;
2654
12
}
2655
2656
13
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
13
    (void)parentDs;
2658
13
    op.modulo = modulo;
2659
13
    return op;
2660
13
}
2661
2662
10
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
10
    (void)parentDs;
2664
10
    op.modulo = modulo;
2665
10
    return op;
2666
10
}
2667
2668
10
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
10
    (void)parentDs;
2670
10
    op.modulo = modulo;
2671
10
    return op;
2672
10
}
2673
2674
18
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
18
    (void)parentDs;
2676
18
    op.modulo = modulo;
2677
18
    return op;
2678
18
}
2679
2680
16
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
16
    (void)parentDs;
2682
16
    op.modulo = modulo;
2683
16
    return op;
2684
16
}
2685
2686
template <class ResultType, class OperationType>
2687
134k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
134k
    Datasource ds(data, size);
2689
134k
    if ( parentDs != nullptr ) {
2690
134k
        auto modifier = parentDs->GetData(0);
2691
134k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
134k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
134k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::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<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
948
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
948
    Datasource ds(data, size);
2689
948
    if ( parentDs != nullptr ) {
2690
948
        auto modifier = parentDs->GetData(0);
2691
948
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
948
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
948
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
268
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
268
    Datasource ds(data, size);
2689
268
    if ( parentDs != nullptr ) {
2690
268
        auto modifier = parentDs->GetData(0);
2691
268
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
268
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
268
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
806
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
806
    Datasource ds(data, size);
2689
806
    if ( parentDs != nullptr ) {
2690
806
        auto modifier = parentDs->GetData(0);
2691
806
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
806
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
806
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.82k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.82k
    Datasource ds(data, size);
2689
2.82k
    if ( parentDs != nullptr ) {
2690
2.82k
        auto modifier = parentDs->GetData(0);
2691
2.82k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.82k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.31k
    Datasource ds(data, size);
2689
1.31k
    if ( parentDs != nullptr ) {
2690
1.31k
        auto modifier = parentDs->GetData(0);
2691
1.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.31k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
280
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
280
    Datasource ds(data, size);
2689
280
    if ( parentDs != nullptr ) {
2690
280
        auto modifier = parentDs->GetData(0);
2691
280
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
280
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
280
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
908
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
908
    Datasource ds(data, size);
2689
908
    if ( parentDs != nullptr ) {
2690
908
        auto modifier = parentDs->GetData(0);
2691
908
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
908
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
908
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
294
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
294
    Datasource ds(data, size);
2689
294
    if ( parentDs != nullptr ) {
2690
294
        auto modifier = parentDs->GetData(0);
2691
294
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
294
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
294
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
287
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
287
    Datasource ds(data, size);
2689
287
    if ( parentDs != nullptr ) {
2690
287
        auto modifier = parentDs->GetData(0);
2691
287
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
287
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
287
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
342
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
342
    Datasource ds(data, size);
2689
342
    if ( parentDs != nullptr ) {
2690
342
        auto modifier = parentDs->GetData(0);
2691
342
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
342
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
342
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
740
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
740
    Datasource ds(data, size);
2689
740
    if ( parentDs != nullptr ) {
2690
740
        auto modifier = parentDs->GetData(0);
2691
740
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
740
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
740
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
42
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
42
    Datasource ds(data, size);
2689
42
    if ( parentDs != nullptr ) {
2690
42
        auto modifier = parentDs->GetData(0);
2691
42
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
42
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
42
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
292
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
292
    Datasource ds(data, size);
2689
292
    if ( parentDs != nullptr ) {
2690
292
        auto modifier = parentDs->GetData(0);
2691
292
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
292
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
292
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
288
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
288
    Datasource ds(data, size);
2689
288
    if ( parentDs != nullptr ) {
2690
288
        auto modifier = parentDs->GetData(0);
2691
288
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
288
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
288
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
29
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
29
    Datasource ds(data, size);
2689
29
    if ( parentDs != nullptr ) {
2690
29
        auto modifier = parentDs->GetData(0);
2691
29
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
29
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
29
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
325
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
325
    Datasource ds(data, size);
2689
325
    if ( parentDs != nullptr ) {
2690
325
        auto modifier = parentDs->GetData(0);
2691
325
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
325
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
325
}
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
376
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
376
    Datasource ds(data, size);
2689
376
    if ( parentDs != nullptr ) {
2690
376
        auto modifier = parentDs->GetData(0);
2691
376
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
376
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
376
}
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
257
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
257
    Datasource ds(data, size);
2689
257
    if ( parentDs != nullptr ) {
2690
257
        auto modifier = parentDs->GetData(0);
2691
257
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
257
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
257
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.42k
    Datasource ds(data, size);
2689
7.42k
    if ( parentDs != nullptr ) {
2690
7.42k
        auto modifier = parentDs->GetData(0);
2691
7.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.42k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.42k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.01k
    Datasource ds(data, size);
2689
5.01k
    if ( parentDs != nullptr ) {
2690
5.01k
        auto modifier = parentDs->GetData(0);
2691
5.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.01k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.01k
    Datasource ds(data, size);
2689
7.01k
    if ( parentDs != nullptr ) {
2690
7.01k
        auto modifier = parentDs->GetData(0);
2691
7.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.01k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.16k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.16k
    Datasource ds(data, size);
2689
1.16k
    if ( parentDs != nullptr ) {
2690
1.16k
        auto modifier = parentDs->GetData(0);
2691
1.16k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.16k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
8.99k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
8.99k
    Datasource ds(data, size);
2689
8.99k
    if ( parentDs != nullptr ) {
2690
8.99k
        auto modifier = parentDs->GetData(0);
2691
8.99k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
8.99k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
8.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
90
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
90
    Datasource ds(data, size);
2689
90
    if ( parentDs != nullptr ) {
2690
90
        auto modifier = parentDs->GetData(0);
2691
90
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
90
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
90
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
89
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
89
    Datasource ds(data, size);
2689
89
    if ( parentDs != nullptr ) {
2690
89
        auto modifier = parentDs->GetData(0);
2691
89
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
89
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
81
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
81
    Datasource ds(data, size);
2689
81
    if ( parentDs != nullptr ) {
2690
81
        auto modifier = parentDs->GetData(0);
2691
81
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
81
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
81
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
892
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
892
    Datasource ds(data, size);
2689
892
    if ( parentDs != nullptr ) {
2690
892
        auto modifier = parentDs->GetData(0);
2691
892
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
892
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
892
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.05k
    Datasource ds(data, size);
2689
6.05k
    if ( parentDs != nullptr ) {
2690
6.05k
        auto modifier = parentDs->GetData(0);
2691
6.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.05k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.05k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
61
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
61
    Datasource ds(data, size);
2689
61
    if ( parentDs != nullptr ) {
2690
61
        auto modifier = parentDs->GetData(0);
2691
61
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
61
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
61
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
72
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
72
    Datasource ds(data, size);
2689
72
    if ( parentDs != nullptr ) {
2690
72
        auto modifier = parentDs->GetData(0);
2691
72
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
72
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
73
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
73
    Datasource ds(data, size);
2689
73
    if ( parentDs != nullptr ) {
2690
73
        auto modifier = parentDs->GetData(0);
2691
73
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
73
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
72
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
72
    Datasource ds(data, size);
2689
72
    if ( parentDs != nullptr ) {
2690
72
        auto modifier = parentDs->GetData(0);
2691
72
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
72
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
140
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
140
    Datasource ds(data, size);
2689
140
    if ( parentDs != nullptr ) {
2690
140
        auto modifier = parentDs->GetData(0);
2691
140
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
140
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
140
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
105
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
105
    Datasource ds(data, size);
2689
105
    if ( parentDs != nullptr ) {
2690
105
        auto modifier = parentDs->GetData(0);
2691
105
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
105
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
105
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
90
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
90
    Datasource ds(data, size);
2689
90
    if ( parentDs != nullptr ) {
2690
90
        auto modifier = parentDs->GetData(0);
2691
90
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
90
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
90
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
97
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
97
    Datasource ds(data, size);
2689
97
    if ( parentDs != nullptr ) {
2690
97
        auto modifier = parentDs->GetData(0);
2691
97
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
97
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
97
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
122
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
122
    Datasource ds(data, size);
2689
122
    if ( parentDs != nullptr ) {
2690
122
        auto modifier = parentDs->GetData(0);
2691
122
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
122
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
122
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.24k
    Datasource ds(data, size);
2689
1.24k
    if ( parentDs != nullptr ) {
2690
1.24k
        auto modifier = parentDs->GetData(0);
2691
1.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::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<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.33k
    Datasource ds(data, size);
2689
2.33k
    if ( parentDs != nullptr ) {
2690
2.33k
        auto modifier = parentDs->GetData(0);
2691
2.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.33k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.36k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.36k
    Datasource ds(data, size);
2689
3.36k
    if ( parentDs != nullptr ) {
2690
3.36k
        auto modifier = parentDs->GetData(0);
2691
3.36k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.36k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
83
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
83
    Datasource ds(data, size);
2689
83
    if ( parentDs != nullptr ) {
2690
83
        auto modifier = parentDs->GetData(0);
2691
83
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
83
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
83
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.38k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.38k
    Datasource ds(data, size);
2689
4.38k
    if ( parentDs != nullptr ) {
2690
4.38k
        auto modifier = parentDs->GetData(0);
2691
4.38k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.38k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
279
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
279
    Datasource ds(data, size);
2689
279
    if ( parentDs != nullptr ) {
2690
279
        auto modifier = parentDs->GetData(0);
2691
279
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
279
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
279
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.50k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.50k
    Datasource ds(data, size);
2689
5.50k
    if ( parentDs != nullptr ) {
2690
5.50k
        auto modifier = parentDs->GetData(0);
2691
5.50k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.50k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.50k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
142
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
142
    Datasource ds(data, size);
2689
142
    if ( parentDs != nullptr ) {
2690
142
        auto modifier = parentDs->GetData(0);
2691
142
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
142
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
142
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.41k
    Datasource ds(data, size);
2689
4.41k
    if ( parentDs != nullptr ) {
2690
4.41k
        auto modifier = parentDs->GetData(0);
2691
4.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.41k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.01k
    Datasource ds(data, size);
2689
3.01k
    if ( parentDs != nullptr ) {
2690
3.01k
        auto modifier = parentDs->GetData(0);
2691
3.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.01k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
53.3k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
53.3k
    Datasource ds(data, size);
2689
53.3k
    if ( parentDs != nullptr ) {
2690
53.3k
        auto modifier = parentDs->GetData(0);
2691
53.3k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
53.3k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
53.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
176
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
176
    Datasource ds(data, size);
2689
176
    if ( parentDs != nullptr ) {
2690
176
        auto modifier = parentDs->GetData(0);
2691
176
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
176
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
176
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
679
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
679
    Datasource ds(data, size);
2689
679
    if ( parentDs != nullptr ) {
2690
679
        auto modifier = parentDs->GetData(0);
2691
679
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
679
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
679
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
101
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
101
    Datasource ds(data, size);
2689
101
    if ( parentDs != nullptr ) {
2690
101
        auto modifier = parentDs->GetData(0);
2691
101
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
101
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
101
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
90
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
90
    Datasource ds(data, size);
2689
90
    if ( parentDs != nullptr ) {
2690
90
        auto modifier = parentDs->GetData(0);
2691
90
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
90
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
90
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
96
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
96
    Datasource ds(data, size);
2689
96
    if ( parentDs != nullptr ) {
2690
96
        auto modifier = parentDs->GetData(0);
2691
96
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
96
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
96
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
77
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
77
    Datasource ds(data, size);
2689
77
    if ( parentDs != nullptr ) {
2690
77
        auto modifier = parentDs->GetData(0);
2691
77
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
77
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
201
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
201
    Datasource ds(data, size);
2689
201
    if ( parentDs != nullptr ) {
2690
201
        auto modifier = parentDs->GetData(0);
2691
201
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
201
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
201
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
154
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
154
    Datasource ds(data, size);
2689
154
    if ( parentDs != nullptr ) {
2690
154
        auto modifier = parentDs->GetData(0);
2691
154
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
154
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
154
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
194
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
194
    Datasource ds(data, size);
2689
194
    if ( parentDs != nullptr ) {
2690
194
        auto modifier = parentDs->GetData(0);
2691
194
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
194
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
194
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
173
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
173
    Datasource ds(data, size);
2689
173
    if ( parentDs != nullptr ) {
2690
173
        auto modifier = parentDs->GetData(0);
2691
173
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
173
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
173
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
89
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
89
    Datasource ds(data, size);
2689
89
    if ( parentDs != nullptr ) {
2690
89
        auto modifier = parentDs->GetData(0);
2691
89
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
89
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
89
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
89
    Datasource ds(data, size);
2689
89
    if ( parentDs != nullptr ) {
2690
89
        auto modifier = parentDs->GetData(0);
2691
89
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
89
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
91
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
91
    Datasource ds(data, size);
2689
91
    if ( parentDs != nullptr ) {
2690
91
        auto modifier = parentDs->GetData(0);
2691
91
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
91
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
91
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
77
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
77
    Datasource ds(data, size);
2689
77
    if ( parentDs != nullptr ) {
2690
77
        auto modifier = parentDs->GetData(0);
2691
77
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
77
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
81
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
81
    Datasource ds(data, size);
2689
81
    if ( parentDs != nullptr ) {
2690
81
        auto modifier = parentDs->GetData(0);
2691
81
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
81
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
73
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
73
    Datasource ds(data, size);
2689
73
    if ( parentDs != nullptr ) {
2690
73
        auto modifier = parentDs->GetData(0);
2691
73
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
73
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
72
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
72
    Datasource ds(data, size);
2689
72
    if ( parentDs != nullptr ) {
2690
72
        auto modifier = parentDs->GetData(0);
2691
72
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
72
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
110
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
110
    Datasource ds(data, size);
2689
110
    if ( parentDs != nullptr ) {
2690
110
        auto modifier = parentDs->GetData(0);
2691
110
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
110
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
110
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
115
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
115
    Datasource ds(data, size);
2689
115
    if ( parentDs != nullptr ) {
2690
115
        auto modifier = parentDs->GetData(0);
2691
115
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
115
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
68
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
68
    Datasource ds(data, size);
2689
68
    if ( parentDs != nullptr ) {
2690
68
        auto modifier = parentDs->GetData(0);
2691
68
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
68
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
68
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
68
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
68
    Datasource ds(data, size);
2689
68
    if ( parentDs != nullptr ) {
2690
68
        auto modifier = parentDs->GetData(0);
2691
68
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
68
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
68
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
79
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
79
    Datasource ds(data, size);
2689
79
    if ( parentDs != nullptr ) {
2690
79
        auto modifier = parentDs->GetData(0);
2691
79
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
79
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
86
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
86
    Datasource ds(data, size);
2689
86
    if ( parentDs != nullptr ) {
2690
86
        auto modifier = parentDs->GetData(0);
2691
86
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
86
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
80
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
80
    Datasource ds(data, size);
2689
80
    if ( parentDs != nullptr ) {
2690
80
        auto modifier = parentDs->GetData(0);
2691
80
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
80
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
137
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
137
    Datasource ds(data, size);
2689
137
    if ( parentDs != nullptr ) {
2690
137
        auto modifier = parentDs->GetData(0);
2691
137
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
137
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
137
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
104
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
104
    Datasource ds(data, size);
2689
104
    if ( parentDs != nullptr ) {
2690
104
        auto modifier = parentDs->GetData(0);
2691
104
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
104
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
104
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
160
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
160
    Datasource ds(data, size);
2689
160
    if ( parentDs != nullptr ) {
2690
160
        auto modifier = parentDs->GetData(0);
2691
160
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
160
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
160
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
115
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
115
    Datasource ds(data, size);
2689
115
    if ( parentDs != nullptr ) {
2690
115
        auto modifier = parentDs->GetData(0);
2691
115
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
115
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
219
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
219
    Datasource ds(data, size);
2689
219
    if ( parentDs != nullptr ) {
2690
219
        auto modifier = parentDs->GetData(0);
2691
219
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
219
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
219
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
138
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
138
    Datasource ds(data, size);
2689
138
    if ( parentDs != nullptr ) {
2690
138
        auto modifier = parentDs->GetData(0);
2691
138
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
138
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
138
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
220
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
220
    Datasource ds(data, size);
2689
220
    if ( parentDs != nullptr ) {
2690
220
        auto modifier = parentDs->GetData(0);
2691
220
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
220
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
220
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
128
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
128
    Datasource ds(data, size);
2689
128
    if ( parentDs != nullptr ) {
2690
128
        auto modifier = parentDs->GetData(0);
2691
128
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
128
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
128
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
218
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
218
    Datasource ds(data, size);
2689
218
    if ( parentDs != nullptr ) {
2690
218
        auto modifier = parentDs->GetData(0);
2691
218
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
218
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
218
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
78
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
78
    Datasource ds(data, size);
2689
78
    if ( parentDs != nullptr ) {
2690
78
        auto modifier = parentDs->GetData(0);
2691
78
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
78
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
130
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
130
    Datasource ds(data, size);
2689
130
    if ( parentDs != nullptr ) {
2690
130
        auto modifier = parentDs->GetData(0);
2691
130
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
130
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
130
}
2696
2697
template <class ResultType, class OperationType>
2698
132k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
132k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
132k
    if ( options.forceModule != std::nullopt ) {
2703
130k
        moduleID = *options.forceModule;
2704
130k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
132k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
132k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
132k
    return modules.at(moduleID);
2716
132k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::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
1.02k
        moduleID = *options.forceModule;
2704
1.02k
    }
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
0
        return nullptr;
2713
0
    }
2714
2715
1.03k
    return modules.at(moduleID);
2716
1.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::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
933
        moduleID = *options.forceModule;
2704
933
    }
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
0
        return nullptr;
2713
0
    }
2714
2715
938
    return modules.at(moduleID);
2716
938
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
258
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
258
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
258
    if ( options.forceModule != std::nullopt ) {
2703
251
        moduleID = *options.forceModule;
2704
251
    }
2705
2706
    /* Skip if this is a disabled module */
2707
258
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
258
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
258
    return modules.at(moduleID);
2716
258
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
799
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
799
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
799
    if ( options.forceModule != std::nullopt ) {
2703
793
        moduleID = *options.forceModule;
2704
793
    }
2705
2706
    /* Skip if this is a disabled module */
2707
799
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
799
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
799
    return modules.at(moduleID);
2716
799
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.81k
    if ( options.forceModule != std::nullopt ) {
2703
2.80k
        moduleID = *options.forceModule;
2704
2.80k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.81k
    return modules.at(moduleID);
2716
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.29k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.29k
    if ( options.forceModule != std::nullopt ) {
2703
1.28k
        moduleID = *options.forceModule;
2704
1.28k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.29k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.29k
    return modules.at(moduleID);
2716
1.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
267
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
267
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
267
    if ( options.forceModule != std::nullopt ) {
2703
262
        moduleID = *options.forceModule;
2704
262
    }
2705
2706
    /* Skip if this is a disabled module */
2707
267
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
267
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
267
    return modules.at(moduleID);
2716
267
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
896
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
896
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
896
    if ( options.forceModule != std::nullopt ) {
2703
891
        moduleID = *options.forceModule;
2704
891
    }
2705
2706
    /* Skip if this is a disabled module */
2707
896
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
896
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
896
    return modules.at(moduleID);
2716
896
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
285
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
285
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
285
    if ( options.forceModule != std::nullopt ) {
2703
279
        moduleID = *options.forceModule;
2704
279
    }
2705
2706
    /* Skip if this is a disabled module */
2707
285
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
285
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
285
    return modules.at(moduleID);
2716
285
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
278
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
278
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
278
    if ( options.forceModule != std::nullopt ) {
2703
273
        moduleID = *options.forceModule;
2704
273
    }
2705
2706
    /* Skip if this is a disabled module */
2707
278
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
278
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
278
    return modules.at(moduleID);
2716
278
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
330
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
330
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
330
    if ( options.forceModule != std::nullopt ) {
2703
324
        moduleID = *options.forceModule;
2704
324
    }
2705
2706
    /* Skip if this is a disabled module */
2707
330
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
330
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
330
    return modules.at(moduleID);
2716
330
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
728
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
728
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
728
    if ( options.forceModule != std::nullopt ) {
2703
723
        moduleID = *options.forceModule;
2704
723
    }
2705
2706
    /* Skip if this is a disabled module */
2707
728
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
728
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
728
    return modules.at(moduleID);
2716
728
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
37
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
37
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
37
    if ( options.forceModule != std::nullopt ) {
2703
34
        moduleID = *options.forceModule;
2704
34
    }
2705
2706
    /* Skip if this is a disabled module */
2707
37
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
37
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
37
    return modules.at(moduleID);
2716
37
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
281
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
281
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
281
    if ( options.forceModule != std::nullopt ) {
2703
273
        moduleID = *options.forceModule;
2704
273
    }
2705
2706
    /* Skip if this is a disabled module */
2707
281
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
281
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
281
    return modules.at(moduleID);
2716
281
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
278
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
278
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
278
    if ( options.forceModule != std::nullopt ) {
2703
272
        moduleID = *options.forceModule;
2704
272
    }
2705
2706
    /* Skip if this is a disabled module */
2707
278
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
278
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
278
    return modules.at(moduleID);
2716
278
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
24
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
24
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
24
    if ( options.forceModule != std::nullopt ) {
2703
21
        moduleID = *options.forceModule;
2704
21
    }
2705
2706
    /* Skip if this is a disabled module */
2707
24
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
24
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
24
    return modules.at(moduleID);
2716
24
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
316
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
316
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
316
    if ( options.forceModule != std::nullopt ) {
2703
309
        moduleID = *options.forceModule;
2704
309
    }
2705
2706
    /* Skip if this is a disabled module */
2707
316
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
316
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
316
    return modules.at(moduleID);
2716
316
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
366
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
366
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
366
    if ( options.forceModule != std::nullopt ) {
2703
357
        moduleID = *options.forceModule;
2704
357
    }
2705
2706
    /* Skip if this is a disabled module */
2707
366
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
366
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
366
    return modules.at(moduleID);
2716
366
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
244
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
244
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
244
    if ( options.forceModule != std::nullopt ) {
2703
239
        moduleID = *options.forceModule;
2704
239
    }
2705
2706
    /* Skip if this is a disabled module */
2707
244
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
244
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
244
    return modules.at(moduleID);
2716
244
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.36k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.36k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.36k
    if ( options.forceModule != std::nullopt ) {
2703
7.27k
        moduleID = *options.forceModule;
2704
7.27k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.36k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.36k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7.36k
    return modules.at(moduleID);
2716
7.36k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.94k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.94k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.94k
    if ( options.forceModule != std::nullopt ) {
2703
4.80k
        moduleID = *options.forceModule;
2704
4.80k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.94k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.94k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.94k
    return modules.at(moduleID);
2716
4.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.97k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.97k
    if ( options.forceModule != std::nullopt ) {
2703
6.90k
        moduleID = *options.forceModule;
2704
6.90k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.97k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
6.97k
    return modules.at(moduleID);
2716
6.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::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
1.05k
        moduleID = *options.forceModule;
2704
1.05k
    }
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
0
        return nullptr;
2713
0
    }
2714
2715
1.10k
    return modules.at(moduleID);
2716
1.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
8.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
8.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
8.92k
    if ( options.forceModule != std::nullopt ) {
2703
8.87k
        moduleID = *options.forceModule;
2704
8.87k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
8.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
8.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
8.92k
    return modules.at(moduleID);
2716
8.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
82
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
82
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
82
    if ( options.forceModule != std::nullopt ) {
2703
78
        moduleID = *options.forceModule;
2704
78
    }
2705
2706
    /* Skip if this is a disabled module */
2707
82
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
82
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
82
    return modules.at(moduleID);
2716
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
80
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
80
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
80
    if ( options.forceModule != std::nullopt ) {
2703
76
        moduleID = *options.forceModule;
2704
76
    }
2705
2706
    /* Skip if this is a disabled module */
2707
80
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
80
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
80
    return modules.at(moduleID);
2716
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
75
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
75
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
75
    if ( options.forceModule != std::nullopt ) {
2703
70
        moduleID = *options.forceModule;
2704
70
    }
2705
2706
    /* Skip if this is a disabled module */
2707
75
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
75
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
75
    return modules.at(moduleID);
2716
75
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
805
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
805
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
805
    if ( options.forceModule != std::nullopt ) {
2703
740
        moduleID = *options.forceModule;
2704
740
    }
2705
2706
    /* Skip if this is a disabled module */
2707
805
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
805
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
805
    return modules.at(moduleID);
2716
805
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.97k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.97k
    if ( options.forceModule != std::nullopt ) {
2703
5.89k
        moduleID = *options.forceModule;
2704
5.89k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.97k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5.97k
    return modules.at(moduleID);
2716
5.97k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
57
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
57
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
57
    if ( options.forceModule != std::nullopt ) {
2703
52
        moduleID = *options.forceModule;
2704
52
    }
2705
2706
    /* Skip if this is a disabled module */
2707
57
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
57
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
57
    return modules.at(moduleID);
2716
57
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
67
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
67
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
67
    if ( options.forceModule != std::nullopt ) {
2703
62
        moduleID = *options.forceModule;
2704
62
    }
2705
2706
    /* Skip if this is a disabled module */
2707
67
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
67
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
67
    return modules.at(moduleID);
2716
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
66
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
66
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
66
    if ( options.forceModule != std::nullopt ) {
2703
62
        moduleID = *options.forceModule;
2704
62
    }
2705
2706
    /* Skip if this is a disabled module */
2707
66
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
66
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
66
    return modules.at(moduleID);
2716
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
68
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
68
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
68
    if ( options.forceModule != std::nullopt ) {
2703
63
        moduleID = *options.forceModule;
2704
63
    }
2705
2706
    /* Skip if this is a disabled module */
2707
68
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
68
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
68
    return modules.at(moduleID);
2716
68
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
129
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
129
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
129
    if ( options.forceModule != std::nullopt ) {
2703
125
        moduleID = *options.forceModule;
2704
125
    }
2705
2706
    /* Skip if this is a disabled module */
2707
129
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
129
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
129
    return modules.at(moduleID);
2716
129
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
97
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
97
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
97
    if ( options.forceModule != std::nullopt ) {
2703
91
        moduleID = *options.forceModule;
2704
91
    }
2705
2706
    /* Skip if this is a disabled module */
2707
97
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
97
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
97
    return modules.at(moduleID);
2716
97
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
85
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
85
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
85
    if ( options.forceModule != std::nullopt ) {
2703
76
        moduleID = *options.forceModule;
2704
76
    }
2705
2706
    /* Skip if this is a disabled module */
2707
85
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
85
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
85
    return modules.at(moduleID);
2716
85
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
82
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
82
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
82
    if ( options.forceModule != std::nullopt ) {
2703
77
        moduleID = *options.forceModule;
2704
77
    }
2705
2706
    /* Skip if this is a disabled module */
2707
82
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
82
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
82
    return modules.at(moduleID);
2716
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
113
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
113
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
113
    if ( options.forceModule != std::nullopt ) {
2703
107
        moduleID = *options.forceModule;
2704
107
    }
2705
2706
    /* Skip if this is a disabled module */
2707
113
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
113
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
113
    return modules.at(moduleID);
2716
113
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.19k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.19k
    if ( options.forceModule != std::nullopt ) {
2703
1.13k
        moduleID = *options.forceModule;
2704
1.13k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.19k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.19k
    return modules.at(moduleID);
2716
1.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.08k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.08k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.08k
    if ( options.forceModule != std::nullopt ) {
2703
2.00k
        moduleID = *options.forceModule;
2704
2.00k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.08k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.08k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.08k
    return modules.at(moduleID);
2716
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::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
2.18k
        moduleID = *options.forceModule;
2704
2.18k
    }
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
0
        return nullptr;
2713
0
    }
2714
2715
2.26k
    return modules.at(moduleID);
2716
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.24k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.24k
    if ( options.forceModule != std::nullopt ) {
2703
3.16k
        moduleID = *options.forceModule;
2704
3.16k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.24k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3.24k
    return modules.at(moduleID);
2716
3.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
76
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
76
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
76
    if ( options.forceModule != std::nullopt ) {
2703
70
        moduleID = *options.forceModule;
2704
70
    }
2705
2706
    /* Skip if this is a disabled module */
2707
76
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
76
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
76
    return modules.at(moduleID);
2716
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.29k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.29k
    if ( options.forceModule != std::nullopt ) {
2703
4.23k
        moduleID = *options.forceModule;
2704
4.23k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.29k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.29k
    return modules.at(moduleID);
2716
4.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
274
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
274
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
274
    if ( options.forceModule != std::nullopt ) {
2703
269
        moduleID = *options.forceModule;
2704
269
    }
2705
2706
    /* Skip if this is a disabled module */
2707
274
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
274
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
274
    return modules.at(moduleID);
2716
274
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.40k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.40k
    if ( options.forceModule != std::nullopt ) {
2703
5.28k
        moduleID = *options.forceModule;
2704
5.28k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.40k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5.40k
    return modules.at(moduleID);
2716
5.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
135
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
135
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
135
    if ( options.forceModule != std::nullopt ) {
2703
129
        moduleID = *options.forceModule;
2704
129
    }
2705
2706
    /* Skip if this is a disabled module */
2707
135
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
135
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
135
    return modules.at(moduleID);
2716
135
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.31k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.31k
    if ( options.forceModule != std::nullopt ) {
2703
4.22k
        moduleID = *options.forceModule;
2704
4.22k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.31k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.31k
    return modules.at(moduleID);
2716
4.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.91k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.91k
    if ( options.forceModule != std::nullopt ) {
2703
2.82k
        moduleID = *options.forceModule;
2704
2.82k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.91k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.91k
    return modules.at(moduleID);
2716
2.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
53.2k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
53.2k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
53.2k
    if ( options.forceModule != std::nullopt ) {
2703
53.0k
        moduleID = *options.forceModule;
2704
53.0k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
53.2k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
53.2k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
53.2k
    return modules.at(moduleID);
2716
53.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
167
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
167
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
167
    if ( options.forceModule != std::nullopt ) {
2703
163
        moduleID = *options.forceModule;
2704
163
    }
2705
2706
    /* Skip if this is a disabled module */
2707
167
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
167
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
167
    return modules.at(moduleID);
2716
167
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
663
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
663
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
663
    if ( options.forceModule != std::nullopt ) {
2703
658
        moduleID = *options.forceModule;
2704
658
    }
2705
2706
    /* Skip if this is a disabled module */
2707
663
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
663
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
663
    return modules.at(moduleID);
2716
663
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
94
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
94
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
94
    if ( options.forceModule != std::nullopt ) {
2703
89
        moduleID = *options.forceModule;
2704
89
    }
2705
2706
    /* Skip if this is a disabled module */
2707
94
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
94
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
94
    return modules.at(moduleID);
2716
94
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
85
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
85
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
85
    if ( options.forceModule != std::nullopt ) {
2703
81
        moduleID = *options.forceModule;
2704
81
    }
2705
2706
    /* Skip if this is a disabled module */
2707
85
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
85
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
85
    return modules.at(moduleID);
2716
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
86
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
86
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
86
    if ( options.forceModule != std::nullopt ) {
2703
82
        moduleID = *options.forceModule;
2704
82
    }
2705
2706
    /* Skip if this is a disabled module */
2707
86
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
86
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
86
    return modules.at(moduleID);
2716
86
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
66
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
66
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
66
    if ( options.forceModule != std::nullopt ) {
2703
64
        moduleID = *options.forceModule;
2704
64
    }
2705
2706
    /* Skip if this is a disabled module */
2707
66
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
66
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
66
    return modules.at(moduleID);
2716
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
152
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
152
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
152
    if ( options.forceModule != std::nullopt ) {
2703
128
        moduleID = *options.forceModule;
2704
128
    }
2705
2706
    /* Skip if this is a disabled module */
2707
152
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
152
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
152
    return modules.at(moduleID);
2716
152
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
136
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
136
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
136
    if ( options.forceModule != std::nullopt ) {
2703
121
        moduleID = *options.forceModule;
2704
121
    }
2705
2706
    /* Skip if this is a disabled module */
2707
136
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
136
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
136
    return modules.at(moduleID);
2716
136
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
134
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
134
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
134
    if ( options.forceModule != std::nullopt ) {
2703
120
        moduleID = *options.forceModule;
2704
120
    }
2705
2706
    /* Skip if this is a disabled module */
2707
134
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
134
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
134
    return modules.at(moduleID);
2716
134
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
140
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
140
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
140
    if ( options.forceModule != std::nullopt ) {
2703
127
        moduleID = *options.forceModule;
2704
127
    }
2705
2706
    /* Skip if this is a disabled module */
2707
140
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
140
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
140
    return modules.at(moduleID);
2716
140
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
80
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
80
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
80
    if ( options.forceModule != std::nullopt ) {
2703
76
        moduleID = *options.forceModule;
2704
76
    }
2705
2706
    /* Skip if this is a disabled module */
2707
80
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
80
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
80
    return modules.at(moduleID);
2716
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
80
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
80
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
80
    if ( options.forceModule != std::nullopt ) {
2703
74
        moduleID = *options.forceModule;
2704
74
    }
2705
2706
    /* Skip if this is a disabled module */
2707
80
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
80
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
80
    return modules.at(moduleID);
2716
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
81
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
81
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
81
    if ( options.forceModule != std::nullopt ) {
2703
77
        moduleID = *options.forceModule;
2704
77
    }
2705
2706
    /* Skip if this is a disabled module */
2707
81
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
81
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
81
    return modules.at(moduleID);
2716
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
71
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
71
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
71
    if ( options.forceModule != std::nullopt ) {
2703
67
        moduleID = *options.forceModule;
2704
67
    }
2705
2706
    /* Skip if this is a disabled module */
2707
71
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
71
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
71
    return modules.at(moduleID);
2716
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
73
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
73
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
73
    if ( options.forceModule != std::nullopt ) {
2703
69
        moduleID = *options.forceModule;
2704
69
    }
2705
2706
    /* Skip if this is a disabled module */
2707
73
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
73
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
73
    return modules.at(moduleID);
2716
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
67
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
67
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
67
    if ( options.forceModule != std::nullopt ) {
2703
63
        moduleID = *options.forceModule;
2704
63
    }
2705
2706
    /* Skip if this is a disabled module */
2707
67
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
67
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
67
    return modules.at(moduleID);
2716
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
67
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
67
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
67
    if ( options.forceModule != std::nullopt ) {
2703
64
        moduleID = *options.forceModule;
2704
64
    }
2705
2706
    /* Skip if this is a disabled module */
2707
67
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
67
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
67
    return modules.at(moduleID);
2716
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
103
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
103
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
103
    if ( options.forceModule != std::nullopt ) {
2703
96
        moduleID = *options.forceModule;
2704
96
    }
2705
2706
    /* Skip if this is a disabled module */
2707
103
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
103
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
103
    return modules.at(moduleID);
2716
103
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
109
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
109
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
109
    if ( options.forceModule != std::nullopt ) {
2703
103
        moduleID = *options.forceModule;
2704
103
    }
2705
2706
    /* Skip if this is a disabled module */
2707
109
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
109
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
109
    return modules.at(moduleID);
2716
109
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
62
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
62
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
62
    if ( options.forceModule != std::nullopt ) {
2703
58
        moduleID = *options.forceModule;
2704
58
    }
2705
2706
    /* Skip if this is a disabled module */
2707
62
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
62
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
62
    return modules.at(moduleID);
2716
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
65
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
65
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
65
    if ( options.forceModule != std::nullopt ) {
2703
61
        moduleID = *options.forceModule;
2704
61
    }
2705
2706
    /* Skip if this is a disabled module */
2707
65
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
65
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
65
    return modules.at(moduleID);
2716
65
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
72
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
72
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
72
    if ( options.forceModule != std::nullopt ) {
2703
68
        moduleID = *options.forceModule;
2704
68
    }
2705
2706
    /* Skip if this is a disabled module */
2707
72
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
72
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
72
    return modules.at(moduleID);
2716
72
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
81
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
81
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
81
    if ( options.forceModule != std::nullopt ) {
2703
74
        moduleID = *options.forceModule;
2704
74
    }
2705
2706
    /* Skip if this is a disabled module */
2707
81
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
81
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
81
    return modules.at(moduleID);
2716
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
74
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
74
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
74
    if ( options.forceModule != std::nullopt ) {
2703
70
        moduleID = *options.forceModule;
2704
70
    }
2705
2706
    /* Skip if this is a disabled module */
2707
74
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
74
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
74
    return modules.at(moduleID);
2716
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
130
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
130
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
130
    if ( options.forceModule != std::nullopt ) {
2703
126
        moduleID = *options.forceModule;
2704
126
    }
2705
2706
    /* Skip if this is a disabled module */
2707
130
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
130
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
130
    return modules.at(moduleID);
2716
130
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
99
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
99
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
99
    if ( options.forceModule != std::nullopt ) {
2703
96
        moduleID = *options.forceModule;
2704
96
    }
2705
2706
    /* Skip if this is a disabled module */
2707
99
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
99
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
99
    return modules.at(moduleID);
2716
99
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
154
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
154
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
154
    if ( options.forceModule != std::nullopt ) {
2703
150
        moduleID = *options.forceModule;
2704
150
    }
2705
2706
    /* Skip if this is a disabled module */
2707
154
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
154
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
154
    return modules.at(moduleID);
2716
154
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
110
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
110
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
110
    if ( options.forceModule != std::nullopt ) {
2703
101
        moduleID = *options.forceModule;
2704
101
    }
2705
2706
    /* Skip if this is a disabled module */
2707
110
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
110
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
110
    return modules.at(moduleID);
2716
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
209
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
209
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
209
    if ( options.forceModule != std::nullopt ) {
2703
206
        moduleID = *options.forceModule;
2704
206
    }
2705
2706
    /* Skip if this is a disabled module */
2707
209
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
209
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
209
    return modules.at(moduleID);
2716
209
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
134
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
134
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
134
    if ( options.forceModule != std::nullopt ) {
2703
129
        moduleID = *options.forceModule;
2704
129
    }
2705
2706
    /* Skip if this is a disabled module */
2707
134
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
134
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
134
    return modules.at(moduleID);
2716
134
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
209
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
209
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
209
    if ( options.forceModule != std::nullopt ) {
2703
203
        moduleID = *options.forceModule;
2704
203
    }
2705
2706
    /* Skip if this is a disabled module */
2707
209
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
209
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
209
    return modules.at(moduleID);
2716
209
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
121
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
121
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
121
    if ( options.forceModule != std::nullopt ) {
2703
115
        moduleID = *options.forceModule;
2704
115
    }
2705
2706
    /* Skip if this is a disabled module */
2707
121
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
121
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
121
    return modules.at(moduleID);
2716
121
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
190
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
190
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
190
    if ( options.forceModule != std::nullopt ) {
2703
169
        moduleID = *options.forceModule;
2704
169
    }
2705
2706
    /* Skip if this is a disabled module */
2707
190
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
190
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
190
    return modules.at(moduleID);
2716
190
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
72
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
72
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
72
    if ( options.forceModule != std::nullopt ) {
2703
68
        moduleID = *options.forceModule;
2704
68
    }
2705
2706
    /* Skip if this is a disabled module */
2707
72
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
72
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
72
    return modules.at(moduleID);
2716
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
113
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
113
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
113
    if ( options.forceModule != std::nullopt ) {
2703
91
        moduleID = *options.forceModule;
2704
91
    }
2705
2706
    /* Skip if this is a disabled module */
2707
113
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
113
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
113
    return modules.at(moduleID);
2716
113
}
2717
2718
template <class ResultType, class OperationType>
2719
83.2k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
83.2k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
83.2k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
134k
    do {
2725
134k
        auto op = getOp(&parentDs, data, size);
2726
134k
        auto module = getModule(parentDs);
2727
134k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
134k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
134k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2.39k
            break;
2736
2.39k
        }
2737
134k
    } while ( parentDs.Get<bool>() == true );
2738
2739
83.2k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
83.2k
#if 1
2745
83.2k
    {
2746
83.2k
        std::set<uint64_t> moduleIDs;
2747
83.2k
        for (const auto& m : modules ) {
2748
78.3k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78.3k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78.3k
            moduleIDs.insert(moduleID);
2756
78.3k
        }
2757
2758
83.2k
        std::set<uint64_t> operationModuleIDs;
2759
123k
        for (const auto& op : operations) {
2760
123k
            operationModuleIDs.insert(op.first->ID);
2761
123k
        }
2762
2763
83.2k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
83.2k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
83.2k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
83.2k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
83.2k
    }
2771
83.2k
#endif
2772
2773
83.2k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
83.2k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
206k
    for (size_t i = 0; i < operations.size(); i++) {
2781
123k
        auto& operation = operations[i];
2782
2783
123k
        auto& module = operation.first;
2784
123k
        auto& op = operation.second;
2785
2786
123k
        if ( i > 0 ) {
2787
44.8k
            auto& prevModule = operations[i-1].first;
2788
44.8k
            auto& prevOp = operations[i].second;
2789
2790
44.8k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44.8k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44.8k
                if ( curModifier.size() == 0 ) {
2793
7.48M
                    for (size_t j = 0; j < 512; j++) {
2794
7.46M
                        curModifier.push_back(1);
2795
7.46M
                    }
2796
30.2k
                } else {
2797
7.79M
                    for (auto& c : curModifier) {
2798
7.79M
                        c++;
2799
7.79M
                    }
2800
30.2k
                }
2801
44.8k
            }
2802
44.8k
        }
2803
2804
123k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
123k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
123k
        const auto& result = results.back();
2811
2812
123k
        if ( result.second != std::nullopt ) {
2813
40.3k
            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.3k
        }
2820
2821
123k
        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
123k
        if ( options.disableTests == false ) {
2830
123k
            tests::test(op, result.second);
2831
123k
        }
2832
2833
123k
        postprocess(module, op, result);
2834
123k
    }
2835
2836
83.2k
    if ( options.noCompare == false ) {
2837
78.3k
        compare(operations, results, data, size);
2838
78.3k
    }
2839
83.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
333
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
333
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
333
    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
0
            continue;
2729
0
        }
2730
2731
1.04k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.04k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
1.04k
    } while ( parentDs.Get<bool>() == true );
2738
2739
333
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
333
#if 1
2745
333
    {
2746
333
        std::set<uint64_t> moduleIDs;
2747
333
        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
333
        std::set<uint64_t> operationModuleIDs;
2759
879
        for (const auto& op : operations) {
2760
879
            operationModuleIDs.insert(op.first->ID);
2761
879
        }
2762
2763
333
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
333
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
333
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
333
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
333
    }
2771
333
#endif
2772
2773
333
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
333
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.21k
    for (size_t i = 0; i < operations.size(); i++) {
2781
879
        auto& operation = operations[i];
2782
2783
879
        auto& module = operation.first;
2784
879
        auto& op = operation.second;
2785
2786
879
        if ( i > 0 ) {
2787
573
            auto& prevModule = operations[i-1].first;
2788
573
            auto& prevOp = operations[i].second;
2789
2790
573
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
573
                auto& curModifier = op.modifier.GetVectorPtr();
2792
573
                if ( curModifier.size() == 0 ) {
2793
213k
                    for (size_t j = 0; j < 512; j++) {
2794
213k
                        curModifier.push_back(1);
2795
213k
                    }
2796
417
                } else {
2797
72.4k
                    for (auto& c : curModifier) {
2798
72.4k
                        c++;
2799
72.4k
                    }
2800
156
                }
2801
573
            }
2802
573
        }
2803
2804
879
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
879
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
879
        const auto& result = results.back();
2811
2812
879
        if ( result.second != std::nullopt ) {
2813
598
            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
598
        }
2820
2821
879
        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
879
        if ( options.disableTests == false ) {
2830
879
            tests::test(op, result.second);
2831
879
        }
2832
2833
879
        postprocess(module, op, result);
2834
879
    }
2835
2836
333
    if ( options.noCompare == false ) {
2837
306
        compare(operations, results, data, size);
2838
306
    }
2839
333
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
216
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
216
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
216
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
948
    do {
2725
948
        auto op = getOp(&parentDs, data, size);
2726
948
        auto module = getModule(parentDs);
2727
948
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
948
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
948
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
948
    } while ( parentDs.Get<bool>() == true );
2738
2739
216
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
216
#if 1
2745
216
    {
2746
216
        std::set<uint64_t> moduleIDs;
2747
216
        for (const auto& m : modules ) {
2748
194
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
194
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
194
            moduleIDs.insert(moduleID);
2756
194
        }
2757
2758
216
        std::set<uint64_t> operationModuleIDs;
2759
814
        for (const auto& op : operations) {
2760
814
            operationModuleIDs.insert(op.first->ID);
2761
814
        }
2762
2763
216
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
216
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
216
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
216
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
216
    }
2771
216
#endif
2772
2773
216
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
216
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.03k
    for (size_t i = 0; i < operations.size(); i++) {
2781
814
        auto& operation = operations[i];
2782
2783
814
        auto& module = operation.first;
2784
814
        auto& op = operation.second;
2785
2786
814
        if ( i > 0 ) {
2787
620
            auto& prevModule = operations[i-1].first;
2788
620
            auto& prevOp = operations[i].second;
2789
2790
620
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
620
                auto& curModifier = op.modifier.GetVectorPtr();
2792
620
                if ( curModifier.size() == 0 ) {
2793
209k
                    for (size_t j = 0; j < 512; j++) {
2794
209k
                        curModifier.push_back(1);
2795
209k
                    }
2796
409
                } else {
2797
117k
                    for (auto& c : curModifier) {
2798
117k
                        c++;
2799
117k
                    }
2800
211
                }
2801
620
            }
2802
620
        }
2803
2804
814
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
814
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
814
        const auto& result = results.back();
2811
2812
814
        if ( result.second != std::nullopt ) {
2813
367
            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
367
        }
2820
2821
814
        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
814
        if ( options.disableTests == false ) {
2830
814
            tests::test(op, result.second);
2831
814
        }
2832
2833
814
        postprocess(module, op, result);
2834
814
    }
2835
2836
216
    if ( options.noCompare == false ) {
2837
194
        compare(operations, results, data, size);
2838
194
    }
2839
216
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
50
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
50
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
50
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
268
    do {
2725
268
        auto op = getOp(&parentDs, data, size);
2726
268
        auto module = getModule(parentDs);
2727
268
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
1
            break;
2736
1
        }
2737
268
    } while ( parentDs.Get<bool>() == true );
2738
2739
50
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
50
        for (const auto& m : modules ) {
2748
25
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
25
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
25
            moduleIDs.insert(moduleID);
2756
25
        }
2757
2758
50
        std::set<uint64_t> operationModuleIDs;
2759
158
        for (const auto& op : operations) {
2760
158
            operationModuleIDs.insert(op.first->ID);
2761
158
        }
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
50
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
208
    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
133
            auto& prevModule = operations[i-1].first;
2788
133
            auto& prevOp = operations[i].second;
2789
2790
133
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
133
                auto& curModifier = op.modifier.GetVectorPtr();
2792
133
                if ( curModifier.size() == 0 ) {
2793
46.6k
                    for (size_t j = 0; j < 512; j++) {
2794
46.5k
                        curModifier.push_back(1);
2795
46.5k
                    }
2796
91
                } else {
2797
261
                    for (auto& c : curModifier) {
2798
261
                        c++;
2799
261
                    }
2800
42
                }
2801
133
            }
2802
133
        }
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
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
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
50
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
192
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
192
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
192
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
806
    do {
2725
806
        auto op = getOp(&parentDs, data, size);
2726
806
        auto module = getModule(parentDs);
2727
806
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
806
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
806
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
806
    } while ( parentDs.Get<bool>() == true );
2738
2739
192
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
192
        for (const auto& m : modules ) {
2748
172
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
172
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
172
            moduleIDs.insert(moduleID);
2756
172
        }
2757
2758
192
        std::set<uint64_t> operationModuleIDs;
2759
715
        for (const auto& op : operations) {
2760
715
            operationModuleIDs.insert(op.first->ID);
2761
715
        }
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
192
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
907
    for (size_t i = 0; i < operations.size(); i++) {
2781
715
        auto& operation = operations[i];
2782
2783
715
        auto& module = operation.first;
2784
715
        auto& op = operation.second;
2785
2786
715
        if ( i > 0 ) {
2787
543
            auto& prevModule = operations[i-1].first;
2788
543
            auto& prevOp = operations[i].second;
2789
2790
543
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
543
                auto& curModifier = op.modifier.GetVectorPtr();
2792
543
                if ( curModifier.size() == 0 ) {
2793
215k
                    for (size_t j = 0; j < 512; j++) {
2794
215k
                        curModifier.push_back(1);
2795
215k
                    }
2796
421
                } else {
2797
4.76k
                    for (auto& c : curModifier) {
2798
4.76k
                        c++;
2799
4.76k
                    }
2800
122
                }
2801
543
            }
2802
543
        }
2803
2804
715
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
715
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
715
        const auto& result = results.back();
2811
2812
715
        if ( result.second != std::nullopt ) {
2813
264
            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
264
        }
2820
2821
715
        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
715
        if ( options.disableTests == false ) {
2830
715
            tests::test(op, result.second);
2831
715
        }
2832
2833
715
        postprocess(module, op, result);
2834
715
    }
2835
2836
192
    if ( options.noCompare == false ) {
2837
172
        compare(operations, results, data, size);
2838
172
    }
2839
192
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
876
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
876
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
876
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.82k
    do {
2725
2.82k
        auto op = getOp(&parentDs, data, size);
2726
2.82k
        auto module = getModule(parentDs);
2727
2.82k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2.82k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.82k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.82k
    } while ( parentDs.Get<bool>() == true );
2738
2739
876
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
876
#if 1
2745
876
    {
2746
876
        std::set<uint64_t> moduleIDs;
2747
876
        for (const auto& m : modules ) {
2748
841
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
841
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
841
            moduleIDs.insert(moduleID);
2756
841
        }
2757
2758
876
        std::set<uint64_t> operationModuleIDs;
2759
2.68k
        for (const auto& op : operations) {
2760
2.68k
            operationModuleIDs.insert(op.first->ID);
2761
2.68k
        }
2762
2763
876
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
876
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
876
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
876
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
876
    }
2771
876
#endif
2772
2773
876
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
876
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.56k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.68k
        auto& operation = operations[i];
2782
2783
2.68k
        auto& module = operation.first;
2784
2.68k
        auto& op = operation.second;
2785
2786
2.68k
        if ( i > 0 ) {
2787
1.84k
            auto& prevModule = operations[i-1].first;
2788
1.84k
            auto& prevOp = operations[i].second;
2789
2790
1.84k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.84k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.84k
                if ( curModifier.size() == 0 ) {
2793
606k
                    for (size_t j = 0; j < 512; j++) {
2794
605k
                        curModifier.push_back(1);
2795
605k
                    }
2796
1.18k
                } else {
2797
24.5k
                    for (auto& c : curModifier) {
2798
24.5k
                        c++;
2799
24.5k
                    }
2800
664
                }
2801
1.84k
            }
2802
1.84k
        }
2803
2804
2.68k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.68k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.68k
        const auto& result = results.back();
2811
2812
2.68k
        if ( result.second != std::nullopt ) {
2813
1.36k
            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.36k
        }
2820
2821
2.68k
        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.68k
        if ( options.disableTests == false ) {
2830
2.68k
            tests::test(op, result.second);
2831
2.68k
        }
2832
2833
2.68k
        postprocess(module, op, result);
2834
2.68k
    }
2835
2836
876
    if ( options.noCompare == false ) {
2837
841
        compare(operations, results, data, size);
2838
841
    }
2839
876
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
360
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
360
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
360
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.31k
    do {
2725
1.31k
        auto op = getOp(&parentDs, data, size);
2726
1.31k
        auto module = getModule(parentDs);
2727
1.31k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.31k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.31k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
1.31k
    } while ( parentDs.Get<bool>() == true );
2738
2739
360
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
360
#if 1
2745
360
    {
2746
360
        std::set<uint64_t> moduleIDs;
2747
360
        for (const auto& m : modules ) {
2748
321
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
321
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
321
            moduleIDs.insert(moduleID);
2756
321
        }
2757
2758
360
        std::set<uint64_t> operationModuleIDs;
2759
1.14k
        for (const auto& op : operations) {
2760
1.14k
            operationModuleIDs.insert(op.first->ID);
2761
1.14k
        }
2762
2763
360
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
360
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
360
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
360
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
360
    }
2771
360
#endif
2772
2773
360
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
360
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.50k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.14k
        auto& operation = operations[i];
2782
2783
1.14k
        auto& module = operation.first;
2784
1.14k
        auto& op = operation.second;
2785
2786
1.14k
        if ( i > 0 ) {
2787
822
            auto& prevModule = operations[i-1].first;
2788
822
            auto& prevOp = operations[i].second;
2789
2790
822
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
822
                auto& curModifier = op.modifier.GetVectorPtr();
2792
822
                if ( curModifier.size() == 0 ) {
2793
311k
                    for (size_t j = 0; j < 512; j++) {
2794
311k
                        curModifier.push_back(1);
2795
311k
                    }
2796
608
                } else {
2797
16.6k
                    for (auto& c : curModifier) {
2798
16.6k
                        c++;
2799
16.6k
                    }
2800
214
                }
2801
822
            }
2802
822
        }
2803
2804
1.14k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.14k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.14k
        const auto& result = results.back();
2811
2812
1.14k
        if ( result.second != std::nullopt ) {
2813
176
            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
176
        }
2820
2821
1.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
1.14k
        if ( options.disableTests == false ) {
2830
1.14k
            tests::test(op, result.second);
2831
1.14k
        }
2832
2833
1.14k
        postprocess(module, op, result);
2834
1.14k
    }
2835
2836
360
    if ( options.noCompare == false ) {
2837
321
        compare(operations, results, data, size);
2838
321
    }
2839
360
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::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
280
    do {
2725
280
        auto op = getOp(&parentDs, data, size);
2726
280
        auto module = getModule(parentDs);
2727
280
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
280
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
280
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
280
    } while ( parentDs.Get<bool>() == true );
2738
2739
53
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
53
        for (const auto& m : modules ) {
2748
26
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26
            moduleIDs.insert(moduleID);
2756
26
        }
2757
2758
53
        std::set<uint64_t> operationModuleIDs;
2759
164
        for (const auto& op : operations) {
2760
164
            operationModuleIDs.insert(op.first->ID);
2761
164
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
217
    for (size_t i = 0; i < operations.size(); i++) {
2781
164
        auto& operation = operations[i];
2782
2783
164
        auto& module = operation.first;
2784
164
        auto& op = operation.second;
2785
2786
164
        if ( i > 0 ) {
2787
138
            auto& prevModule = operations[i-1].first;
2788
138
            auto& prevOp = operations[i].second;
2789
2790
138
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
138
                auto& curModifier = op.modifier.GetVectorPtr();
2792
138
                if ( curModifier.size() == 0 ) {
2793
49.2k
                    for (size_t j = 0; j < 512; j++) {
2794
49.1k
                        curModifier.push_back(1);
2795
49.1k
                    }
2796
96
                } else {
2797
526
                    for (auto& c : curModifier) {
2798
526
                        c++;
2799
526
                    }
2800
42
                }
2801
138
            }
2802
138
        }
2803
2804
164
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
164
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
164
        const auto& result = results.back();
2811
2812
164
        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
164
        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
164
        if ( options.disableTests == false ) {
2830
164
            tests::test(op, result.second);
2831
164
        }
2832
2833
164
        postprocess(module, op, result);
2834
164
    }
2835
2836
53
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
53
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
298
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
298
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
298
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
908
    do {
2725
908
        auto op = getOp(&parentDs, data, size);
2726
908
        auto module = getModule(parentDs);
2727
908
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
908
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
908
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
908
    } while ( parentDs.Get<bool>() == true );
2738
2739
298
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
298
#if 1
2745
298
    {
2746
298
        std::set<uint64_t> moduleIDs;
2747
298
        for (const auto& m : modules ) {
2748
274
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
274
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
274
            moduleIDs.insert(moduleID);
2756
274
        }
2757
2758
298
        std::set<uint64_t> operationModuleIDs;
2759
818
        for (const auto& op : operations) {
2760
818
            operationModuleIDs.insert(op.first->ID);
2761
818
        }
2762
2763
298
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
298
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
298
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
298
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
298
    }
2771
298
#endif
2772
2773
298
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
298
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.11k
    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
544
            auto& prevModule = operations[i-1].first;
2788
544
            auto& prevOp = operations[i].second;
2789
2790
544
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
544
                auto& curModifier = op.modifier.GetVectorPtr();
2792
544
                if ( curModifier.size() == 0 ) {
2793
242k
                    for (size_t j = 0; j < 512; j++) {
2794
242k
                        curModifier.push_back(1);
2795
242k
                    }
2796
473
                } else {
2797
1.71k
                    for (auto& c : curModifier) {
2798
1.71k
                        c++;
2799
1.71k
                    }
2800
71
                }
2801
544
            }
2802
544
        }
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
344
            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
344
        }
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
298
    if ( options.noCompare == false ) {
2837
274
        compare(operations, results, data, size);
2838
274
    }
2839
298
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
50
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
50
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
50
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
294
    do {
2725
294
        auto op = getOp(&parentDs, data, size);
2726
294
        auto module = getModule(parentDs);
2727
294
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
294
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
294
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
294
    } while ( parentDs.Get<bool>() == true );
2738
2739
50
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
50
        for (const auto& m : modules ) {
2748
26
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26
            moduleIDs.insert(moduleID);
2756
26
        }
2757
2758
50
        std::set<uint64_t> operationModuleIDs;
2759
178
        for (const auto& op : operations) {
2760
178
            operationModuleIDs.insert(op.first->ID);
2761
178
        }
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
50
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
228
    for (size_t i = 0; i < operations.size(); i++) {
2781
178
        auto& operation = operations[i];
2782
2783
178
        auto& module = operation.first;
2784
178
        auto& op = operation.second;
2785
2786
178
        if ( i > 0 ) {
2787
152
            auto& prevModule = operations[i-1].first;
2788
152
            auto& prevOp = operations[i].second;
2789
2790
152
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
152
                auto& curModifier = op.modifier.GetVectorPtr();
2792
152
                if ( curModifier.size() == 0 ) {
2793
52.8k
                    for (size_t j = 0; j < 512; j++) {
2794
52.7k
                        curModifier.push_back(1);
2795
52.7k
                    }
2796
103
                } else {
2797
326
                    for (auto& c : curModifier) {
2798
326
                        c++;
2799
326
                    }
2800
49
                }
2801
152
            }
2802
152
        }
2803
2804
178
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
178
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
178
        const auto& result = results.back();
2811
2812
178
        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
178
        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
178
        if ( options.disableTests == false ) {
2830
178
            tests::test(op, result.second);
2831
178
        }
2832
2833
178
        postprocess(module, op, result);
2834
178
    }
2835
2836
50
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
46
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
46
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
46
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
287
    do {
2725
287
        auto op = getOp(&parentDs, data, size);
2726
287
        auto module = getModule(parentDs);
2727
287
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
287
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
287
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
287
    } while ( parentDs.Get<bool>() == true );
2738
2739
46
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
46
#if 1
2745
46
    {
2746
46
        std::set<uint64_t> moduleIDs;
2747
46
        for (const auto& m : modules ) {
2748
25
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
25
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
25
            moduleIDs.insert(moduleID);
2756
25
        }
2757
2758
46
        std::set<uint64_t> operationModuleIDs;
2759
166
        for (const auto& op : operations) {
2760
166
            operationModuleIDs.insert(op.first->ID);
2761
166
        }
2762
2763
46
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
46
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
46
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
46
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
46
    }
2771
46
#endif
2772
2773
46
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
46
    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
166
        auto& operation = operations[i];
2782
2783
166
        auto& module = operation.first;
2784
166
        auto& op = operation.second;
2785
2786
166
        if ( i > 0 ) {
2787
141
            auto& prevModule = operations[i-1].first;
2788
141
            auto& prevOp = operations[i].second;
2789
2790
141
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
141
                auto& curModifier = op.modifier.GetVectorPtr();
2792
141
                if ( curModifier.size() == 0 ) {
2793
53.3k
                    for (size_t j = 0; j < 512; j++) {
2794
53.2k
                        curModifier.push_back(1);
2795
53.2k
                    }
2796
104
                } else {
2797
396
                    for (auto& c : curModifier) {
2798
396
                        c++;
2799
396
                    }
2800
37
                }
2801
141
            }
2802
141
        }
2803
2804
166
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
166
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
166
        const auto& result = results.back();
2811
2812
166
        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
166
        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
166
        if ( options.disableTests == false ) {
2830
166
            tests::test(op, result.second);
2831
166
        }
2832
2833
166
        postprocess(module, op, result);
2834
166
    }
2835
2836
46
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
46
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::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
342
    do {
2725
342
        auto op = getOp(&parentDs, data, size);
2726
342
        auto module = getModule(parentDs);
2727
342
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
342
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
342
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
342
    } while ( parentDs.Get<bool>() == true );
2738
2739
54
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
54
        for (const auto& m : modules ) {
2748
25
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
25
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
25
            moduleIDs.insert(moduleID);
2756
25
        }
2757
2758
54
        std::set<uint64_t> operationModuleIDs;
2759
180
        for (const auto& op : operations) {
2760
180
            operationModuleIDs.insert(op.first->ID);
2761
180
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
234
    for (size_t i = 0; i < operations.size(); i++) {
2781
180
        auto& operation = operations[i];
2782
2783
180
        auto& module = operation.first;
2784
180
        auto& op = operation.second;
2785
2786
180
        if ( i > 0 ) {
2787
155
            auto& prevModule = operations[i-1].first;
2788
155
            auto& prevOp = operations[i].second;
2789
2790
155
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
155
                auto& curModifier = op.modifier.GetVectorPtr();
2792
155
                if ( curModifier.size() == 0 ) {
2793
54.8k
                    for (size_t j = 0; j < 512; j++) {
2794
54.7k
                        curModifier.push_back(1);
2795
54.7k
                    }
2796
107
                } else {
2797
323
                    for (auto& c : curModifier) {
2798
323
                        c++;
2799
323
                    }
2800
48
                }
2801
155
            }
2802
155
        }
2803
2804
180
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
180
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
180
        const auto& result = results.back();
2811
2812
180
        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
180
        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
180
        if ( options.disableTests == false ) {
2830
180
            tests::test(op, result.second);
2831
180
        }
2832
2833
180
        postprocess(module, op, result);
2834
180
    }
2835
2836
54
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
54
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
218
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
218
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
218
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
740
    do {
2725
740
        auto op = getOp(&parentDs, data, size);
2726
740
        auto module = getModule(parentDs);
2727
740
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
740
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
740
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
740
    } while ( parentDs.Get<bool>() == true );
2738
2739
218
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
218
#if 1
2745
218
    {
2746
218
        std::set<uint64_t> moduleIDs;
2747
218
        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
218
        std::set<uint64_t> operationModuleIDs;
2759
552
        for (const auto& op : operations) {
2760
552
            operationModuleIDs.insert(op.first->ID);
2761
552
        }
2762
2763
218
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
218
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
218
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
218
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
218
    }
2771
218
#endif
2772
2773
218
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
218
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
770
    for (size_t i = 0; i < operations.size(); i++) {
2781
552
        auto& operation = operations[i];
2782
2783
552
        auto& module = operation.first;
2784
552
        auto& op = operation.second;
2785
2786
552
        if ( i > 0 ) {
2787
363
            auto& prevModule = operations[i-1].first;
2788
363
            auto& prevOp = operations[i].second;
2789
2790
363
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
363
                auto& curModifier = op.modifier.GetVectorPtr();
2792
363
                if ( curModifier.size() == 0 ) {
2793
142k
                    for (size_t j = 0; j < 512; j++) {
2794
142k
                        curModifier.push_back(1);
2795
142k
                    }
2796
278
                } else {
2797
12.7k
                    for (auto& c : curModifier) {
2798
12.7k
                        c++;
2799
12.7k
                    }
2800
85
                }
2801
363
            }
2802
363
        }
2803
2804
552
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
552
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
552
        const auto& result = results.back();
2811
2812
552
        if ( result.second != std::nullopt ) {
2813
361
            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
361
        }
2820
2821
552
        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
552
        if ( options.disableTests == false ) {
2830
552
            tests::test(op, result.second);
2831
552
        }
2832
2833
552
        postprocess(module, op, result);
2834
552
    }
2835
2836
218
    if ( options.noCompare == false ) {
2837
189
        compare(operations, results, data, size);
2838
189
    }
2839
218
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
23
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
23
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
23
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
42
    do {
2725
42
        auto op = getOp(&parentDs, data, size);
2726
42
        auto module = getModule(parentDs);
2727
42
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
42
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
42
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
42
    } while ( parentDs.Get<bool>() == true );
2738
2739
23
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
23
#if 1
2745
23
    {
2746
23
        std::set<uint64_t> moduleIDs;
2747
23
        for (const auto& m : modules ) {
2748
13
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
13
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
13
            moduleIDs.insert(moduleID);
2756
13
        }
2757
2758
23
        std::set<uint64_t> operationModuleIDs;
2759
28
        for (const auto& op : operations) {
2760
28
            operationModuleIDs.insert(op.first->ID);
2761
28
        }
2762
2763
23
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
23
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
23
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
23
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
23
    }
2771
23
#endif
2772
2773
23
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
23
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
51
    for (size_t i = 0; i < operations.size(); i++) {
2781
28
        auto& operation = operations[i];
2782
2783
28
        auto& module = operation.first;
2784
28
        auto& op = operation.second;
2785
2786
28
        if ( i > 0 ) {
2787
15
            auto& prevModule = operations[i-1].first;
2788
15
            auto& prevOp = operations[i].second;
2789
2790
15
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                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
11
                } else {
2797
525
                    for (auto& c : curModifier) {
2798
525
                        c++;
2799
525
                    }
2800
11
                }
2801
15
            }
2802
15
        }
2803
2804
28
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
28
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
28
        const auto& result = results.back();
2811
2812
28
        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
28
        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
28
        if ( options.disableTests == false ) {
2830
28
            tests::test(op, result.second);
2831
28
        }
2832
2833
28
        postprocess(module, op, result);
2834
28
    }
2835
2836
23
    if ( options.noCompare == false ) {
2837
13
        compare(operations, results, data, size);
2838
13
    }
2839
23
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::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
292
    do {
2725
292
        auto op = getOp(&parentDs, data, size);
2726
292
        auto module = getModule(parentDs);
2727
292
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
1
            break;
2736
1
        }
2737
292
    } while ( parentDs.Get<bool>() == true );
2738
2739
52
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
52
#if 1
2745
52
    {
2746
52
        std::set<uint64_t> moduleIDs;
2747
52
        for (const auto& m : modules ) {
2748
24
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
24
            moduleIDs.insert(moduleID);
2756
24
        }
2757
2758
52
        std::set<uint64_t> operationModuleIDs;
2759
149
        for (const auto& op : operations) {
2760
149
            operationModuleIDs.insert(op.first->ID);
2761
149
        }
2762
2763
52
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
52
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
52
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
52
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
52
    }
2771
52
#endif
2772
2773
52
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
52
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
201
    for (size_t i = 0; i < operations.size(); i++) {
2781
149
        auto& operation = operations[i];
2782
2783
149
        auto& module = operation.first;
2784
149
        auto& op = operation.second;
2785
2786
149
        if ( i > 0 ) {
2787
125
            auto& prevModule = operations[i-1].first;
2788
125
            auto& prevOp = operations[i].second;
2789
2790
125
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
125
                auto& curModifier = op.modifier.GetVectorPtr();
2792
125
                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
73
                } else {
2797
302
                    for (auto& c : curModifier) {
2798
302
                        c++;
2799
302
                    }
2800
52
                }
2801
125
            }
2802
125
        }
2803
2804
149
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
149
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
149
        const auto& result = results.back();
2811
2812
149
        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
149
        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
149
        if ( options.disableTests == false ) {
2830
149
            tests::test(op, result.second);
2831
149
        }
2832
2833
149
        postprocess(module, op, result);
2834
149
    }
2835
2836
52
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
52
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
50
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
50
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
50
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
288
    do {
2725
288
        auto op = getOp(&parentDs, data, size);
2726
288
        auto module = getModule(parentDs);
2727
288
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
288
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
288
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
288
    } while ( parentDs.Get<bool>() == true );
2738
2739
50
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
50
        for (const auto& m : modules ) {
2748
23
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
23
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
23
            moduleIDs.insert(moduleID);
2756
23
        }
2757
2758
50
        std::set<uint64_t> operationModuleIDs;
2759
143
        for (const auto& op : operations) {
2760
143
            operationModuleIDs.insert(op.first->ID);
2761
143
        }
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
50
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
193
    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
120
            auto& prevModule = operations[i-1].first;
2788
120
            auto& prevOp = operations[i].second;
2789
2790
120
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
120
                auto& curModifier = op.modifier.GetVectorPtr();
2792
120
                if ( curModifier.size() == 0 ) {
2793
40.5k
                    for (size_t j = 0; j < 512; j++) {
2794
40.4k
                        curModifier.push_back(1);
2795
40.4k
                    }
2796
79
                } else {
2797
268
                    for (auto& c : curModifier) {
2798
268
                        c++;
2799
268
                    }
2800
41
                }
2801
120
            }
2802
120
        }
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
50
    if ( options.noCompare == false ) {
2837
23
        compare(operations, results, data, size);
2838
23
    }
2839
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
18
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
18
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
18
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
29
    do {
2725
29
        auto op = getOp(&parentDs, data, size);
2726
29
        auto module = getModule(parentDs);
2727
29
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
29
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
29
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
29
    } while ( parentDs.Get<bool>() == true );
2738
2739
18
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
18
#if 1
2745
18
    {
2746
18
        std::set<uint64_t> moduleIDs;
2747
18
        for (const auto& m : modules ) {
2748
9
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
9
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
9
            moduleIDs.insert(moduleID);
2756
9
        }
2757
2758
18
        std::set<uint64_t> operationModuleIDs;
2759
18
        for (const auto& op : operations) {
2760
17
            operationModuleIDs.insert(op.first->ID);
2761
17
        }
2762
2763
18
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
18
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
18
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
18
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
18
    }
2771
18
#endif
2772
2773
18
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
18
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
35
    for (size_t i = 0; i < operations.size(); i++) {
2781
17
        auto& operation = operations[i];
2782
2783
17
        auto& module = operation.first;
2784
17
        auto& op = operation.second;
2785
2786
17
        if ( i > 0 ) {
2787
8
            auto& prevModule = operations[i-1].first;
2788
8
            auto& prevOp = operations[i].second;
2789
2790
8
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
8
                auto& curModifier = op.modifier.GetVectorPtr();
2792
8
                if ( curModifier.size() == 0 ) {
2793
513
                    for (size_t j = 0; j < 512; j++) {
2794
512
                        curModifier.push_back(1);
2795
512
                    }
2796
7
                } else {
2797
2.72k
                    for (auto& c : curModifier) {
2798
2.72k
                        c++;
2799
2.72k
                    }
2800
7
                }
2801
8
            }
2802
8
        }
2803
2804
17
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
17
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
17
        const auto& result = results.back();
2811
2812
17
        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
17
        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
17
        if ( options.disableTests == false ) {
2830
17
            tests::test(op, result.second);
2831
17
        }
2832
2833
17
        postprocess(module, op, result);
2834
17
    }
2835
2836
18
    if ( options.noCompare == false ) {
2837
9
        compare(operations, results, data, size);
2838
9
    }
2839
18
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::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
325
    do {
2725
325
        auto op = getOp(&parentDs, data, size);
2726
325
        auto module = getModule(parentDs);
2727
325
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
325
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
325
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
325
    } while ( parentDs.Get<bool>() == true );
2738
2739
57
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
57
        for (const auto& m : modules ) {
2748
32
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
32
            moduleIDs.insert(moduleID);
2756
32
        }
2757
2758
57
        std::set<uint64_t> operationModuleIDs;
2759
202
        for (const auto& op : operations) {
2760
202
            operationModuleIDs.insert(op.first->ID);
2761
202
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
259
    for (size_t i = 0; i < operations.size(); i++) {
2781
202
        auto& operation = operations[i];
2782
2783
202
        auto& module = operation.first;
2784
202
        auto& op = operation.second;
2785
2786
202
        if ( i > 0 ) {
2787
170
            auto& prevModule = operations[i-1].first;
2788
170
            auto& prevOp = operations[i].second;
2789
2790
170
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
170
                auto& curModifier = op.modifier.GetVectorPtr();
2792
170
                if ( curModifier.size() == 0 ) {
2793
72.8k
                    for (size_t j = 0; j < 512; j++) {
2794
72.7k
                        curModifier.push_back(1);
2795
72.7k
                    }
2796
142
                } else {
2797
298
                    for (auto& c : curModifier) {
2798
298
                        c++;
2799
298
                    }
2800
28
                }
2801
170
            }
2802
170
        }
2803
2804
202
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
202
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
202
        const auto& result = results.back();
2811
2812
202
        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
202
        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
202
        if ( options.disableTests == false ) {
2830
202
            tests::test(op, result.second);
2831
202
        }
2832
2833
202
        postprocess(module, op, result);
2834
202
    }
2835
2836
57
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
57
}
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
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
376
    do {
2725
376
        auto op = getOp(&parentDs, data, size);
2726
376
        auto module = getModule(parentDs);
2727
376
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
376
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
376
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
376
    } while ( parentDs.Get<bool>() == true );
2738
2739
56
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
56
        for (const auto& m : modules ) {
2748
28
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
28
            moduleIDs.insert(moduleID);
2756
28
        }
2757
2758
56
        std::set<uint64_t> operationModuleIDs;
2759
192
        for (const auto& op : operations) {
2760
192
            operationModuleIDs.insert(op.first->ID);
2761
192
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
248
    for (size_t i = 0; i < operations.size(); i++) {
2781
192
        auto& operation = operations[i];
2782
2783
192
        auto& module = operation.first;
2784
192
        auto& op = operation.second;
2785
2786
192
        if ( i > 0 ) {
2787
164
            auto& prevModule = operations[i-1].first;
2788
164
            auto& prevOp = operations[i].second;
2789
2790
164
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
164
                auto& curModifier = op.modifier.GetVectorPtr();
2792
164
                if ( curModifier.size() == 0 ) {
2793
45.6k
                    for (size_t j = 0; j < 512; j++) {
2794
45.5k
                        curModifier.push_back(1);
2795
45.5k
                    }
2796
89
                } else {
2797
288
                    for (auto& c : curModifier) {
2798
288
                        c++;
2799
288
                    }
2800
75
                }
2801
164
            }
2802
164
        }
2803
2804
192
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
192
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
192
        const auto& result = results.back();
2811
2812
192
        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
192
        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
192
        if ( options.disableTests == false ) {
2830
192
            tests::test(op, result.second);
2831
192
        }
2832
2833
192
        postprocess(module, op, result);
2834
192
    }
2835
2836
56
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
56
}
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
51
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
51
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
51
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
257
    do {
2725
257
        auto op = getOp(&parentDs, data, size);
2726
257
        auto module = getModule(parentDs);
2727
257
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
257
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
257
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
257
    } while ( parentDs.Get<bool>() == true );
2738
2739
51
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
51
        for (const auto& m : modules ) {
2748
26
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26
            moduleIDs.insert(moduleID);
2756
26
        }
2757
2758
51
        std::set<uint64_t> operationModuleIDs;
2759
148
        for (const auto& op : operations) {
2760
148
            operationModuleIDs.insert(op.first->ID);
2761
148
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
199
    for (size_t i = 0; i < operations.size(); i++) {
2781
148
        auto& operation = operations[i];
2782
2783
148
        auto& module = operation.first;
2784
148
        auto& op = operation.second;
2785
2786
148
        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
122
                auto& curModifier = op.modifier.GetVectorPtr();
2792
122
                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
69
                } else {
2797
319
                    for (auto& c : curModifier) {
2798
319
                        c++;
2799
319
                    }
2800
69
                }
2801
122
            }
2802
122
        }
2803
2804
148
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
148
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
148
        const auto& result = results.back();
2811
2812
148
        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
148
        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
148
        if ( options.disableTests == false ) {
2830
148
            tests::test(op, result.second);
2831
148
        }
2832
2833
148
        postprocess(module, op, result);
2834
148
    }
2835
2836
51
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
51
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
5.39k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
5.39k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
5.39k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.42k
    do {
2725
7.42k
        auto op = getOp(&parentDs, data, size);
2726
7.42k
        auto module = getModule(parentDs);
2727
7.42k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7.42k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.42k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
75
            break;
2736
75
        }
2737
7.42k
    } while ( parentDs.Get<bool>() == true );
2738
2739
5.39k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
5.39k
#if 1
2745
5.39k
    {
2746
5.39k
        std::set<uint64_t> moduleIDs;
2747
5.39k
        for (const auto& m : modules ) {
2748
5.18k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5.18k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5.18k
            moduleIDs.insert(moduleID);
2756
5.18k
        }
2757
2758
5.39k
        std::set<uint64_t> operationModuleIDs;
2759
7.00k
        for (const auto& op : operations) {
2760
7.00k
            operationModuleIDs.insert(op.first->ID);
2761
7.00k
        }
2762
2763
5.39k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
5.39k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
5.39k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
5.39k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
5.39k
    }
2771
5.39k
#endif
2772
2773
5.39k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
5.39k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12.3k
    for (size_t i = 0; i < operations.size(); i++) {
2781
7.00k
        auto& operation = operations[i];
2782
2783
7.00k
        auto& module = operation.first;
2784
7.00k
        auto& op = operation.second;
2785
2786
7.00k
        if ( i > 0 ) {
2787
1.82k
            auto& prevModule = operations[i-1].first;
2788
1.82k
            auto& prevOp = operations[i].second;
2789
2790
1.82k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.82k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.82k
                if ( curModifier.size() == 0 ) {
2793
338k
                    for (size_t j = 0; j < 512; j++) {
2794
337k
                        curModifier.push_back(1);
2795
337k
                    }
2796
1.16k
                } else {
2797
103k
                    for (auto& c : curModifier) {
2798
103k
                        c++;
2799
103k
                    }
2800
1.16k
                }
2801
1.82k
            }
2802
1.82k
        }
2803
2804
7.00k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7.00k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7.00k
        const auto& result = results.back();
2811
2812
7.00k
        if ( result.second != std::nullopt ) {
2813
3.00k
            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
3.00k
        }
2820
2821
7.00k
        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
7.00k
        if ( options.disableTests == false ) {
2830
7.00k
            tests::test(op, result.second);
2831
7.00k
        }
2832
2833
7.00k
        postprocess(module, op, result);
2834
7.00k
    }
2835
2836
5.39k
    if ( options.noCompare == false ) {
2837
5.18k
        compare(operations, results, data, size);
2838
5.18k
    }
2839
5.39k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.38k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.38k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.38k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.01k
    do {
2725
5.01k
        auto op = getOp(&parentDs, data, size);
2726
5.01k
        auto module = getModule(parentDs);
2727
5.01k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5.01k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.01k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
82
            break;
2736
82
        }
2737
5.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.38k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.38k
#if 1
2745
3.38k
    {
2746
3.38k
        std::set<uint64_t> moduleIDs;
2747
3.38k
        for (const auto& m : modules ) {
2748
3.13k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.13k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.13k
            moduleIDs.insert(moduleID);
2756
3.13k
        }
2757
2758
3.38k
        std::set<uint64_t> operationModuleIDs;
2759
4.56k
        for (const auto& op : operations) {
2760
4.56k
            operationModuleIDs.insert(op.first->ID);
2761
4.56k
        }
2762
2763
3.38k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.38k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.38k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.38k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.38k
    }
2771
3.38k
#endif
2772
2773
3.38k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.38k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.95k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.56k
        auto& operation = operations[i];
2782
2783
4.56k
        auto& module = operation.first;
2784
4.56k
        auto& op = operation.second;
2785
2786
4.56k
        if ( i > 0 ) {
2787
1.43k
            auto& prevModule = operations[i-1].first;
2788
1.43k
            auto& prevOp = operations[i].second;
2789
2790
1.43k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.43k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.43k
                if ( curModifier.size() == 0 ) {
2793
118k
                    for (size_t j = 0; j < 512; j++) {
2794
118k
                        curModifier.push_back(1);
2795
118k
                    }
2796
1.20k
                } else {
2797
180k
                    for (auto& c : curModifier) {
2798
180k
                        c++;
2799
180k
                    }
2800
1.20k
                }
2801
1.43k
            }
2802
1.43k
        }
2803
2804
4.56k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.56k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.56k
        const auto& result = results.back();
2811
2812
4.56k
        if ( result.second != std::nullopt ) {
2813
1.62k
            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.62k
        }
2820
2821
4.56k
        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.56k
        if ( options.disableTests == false ) {
2830
4.56k
            tests::test(op, result.second);
2831
4.56k
        }
2832
2833
4.56k
        postprocess(module, op, result);
2834
4.56k
    }
2835
2836
3.38k
    if ( options.noCompare == false ) {
2837
3.13k
        compare(operations, results, data, size);
2838
3.13k
    }
2839
3.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.89k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.89k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.89k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.01k
    do {
2725
7.01k
        auto op = getOp(&parentDs, data, size);
2726
7.01k
        auto module = getModule(parentDs);
2727
7.01k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7.01k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.01k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
101
            break;
2736
101
        }
2737
7.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.89k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.89k
#if 1
2745
4.89k
    {
2746
4.89k
        std::set<uint64_t> moduleIDs;
2747
4.89k
        for (const auto& m : modules ) {
2748
4.72k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.72k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.72k
            moduleIDs.insert(moduleID);
2756
4.72k
        }
2757
2758
4.89k
        std::set<uint64_t> operationModuleIDs;
2759
6.67k
        for (const auto& op : operations) {
2760
6.67k
            operationModuleIDs.insert(op.first->ID);
2761
6.67k
        }
2762
2763
4.89k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.89k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.89k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.89k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.89k
    }
2771
4.89k
#endif
2772
2773
4.89k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.89k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
11.5k
    for (size_t i = 0; i < operations.size(); i++) {
2781
6.67k
        auto& operation = operations[i];
2782
2783
6.67k
        auto& module = operation.first;
2784
6.67k
        auto& op = operation.second;
2785
2786
6.67k
        if ( i > 0 ) {
2787
1.94k
            auto& prevModule = operations[i-1].first;
2788
1.94k
            auto& prevOp = operations[i].second;
2789
2790
1.94k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.94k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.94k
                if ( curModifier.size() == 0 ) {
2793
174k
                    for (size_t j = 0; j < 512; j++) {
2794
174k
                        curModifier.push_back(1);
2795
174k
                    }
2796
1.60k
                } else {
2797
226k
                    for (auto& c : curModifier) {
2798
226k
                        c++;
2799
226k
                    }
2800
1.60k
                }
2801
1.94k
            }
2802
1.94k
        }
2803
2804
6.67k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6.67k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6.67k
        const auto& result = results.back();
2811
2812
6.67k
        if ( result.second != std::nullopt ) {
2813
1.90k
            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.90k
        }
2820
2821
6.67k
        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
6.67k
        if ( options.disableTests == false ) {
2830
6.67k
            tests::test(op, result.second);
2831
6.67k
        }
2832
2833
6.67k
        postprocess(module, op, result);
2834
6.67k
    }
2835
2836
4.89k
    if ( options.noCompare == false ) {
2837
4.72k
        compare(operations, results, data, size);
2838
4.72k
    }
2839
4.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
479
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
479
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
479
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.16k
    do {
2725
1.16k
        auto op = getOp(&parentDs, data, size);
2726
1.16k
        auto module = getModule(parentDs);
2727
1.16k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.16k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.16k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
41
            break;
2736
41
        }
2737
1.16k
    } while ( parentDs.Get<bool>() == true );
2738
2739
479
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
479
#if 1
2745
479
    {
2746
479
        std::set<uint64_t> moduleIDs;
2747
479
        for (const auto& m : modules ) {
2748
322
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
322
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
322
            moduleIDs.insert(moduleID);
2756
322
        }
2757
2758
479
        std::set<uint64_t> operationModuleIDs;
2759
837
        for (const auto& op : operations) {
2760
837
            operationModuleIDs.insert(op.first->ID);
2761
837
        }
2762
2763
479
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
479
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
479
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
479
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
479
    }
2771
479
#endif
2772
2773
479
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
479
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.31k
    for (size_t i = 0; i < operations.size(); i++) {
2781
837
        auto& operation = operations[i];
2782
2783
837
        auto& module = operation.first;
2784
837
        auto& op = operation.second;
2785
2786
837
        if ( i > 0 ) {
2787
515
            auto& prevModule = operations[i-1].first;
2788
515
            auto& prevOp = operations[i].second;
2789
2790
515
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
515
                auto& curModifier = op.modifier.GetVectorPtr();
2792
515
                if ( curModifier.size() == 0 ) {
2793
78.4k
                    for (size_t j = 0; j < 512; j++) {
2794
78.3k
                        curModifier.push_back(1);
2795
78.3k
                    }
2796
362
                } else {
2797
40.9k
                    for (auto& c : curModifier) {
2798
40.9k
                        c++;
2799
40.9k
                    }
2800
362
                }
2801
515
            }
2802
515
        }
2803
2804
837
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
837
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
837
        const auto& result = results.back();
2811
2812
837
        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
837
        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
837
        if ( options.disableTests == false ) {
2830
837
            tests::test(op, result.second);
2831
837
        }
2832
2833
837
        postprocess(module, op, result);
2834
837
    }
2835
2836
479
    if ( options.noCompare == false ) {
2837
322
        compare(operations, results, data, size);
2838
322
    }
2839
479
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.61k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.61k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.61k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
8.99k
    do {
2725
8.99k
        auto op = getOp(&parentDs, data, size);
2726
8.99k
        auto module = getModule(parentDs);
2727
8.99k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
8.99k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8.99k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
332
            break;
2736
332
        }
2737
8.99k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.61k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.61k
#if 1
2745
4.61k
    {
2746
4.61k
        std::set<uint64_t> moduleIDs;
2747
4.61k
        for (const auto& m : modules ) {
2748
4.44k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.44k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.44k
            moduleIDs.insert(moduleID);
2756
4.44k
        }
2757
2758
4.61k
        std::set<uint64_t> operationModuleIDs;
2759
8.64k
        for (const auto& op : operations) {
2760
8.64k
            operationModuleIDs.insert(op.first->ID);
2761
8.64k
        }
2762
2763
4.61k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.61k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.61k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.61k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.61k
    }
2771
4.61k
#endif
2772
2773
4.61k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.61k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
13.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
8.64k
        auto& operation = operations[i];
2782
2783
8.64k
        auto& module = operation.first;
2784
8.64k
        auto& op = operation.second;
2785
2786
8.64k
        if ( i > 0 ) {
2787
4.20k
            auto& prevModule = operations[i-1].first;
2788
4.20k
            auto& prevOp = operations[i].second;
2789
2790
4.20k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4.20k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4.20k
                if ( curModifier.size() == 0 ) {
2793
350k
                    for (size_t j = 0; j < 512; j++) {
2794
350k
                        curModifier.push_back(1);
2795
350k
                    }
2796
3.51k
                } else {
2797
234k
                    for (auto& c : curModifier) {
2798
234k
                        c++;
2799
234k
                    }
2800
3.51k
                }
2801
4.20k
            }
2802
4.20k
        }
2803
2804
8.64k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8.64k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8.64k
        const auto& result = results.back();
2811
2812
8.64k
        if ( result.second != std::nullopt ) {
2813
4.96k
            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.96k
        }
2820
2821
8.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
8.64k
        if ( options.disableTests == false ) {
2830
8.64k
            tests::test(op, result.second);
2831
8.64k
        }
2832
2833
8.64k
        postprocess(module, op, result);
2834
8.64k
    }
2835
2836
4.61k
    if ( options.noCompare == false ) {
2837
4.44k
        compare(operations, results, data, size);
2838
4.44k
    }
2839
4.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
90
    do {
2725
90
        auto op = getOp(&parentDs, data, size);
2726
90
        auto module = getModule(parentDs);
2727
90
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
2
            break;
2736
2
        }
2737
90
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
36
        std::set<uint64_t> operationModuleIDs;
2759
53
        for (const auto& op : operations) {
2760
53
            operationModuleIDs.insert(op.first->ID);
2761
53
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
89
    for (size_t i = 0; i < operations.size(); i++) {
2781
53
        auto& operation = operations[i];
2782
2783
53
        auto& module = operation.first;
2784
53
        auto& op = operation.second;
2785
2786
53
        if ( i > 0 ) {
2787
33
            auto& prevModule = operations[i-1].first;
2788
33
            auto& prevOp = operations[i].second;
2789
2790
33
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
33
                auto& curModifier = op.modifier.GetVectorPtr();
2792
33
                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
21
                } else {
2797
995
                    for (auto& c : curModifier) {
2798
995
                        c++;
2799
995
                    }
2800
21
                }
2801
33
            }
2802
33
        }
2803
2804
53
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
53
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
53
        const auto& result = results.back();
2811
2812
53
        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
53
        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
53
        if ( options.disableTests == false ) {
2830
53
            tests::test(op, result.second);
2831
53
        }
2832
2833
53
        postprocess(module, op, result);
2834
53
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
89
    do {
2725
89
        auto op = getOp(&parentDs, data, size);
2726
89
        auto module = getModule(parentDs);
2727
89
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
89
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
89
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
89
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
36
        std::set<uint64_t> operationModuleIDs;
2759
57
        for (const auto& op : operations) {
2760
57
            operationModuleIDs.insert(op.first->ID);
2761
57
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
93
    for (size_t i = 0; i < operations.size(); i++) {
2781
57
        auto& operation = operations[i];
2782
2783
57
        auto& module = operation.first;
2784
57
        auto& op = operation.second;
2785
2786
57
        if ( i > 0 ) {
2787
36
            auto& prevModule = operations[i-1].first;
2788
36
            auto& prevOp = operations[i].second;
2789
2790
36
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
36
                auto& curModifier = op.modifier.GetVectorPtr();
2792
36
                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
25
                } else {
2797
260
                    for (auto& c : curModifier) {
2798
260
                        c++;
2799
260
                    }
2800
25
                }
2801
36
            }
2802
36
        }
2803
2804
57
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
57
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
57
        const auto& result = results.back();
2811
2812
57
        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
57
        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
57
        if ( options.disableTests == false ) {
2830
57
            tests::test(op, result.second);
2831
57
        }
2832
2833
57
        postprocess(module, op, result);
2834
57
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
33
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
33
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
33
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
81
    do {
2725
81
        auto op = getOp(&parentDs, data, size);
2726
81
        auto module = getModule(parentDs);
2727
81
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
81
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
81
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
81
    } while ( parentDs.Get<bool>() == true );
2738
2739
33
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
33
#if 1
2745
33
    {
2746
33
        std::set<uint64_t> moduleIDs;
2747
33
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
33
        std::set<uint64_t> operationModuleIDs;
2759
54
        for (const auto& op : operations) {
2760
54
            operationModuleIDs.insert(op.first->ID);
2761
54
        }
2762
2763
33
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
33
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
33
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
33
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
33
    }
2771
33
#endif
2772
2773
33
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
33
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
87
    for (size_t i = 0; i < operations.size(); i++) {
2781
54
        auto& operation = operations[i];
2782
2783
54
        auto& module = operation.first;
2784
54
        auto& op = operation.second;
2785
2786
54
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i].second;
2789
2790
34
            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
263
                    for (auto& c : curModifier) {
2798
263
                        c++;
2799
263
                    }
2800
22
                }
2801
34
            }
2802
34
        }
2803
2804
54
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
54
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
54
        const auto& result = results.back();
2811
2812
54
        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
54
        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
54
        if ( options.disableTests == false ) {
2830
54
            tests::test(op, result.second);
2831
54
        }
2832
2833
54
        postprocess(module, op, result);
2834
54
    }
2835
2836
33
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
33
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
367
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
367
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
367
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
892
    do {
2725
892
        auto op = getOp(&parentDs, data, size);
2726
892
        auto module = getModule(parentDs);
2727
892
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
892
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
892
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
31
            break;
2736
31
        }
2737
892
    } while ( parentDs.Get<bool>() == true );
2738
2739
367
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
367
#if 1
2745
367
    {
2746
367
        std::set<uint64_t> moduleIDs;
2747
367
        for (const auto& m : modules ) {
2748
167
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
167
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
167
            moduleIDs.insert(moduleID);
2756
167
        }
2757
2758
367
        std::set<uint64_t> operationModuleIDs;
2759
513
        for (const auto& op : operations) {
2760
513
            operationModuleIDs.insert(op.first->ID);
2761
513
        }
2762
2763
367
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
367
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
367
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
367
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
367
    }
2771
367
#endif
2772
2773
367
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
367
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
880
    for (size_t i = 0; i < operations.size(); i++) {
2781
513
        auto& operation = operations[i];
2782
2783
513
        auto& module = operation.first;
2784
513
        auto& op = operation.second;
2785
2786
513
        if ( i > 0 ) {
2787
346
            auto& prevModule = operations[i-1].first;
2788
346
            auto& prevOp = operations[i].second;
2789
2790
346
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
346
                auto& curModifier = op.modifier.GetVectorPtr();
2792
346
                if ( curModifier.size() == 0 ) {
2793
79.5k
                    for (size_t j = 0; j < 512; j++) {
2794
79.3k
                        curModifier.push_back(1);
2795
79.3k
                    }
2796
191
                } else {
2797
8.34k
                    for (auto& c : curModifier) {
2798
8.34k
                        c++;
2799
8.34k
                    }
2800
191
                }
2801
346
            }
2802
346
        }
2803
2804
513
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
513
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
513
        const auto& result = results.back();
2811
2812
513
        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
513
        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
513
        if ( options.disableTests == false ) {
2830
513
            tests::test(op, result.second);
2831
513
        }
2832
2833
513
        postprocess(module, op, result);
2834
513
    }
2835
2836
367
    if ( options.noCompare == false ) {
2837
167
        compare(operations, results, data, size);
2838
167
    }
2839
367
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.10k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.10k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.10k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.05k
    do {
2725
6.05k
        auto op = getOp(&parentDs, data, size);
2726
6.05k
        auto module = getModule(parentDs);
2727
6.05k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
6.05k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6.05k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
179
            break;
2736
179
        }
2737
6.05k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.10k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.10k
#if 1
2745
3.10k
    {
2746
3.10k
        std::set<uint64_t> moduleIDs;
2747
3.10k
        for (const auto& m : modules ) {
2748
2.89k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.89k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.89k
            moduleIDs.insert(moduleID);
2756
2.89k
        }
2757
2758
3.10k
        std::set<uint64_t> operationModuleIDs;
2759
5.65k
        for (const auto& op : operations) {
2760
5.65k
            operationModuleIDs.insert(op.first->ID);
2761
5.65k
        }
2762
2763
3.10k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.10k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.10k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.10k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.10k
    }
2771
3.10k
#endif
2772
2773
3.10k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.10k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8.75k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.65k
        auto& operation = operations[i];
2782
2783
5.65k
        auto& module = operation.first;
2784
5.65k
        auto& op = operation.second;
2785
2786
5.65k
        if ( i > 0 ) {
2787
2.75k
            auto& prevModule = operations[i-1].first;
2788
2.75k
            auto& prevOp = operations[i].second;
2789
2790
2.75k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.75k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.75k
                if ( curModifier.size() == 0 ) {
2793
322k
                    for (size_t j = 0; j < 512; j++) {
2794
321k
                        curModifier.push_back(1);
2795
321k
                    }
2796
2.12k
                } else {
2797
687k
                    for (auto& c : curModifier) {
2798
687k
                        c++;
2799
687k
                    }
2800
2.12k
                }
2801
2.75k
            }
2802
2.75k
        }
2803
2804
5.65k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.65k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.65k
        const auto& result = results.back();
2811
2812
5.65k
        if ( result.second != std::nullopt ) {
2813
2.80k
            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
2.80k
        }
2820
2821
5.65k
        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
5.65k
        if ( options.disableTests == false ) {
2830
5.65k
            tests::test(op, result.second);
2831
5.65k
        }
2832
2833
5.65k
        postprocess(module, op, result);
2834
5.65k
    }
2835
2836
3.10k
    if ( options.noCompare == false ) {
2837
2.89k
        compare(operations, results, data, size);
2838
2.89k
    }
2839
3.10k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
26
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
26
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
26
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
61
    do {
2725
61
        auto op = getOp(&parentDs, data, size);
2726
61
        auto module = getModule(parentDs);
2727
61
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
61
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
61
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
61
    } while ( parentDs.Get<bool>() == true );
2738
2739
26
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
26
#if 1
2745
26
    {
2746
26
        std::set<uint64_t> moduleIDs;
2747
26
        for (const auto& m : modules ) {
2748
15
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
15
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
15
            moduleIDs.insert(moduleID);
2756
15
        }
2757
2758
26
        std::set<uint64_t> operationModuleIDs;
2759
39
        for (const auto& op : operations) {
2760
39
            operationModuleIDs.insert(op.first->ID);
2761
39
        }
2762
2763
26
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
26
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
26
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
26
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
26
    }
2771
26
#endif
2772
2773
26
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
26
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
65
    for (size_t i = 0; i < operations.size(); i++) {
2781
39
        auto& operation = operations[i];
2782
2783
39
        auto& module = operation.first;
2784
39
        auto& op = operation.second;
2785
2786
39
        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
24
                auto& curModifier = op.modifier.GetVectorPtr();
2792
24
                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
18
                } else {
2797
282
                    for (auto& c : curModifier) {
2798
282
                        c++;
2799
282
                    }
2800
18
                }
2801
24
            }
2802
24
        }
2803
2804
39
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
39
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
39
        const auto& result = results.back();
2811
2812
39
        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
39
        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
39
        if ( options.disableTests == false ) {
2830
39
            tests::test(op, result.second);
2831
39
        }
2832
2833
39
        postprocess(module, op, result);
2834
39
    }
2835
2836
26
    if ( options.noCompare == false ) {
2837
15
        compare(operations, results, data, size);
2838
15
    }
2839
26
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
72
    do {
2725
72
        auto op = getOp(&parentDs, data, size);
2726
72
        auto module = getModule(parentDs);
2727
72
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
3
            break;
2736
3
        }
2737
72
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
16
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
16
            moduleIDs.insert(moduleID);
2756
16
        }
2757
2758
29
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
45
            operationModuleIDs.insert(op.first->ID);
2761
45
        }
2762
2763
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
29
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
29
    }
2771
29
#endif
2772
2773
29
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
29
    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
45
        auto& operation = operations[i];
2782
2783
45
        auto& module = operation.first;
2784
45
        auto& op = operation.second;
2785
2786
45
        if ( i > 0 ) {
2787
29
            auto& prevModule = operations[i-1].first;
2788
29
            auto& prevOp = operations[i].second;
2789
2790
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
29
                auto& curModifier = op.modifier.GetVectorPtr();
2792
29
                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
18
                } else {
2797
238
                    for (auto& c : curModifier) {
2798
238
                        c++;
2799
238
                    }
2800
18
                }
2801
29
            }
2802
29
        }
2803
2804
45
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
45
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
45
        const auto& result = results.back();
2811
2812
45
        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
45
        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
45
        if ( options.disableTests == false ) {
2830
45
            tests::test(op, result.second);
2831
45
        }
2832
2833
45
        postprocess(module, op, result);
2834
45
    }
2835
2836
29
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
30
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
30
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
30
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
73
    do {
2725
73
        auto op = getOp(&parentDs, data, size);
2726
73
        auto module = getModule(parentDs);
2727
73
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
73
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
73
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
73
    } while ( parentDs.Get<bool>() == true );
2738
2739
30
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
30
#if 1
2745
30
    {
2746
30
        std::set<uint64_t> moduleIDs;
2747
30
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
30
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
45
            operationModuleIDs.insert(op.first->ID);
2761
45
        }
2762
2763
30
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
30
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
30
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
30
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
30
    }
2771
30
#endif
2772
2773
30
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
30
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
75
    for (size_t i = 0; i < operations.size(); i++) {
2781
45
        auto& operation = operations[i];
2782
2783
45
        auto& module = operation.first;
2784
45
        auto& op = operation.second;
2785
2786
45
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i].second;
2789
2790
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
28
                auto& curModifier = op.modifier.GetVectorPtr();
2792
28
                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
15
                } else {
2797
236
                    for (auto& c : curModifier) {
2798
236
                        c++;
2799
236
                    }
2800
15
                }
2801
28
            }
2802
28
        }
2803
2804
45
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
45
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
45
        const auto& result = results.back();
2811
2812
45
        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
45
        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
45
        if ( options.disableTests == false ) {
2830
45
            tests::test(op, result.second);
2831
45
        }
2832
2833
45
        postprocess(module, op, result);
2834
45
    }
2835
2836
30
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
30
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
72
    do {
2725
72
        auto op = getOp(&parentDs, data, size);
2726
72
        auto module = getModule(parentDs);
2727
72
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
2
            break;
2736
2
        }
2737
72
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
29
        std::set<uint64_t> operationModuleIDs;
2759
49
        for (const auto& op : operations) {
2760
49
            operationModuleIDs.insert(op.first->ID);
2761
49
        }
2762
2763
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
29
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
29
    }
2771
29
#endif
2772
2773
29
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
29
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
78
    for (size_t i = 0; i < operations.size(); i++) {
2781
49
        auto& operation = operations[i];
2782
2783
49
        auto& module = operation.first;
2784
49
        auto& op = operation.second;
2785
2786
49
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                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
20
                } else {
2797
306
                    for (auto& c : curModifier) {
2798
306
                        c++;
2799
306
                    }
2800
20
                }
2801
31
            }
2802
31
        }
2803
2804
49
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
49
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
49
        const auto& result = results.back();
2811
2812
49
        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
49
        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
49
        if ( options.disableTests == false ) {
2830
49
            tests::test(op, result.second);
2831
49
        }
2832
2833
49
        postprocess(module, op, result);
2834
49
    }
2835
2836
29
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
60
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
60
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
60
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
140
    do {
2725
140
        auto op = getOp(&parentDs, data, size);
2726
140
        auto module = getModule(parentDs);
2727
140
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
3
            break;
2736
3
        }
2737
140
    } while ( parentDs.Get<bool>() == true );
2738
2739
60
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
60
        for (const auto& m : modules ) {
2748
41
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
41
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
41
            moduleIDs.insert(moduleID);
2756
41
        }
2757
2758
60
        std::set<uint64_t> operationModuleIDs;
2759
99
        for (const auto& op : operations) {
2760
99
            operationModuleIDs.insert(op.first->ID);
2761
99
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
159
    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
58
            auto& prevModule = operations[i-1].first;
2788
58
            auto& prevOp = operations[i].second;
2789
2790
58
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
58
                auto& curModifier = op.modifier.GetVectorPtr();
2792
58
                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
33
                } else {
2797
1.02k
                    for (auto& c : curModifier) {
2798
1.02k
                        c++;
2799
1.02k
                    }
2800
25
                }
2801
58
            }
2802
58
        }
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
60
    if ( options.noCompare == false ) {
2837
41
        compare(operations, results, data, size);
2838
41
    }
2839
60
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
49
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
49
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
49
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
105
    do {
2725
105
        auto op = getOp(&parentDs, data, size);
2726
105
        auto module = getModule(parentDs);
2727
105
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
105
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
105
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
105
    } while ( parentDs.Get<bool>() == true );
2738
2739
49
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
49
        for (const auto& m : modules ) {
2748
34
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
34
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
34
            moduleIDs.insert(moduleID);
2756
34
        }
2757
2758
49
        std::set<uint64_t> operationModuleIDs;
2759
78
        for (const auto& op : operations) {
2760
78
            operationModuleIDs.insert(op.first->ID);
2761
78
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
127
    for (size_t i = 0; i < operations.size(); i++) {
2781
78
        auto& operation = operations[i];
2782
2783
78
        auto& module = operation.first;
2784
78
        auto& op = operation.second;
2785
2786
78
        if ( i > 0 ) {
2787
44
            auto& prevModule = operations[i-1].first;
2788
44
            auto& prevOp = operations[i].second;
2789
2790
44
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44
                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
2.43k
                    for (auto& c : curModifier) {
2798
2.43k
                        c++;
2799
2.43k
                    }
2800
19
                }
2801
44
            }
2802
44
        }
2803
2804
78
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
78
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
78
        const auto& result = results.back();
2811
2812
78
        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
78
        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
78
        if ( options.disableTests == false ) {
2830
78
            tests::test(op, result.second);
2831
78
        }
2832
2833
78
        postprocess(module, op, result);
2834
78
    }
2835
2836
49
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
49
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
90
    do {
2725
90
        auto op = getOp(&parentDs, data, size);
2726
90
        auto module = getModule(parentDs);
2727
90
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
2
            break;
2736
2
        }
2737
90
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
36
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
45
            operationModuleIDs.insert(op.first->ID);
2761
45
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
81
    for (size_t i = 0; i < operations.size(); i++) {
2781
45
        auto& operation = operations[i];
2782
2783
45
        auto& module = operation.first;
2784
45
        auto& op = operation.second;
2785
2786
45
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i].second;
2789
2790
28
            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
216
                    for (auto& c : curModifier) {
2798
216
                        c++;
2799
216
                    }
2800
18
                }
2801
28
            }
2802
28
        }
2803
2804
45
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
45
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
45
        const auto& result = results.back();
2811
2812
45
        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
45
        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
45
        if ( options.disableTests == false ) {
2830
45
            tests::test(op, result.second);
2831
45
        }
2832
2833
45
        postprocess(module, op, result);
2834
45
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
41
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
41
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
41
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
97
    do {
2725
97
        auto op = getOp(&parentDs, data, size);
2726
97
        auto module = getModule(parentDs);
2727
97
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
97
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
97
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
97
    } while ( parentDs.Get<bool>() == true );
2738
2739
41
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
41
#if 1
2745
41
    {
2746
41
        std::set<uint64_t> moduleIDs;
2747
41
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
41
        std::set<uint64_t> operationModuleIDs;
2759
50
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
2762
2763
41
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
41
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
41
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
41
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
41
    }
2771
41
#endif
2772
2773
41
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
41
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
91
    for (size_t i = 0; i < operations.size(); i++) {
2781
50
        auto& operation = operations[i];
2782
2783
50
        auto& module = operation.first;
2784
50
        auto& op = operation.second;
2785
2786
50
        if ( i > 0 ) {
2787
33
            auto& prevModule = operations[i-1].first;
2788
33
            auto& prevOp = operations[i].second;
2789
2790
33
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
33
                auto& curModifier = op.modifier.GetVectorPtr();
2792
33
                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
19
                } else {
2797
275
                    for (auto& c : curModifier) {
2798
275
                        c++;
2799
275
                    }
2800
19
                }
2801
33
            }
2802
33
        }
2803
2804
50
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
50
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
50
        const auto& result = results.back();
2811
2812
50
        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
50
        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
50
        if ( options.disableTests == false ) {
2830
50
            tests::test(op, result.second);
2831
50
        }
2832
2833
50
        postprocess(module, op, result);
2834
50
    }
2835
2836
41
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
41
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::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
122
    do {
2725
122
        auto op = getOp(&parentDs, data, size);
2726
122
        auto module = getModule(parentDs);
2727
122
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
2
            break;
2736
2
        }
2737
122
    } while ( parentDs.Get<bool>() == true );
2738
2739
53
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
53
        for (const auto& m : modules ) {
2748
34
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
34
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
34
            moduleIDs.insert(moduleID);
2756
34
        }
2757
2758
53
        std::set<uint64_t> operationModuleIDs;
2759
80
        for (const auto& op : operations) {
2760
80
            operationModuleIDs.insert(op.first->ID);
2761
80
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
133
    for (size_t i = 0; i < operations.size(); i++) {
2781
80
        auto& operation = operations[i];
2782
2783
80
        auto& module = operation.first;
2784
80
        auto& op = operation.second;
2785
2786
80
        if ( i > 0 ) {
2787
46
            auto& prevModule = operations[i-1].first;
2788
46
            auto& prevOp = operations[i].second;
2789
2790
46
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
46
                auto& curModifier = op.modifier.GetVectorPtr();
2792
46
                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
32
                } else {
2797
21.8k
                    for (auto& c : curModifier) {
2798
21.8k
                        c++;
2799
21.8k
                    }
2800
32
                }
2801
46
            }
2802
46
        }
2803
2804
80
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
80
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
80
        const auto& result = results.back();
2811
2812
80
        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
80
        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
80
        if ( options.disableTests == false ) {
2830
80
            tests::test(op, result.second);
2831
80
        }
2832
2833
80
        postprocess(module, op, result);
2834
80
    }
2835
2836
53
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
53
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
538
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
538
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
538
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.24k
    do {
2725
1.24k
        auto op = getOp(&parentDs, data, size);
2726
1.24k
        auto module = getModule(parentDs);
2727
1.24k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.24k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.24k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
42
            break;
2736
42
        }
2737
1.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
538
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
538
#if 1
2745
538
    {
2746
538
        std::set<uint64_t> moduleIDs;
2747
538
        for (const auto& m : modules ) {
2748
388
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
388
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
388
            moduleIDs.insert(moduleID);
2756
388
        }
2757
2758
538
        std::set<uint64_t> operationModuleIDs;
2759
917
        for (const auto& op : operations) {
2760
917
            operationModuleIDs.insert(op.first->ID);
2761
917
        }
2762
2763
538
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
538
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
538
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
538
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
538
    }
2771
538
#endif
2772
2773
538
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
538
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.45k
    for (size_t i = 0; i < operations.size(); i++) {
2781
917
        auto& operation = operations[i];
2782
2783
917
        auto& module = operation.first;
2784
917
        auto& op = operation.second;
2785
2786
917
        if ( i > 0 ) {
2787
529
            auto& prevModule = operations[i-1].first;
2788
529
            auto& prevOp = operations[i].second;
2789
2790
529
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
529
                auto& curModifier = op.modifier.GetVectorPtr();
2792
529
                if ( curModifier.size() == 0 ) {
2793
65.6k
                    for (size_t j = 0; j < 512; j++) {
2794
65.5k
                        curModifier.push_back(1);
2795
65.5k
                    }
2796
401
                } else {
2797
71.1k
                    for (auto& c : curModifier) {
2798
71.1k
                        c++;
2799
71.1k
                    }
2800
401
                }
2801
529
            }
2802
529
        }
2803
2804
917
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
917
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
917
        const auto& result = results.back();
2811
2812
917
        if ( result.second != std::nullopt ) {
2813
148
            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
148
        }
2820
2821
917
        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
917
        if ( options.disableTests == false ) {
2830
917
            tests::test(op, result.second);
2831
917
        }
2832
2833
917
        postprocess(module, op, result);
2834
917
    }
2835
2836
538
    if ( options.noCompare == false ) {
2837
388
        compare(operations, results, data, size);
2838
388
    }
2839
538
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
959
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
959
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
959
    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
0
            continue;
2729
0
        }
2730
2731
2.15k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.15k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
94
            break;
2736
94
        }
2737
2.15k
    } while ( parentDs.Get<bool>() == true );
2738
2739
959
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
959
#if 1
2745
959
    {
2746
959
        std::set<uint64_t> moduleIDs;
2747
959
        for (const auto& m : modules ) {
2748
746
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
746
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
746
            moduleIDs.insert(moduleID);
2756
746
        }
2757
2758
959
        std::set<uint64_t> operationModuleIDs;
2759
1.70k
        for (const auto& op : operations) {
2760
1.70k
            operationModuleIDs.insert(op.first->ID);
2761
1.70k
        }
2762
2763
959
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
959
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
959
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
959
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
959
    }
2771
959
#endif
2772
2773
959
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
959
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.66k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.70k
        auto& operation = operations[i];
2782
2783
1.70k
        auto& module = operation.first;
2784
1.70k
        auto& op = operation.second;
2785
2786
1.70k
        if ( i > 0 ) {
2787
956
            auto& prevModule = operations[i-1].first;
2788
956
            auto& prevOp = operations[i].second;
2789
2790
956
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
956
                auto& curModifier = op.modifier.GetVectorPtr();
2792
956
                if ( curModifier.size() == 0 ) {
2793
103k
                    for (size_t j = 0; j < 512; j++) {
2794
103k
                        curModifier.push_back(1);
2795
103k
                    }
2796
754
                } else {
2797
179k
                    for (auto& c : curModifier) {
2798
179k
                        c++;
2799
179k
                    }
2800
754
                }
2801
956
            }
2802
956
        }
2803
2804
1.70k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.70k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.70k
        const auto& result = results.back();
2811
2812
1.70k
        if ( result.second != std::nullopt ) {
2813
225
            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
225
        }
2820
2821
1.70k
        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.70k
        if ( options.disableTests == false ) {
2830
1.70k
            tests::test(op, result.second);
2831
1.70k
        }
2832
2833
1.70k
        postprocess(module, op, result);
2834
1.70k
    }
2835
2836
959
    if ( options.noCompare == false ) {
2837
746
        compare(operations, results, data, size);
2838
746
    }
2839
959
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
980
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
980
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
980
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.33k
    do {
2725
2.33k
        auto op = getOp(&parentDs, data, size);
2726
2.33k
        auto module = getModule(parentDs);
2727
2.33k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2.33k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.33k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
108
            break;
2736
108
        }
2737
2.33k
    } while ( parentDs.Get<bool>() == true );
2738
2739
980
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
980
#if 1
2745
980
    {
2746
980
        std::set<uint64_t> moduleIDs;
2747
980
        for (const auto& m : modules ) {
2748
774
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
774
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
774
            moduleIDs.insert(moduleID);
2756
774
        }
2757
2758
980
        std::set<uint64_t> operationModuleIDs;
2759
1.91k
        for (const auto& op : operations) {
2760
1.91k
            operationModuleIDs.insert(op.first->ID);
2761
1.91k
        }
2762
2763
980
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
980
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
980
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
980
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
980
    }
2771
980
#endif
2772
2773
980
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
980
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.89k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.91k
        auto& operation = operations[i];
2782
2783
1.91k
        auto& module = operation.first;
2784
1.91k
        auto& op = operation.second;
2785
2786
1.91k
        if ( i > 0 ) {
2787
1.13k
            auto& prevModule = operations[i-1].first;
2788
1.13k
            auto& prevOp = operations[i].second;
2789
2790
1.13k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.13k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.13k
                if ( curModifier.size() == 0 ) {
2793
96.9k
                    for (size_t j = 0; j < 512; j++) {
2794
96.7k
                        curModifier.push_back(1);
2795
96.7k
                    }
2796
949
                } else {
2797
333k
                    for (auto& c : curModifier) {
2798
333k
                        c++;
2799
333k
                    }
2800
949
                }
2801
1.13k
            }
2802
1.13k
        }
2803
2804
1.91k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.91k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.91k
        const auto& result = results.back();
2811
2812
1.91k
        if ( result.second != std::nullopt ) {
2813
35
            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
35
        }
2820
2821
1.91k
        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.91k
        if ( options.disableTests == false ) {
2830
1.91k
            tests::test(op, result.second);
2831
1.91k
        }
2832
2833
1.91k
        postprocess(module, op, result);
2834
1.91k
    }
2835
2836
980
    if ( options.noCompare == false ) {
2837
774
        compare(operations, results, data, size);
2838
774
    }
2839
980
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.64k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.64k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.64k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.36k
    do {
2725
3.36k
        auto op = getOp(&parentDs, data, size);
2726
3.36k
        auto module = getModule(parentDs);
2727
3.36k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.36k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.36k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
112
            break;
2736
112
        }
2737
3.36k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.64k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.64k
#if 1
2745
1.64k
    {
2746
1.64k
        std::set<uint64_t> moduleIDs;
2747
1.64k
        for (const auto& m : modules ) {
2748
1.37k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.37k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.37k
            moduleIDs.insert(moduleID);
2756
1.37k
        }
2757
2758
1.64k
        std::set<uint64_t> operationModuleIDs;
2759
2.86k
        for (const auto& op : operations) {
2760
2.86k
            operationModuleIDs.insert(op.first->ID);
2761
2.86k
        }
2762
2763
1.64k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.64k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.64k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.64k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.64k
    }
2771
1.64k
#endif
2772
2773
1.64k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.64k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.51k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.86k
        auto& operation = operations[i];
2782
2783
2.86k
        auto& module = operation.first;
2784
2.86k
        auto& op = operation.second;
2785
2786
2.86k
        if ( i > 0 ) {
2787
1.49k
            auto& prevModule = operations[i-1].first;
2788
1.49k
            auto& prevOp = operations[i].second;
2789
2790
1.49k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.49k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.49k
                if ( curModifier.size() == 0 ) {
2793
99.0k
                    for (size_t j = 0; j < 512; j++) {
2794
98.8k
                        curModifier.push_back(1);
2795
98.8k
                    }
2796
1.29k
                } else {
2797
507k
                    for (auto& c : curModifier) {
2798
507k
                        c++;
2799
507k
                    }
2800
1.29k
                }
2801
1.49k
            }
2802
1.49k
        }
2803
2804
2.86k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.86k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.86k
        const auto& result = results.back();
2811
2812
2.86k
        if ( result.second != std::nullopt ) {
2813
231
            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
231
        }
2820
2821
2.86k
        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.86k
        if ( options.disableTests == false ) {
2830
2.86k
            tests::test(op, result.second);
2831
2.86k
        }
2832
2833
2.86k
        postprocess(module, op, result);
2834
2.86k
    }
2835
2836
1.64k
    if ( options.noCompare == false ) {
2837
1.37k
        compare(operations, results, data, size);
2838
1.37k
    }
2839
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
83
    do {
2725
83
        auto op = getOp(&parentDs, data, size);
2726
83
        auto module = getModule(parentDs);
2727
83
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
83
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
83
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
83
    } while ( parentDs.Get<bool>() == true );
2738
2739
35
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
35
#if 1
2745
35
    {
2746
35
        std::set<uint64_t> moduleIDs;
2747
35
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
35
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
45
            operationModuleIDs.insert(op.first->ID);
2761
45
        }
2762
2763
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
35
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
35
    }
2771
35
#endif
2772
2773
35
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
35
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
80
    for (size_t i = 0; i < operations.size(); i++) {
2781
45
        auto& operation = operations[i];
2782
2783
45
        auto& module = operation.first;
2784
45
        auto& op = operation.second;
2785
2786
45
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i].second;
2789
2790
28
            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
252
                    for (auto& c : curModifier) {
2798
252
                        c++;
2799
252
                    }
2800
18
                }
2801
28
            }
2802
28
        }
2803
2804
45
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
45
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
45
        const auto& result = results.back();
2811
2812
45
        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
45
        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
45
        if ( options.disableTests == false ) {
2830
45
            tests::test(op, result.second);
2831
45
        }
2832
2833
45
        postprocess(module, op, result);
2834
45
    }
2835
2836
35
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.72k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.72k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.72k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.38k
    do {
2725
4.38k
        auto op = getOp(&parentDs, data, size);
2726
4.38k
        auto module = getModule(parentDs);
2727
4.38k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.38k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.38k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
107
            break;
2736
107
        }
2737
4.38k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.72k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.72k
#if 1
2745
2.72k
    {
2746
2.72k
        std::set<uint64_t> moduleIDs;
2747
2.72k
        for (const auto& m : modules ) {
2748
2.54k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.54k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.54k
            moduleIDs.insert(moduleID);
2756
2.54k
        }
2757
2758
2.72k
        std::set<uint64_t> operationModuleIDs;
2759
4.01k
        for (const auto& op : operations) {
2760
4.01k
            operationModuleIDs.insert(op.first->ID);
2761
4.01k
        }
2762
2763
2.72k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.72k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.72k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.72k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.72k
    }
2771
2.72k
#endif
2772
2773
2.72k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.72k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.74k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.01k
        auto& operation = operations[i];
2782
2783
4.01k
        auto& module = operation.first;
2784
4.01k
        auto& op = operation.second;
2785
2786
4.01k
        if ( i > 0 ) {
2787
1.47k
            auto& prevModule = operations[i-1].first;
2788
1.47k
            auto& prevOp = operations[i].second;
2789
2790
1.47k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.47k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.47k
                if ( curModifier.size() == 0 ) {
2793
111k
                    for (size_t j = 0; j < 512; j++) {
2794
111k
                        curModifier.push_back(1);
2795
111k
                    }
2796
1.26k
                } else {
2797
352k
                    for (auto& c : curModifier) {
2798
352k
                        c++;
2799
352k
                    }
2800
1.26k
                }
2801
1.47k
            }
2802
1.47k
        }
2803
2804
4.01k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.01k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.01k
        const auto& result = results.back();
2811
2812
4.01k
        if ( result.second != std::nullopt ) {
2813
326
            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
326
        }
2820
2821
4.01k
        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.01k
        if ( options.disableTests == false ) {
2830
4.01k
            tests::test(op, result.second);
2831
4.01k
        }
2832
2833
4.01k
        postprocess(module, op, result);
2834
4.01k
    }
2835
2836
2.72k
    if ( options.noCompare == false ) {
2837
2.54k
        compare(operations, results, data, size);
2838
2.54k
    }
2839
2.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
140
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
140
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
140
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
279
    do {
2725
279
        auto op = getOp(&parentDs, data, size);
2726
279
        auto module = getModule(parentDs);
2727
279
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
279
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
279
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
279
    } while ( parentDs.Get<bool>() == true );
2738
2739
140
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
140
#if 1
2745
140
    {
2746
140
        std::set<uint64_t> moduleIDs;
2747
140
        for (const auto& m : modules ) {
2748
126
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
126
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
126
            moduleIDs.insert(moduleID);
2756
126
        }
2757
2758
140
        std::set<uint64_t> operationModuleIDs;
2759
244
        for (const auto& op : operations) {
2760
244
            operationModuleIDs.insert(op.first->ID);
2761
244
        }
2762
2763
140
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
140
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
140
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
140
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
140
    }
2771
140
#endif
2772
2773
140
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
140
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
384
    for (size_t i = 0; i < operations.size(); i++) {
2781
244
        auto& operation = operations[i];
2782
2783
244
        auto& module = operation.first;
2784
244
        auto& op = operation.second;
2785
2786
244
        if ( i > 0 ) {
2787
118
            auto& prevModule = operations[i-1].first;
2788
118
            auto& prevOp = operations[i].second;
2789
2790
118
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
118
                auto& curModifier = op.modifier.GetVectorPtr();
2792
118
                if ( curModifier.size() == 0 ) {
2793
27.7k
                    for (size_t j = 0; j < 512; j++) {
2794
27.6k
                        curModifier.push_back(1);
2795
27.6k
                    }
2796
64
                } else {
2797
2.12k
                    for (auto& c : curModifier) {
2798
2.12k
                        c++;
2799
2.12k
                    }
2800
64
                }
2801
118
            }
2802
118
        }
2803
2804
244
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
244
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
244
        const auto& result = results.back();
2811
2812
244
        if ( result.second != std::nullopt ) {
2813
39
            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
39
        }
2820
2821
244
        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
244
        if ( options.disableTests == false ) {
2830
244
            tests::test(op, result.second);
2831
244
        }
2832
2833
244
        postprocess(module, op, result);
2834
244
    }
2835
2836
140
    if ( options.noCompare == false ) {
2837
126
        compare(operations, results, data, size);
2838
126
    }
2839
140
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.11k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.11k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.11k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.50k
    do {
2725
5.50k
        auto op = getOp(&parentDs, data, size);
2726
5.50k
        auto module = getModule(parentDs);
2727
5.50k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5.50k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.50k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
53
            break;
2736
53
        }
2737
5.50k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.11k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.11k
#if 1
2745
4.11k
    {
2746
4.11k
        std::set<uint64_t> moduleIDs;
2747
4.11k
        for (const auto& m : modules ) {
2748
3.85k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.85k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.85k
            moduleIDs.insert(moduleID);
2756
3.85k
        }
2757
2758
4.11k
        std::set<uint64_t> operationModuleIDs;
2759
5.03k
        for (const auto& op : operations) {
2760
5.03k
            operationModuleIDs.insert(op.first->ID);
2761
5.03k
        }
2762
2763
4.11k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.11k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.11k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.11k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.11k
    }
2771
4.11k
#endif
2772
2773
4.11k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.11k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9.14k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.03k
        auto& operation = operations[i];
2782
2783
5.03k
        auto& module = operation.first;
2784
5.03k
        auto& op = operation.second;
2785
2786
5.03k
        if ( i > 0 ) {
2787
1.17k
            auto& prevModule = operations[i-1].first;
2788
1.17k
            auto& prevOp = operations[i].second;
2789
2790
1.17k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.17k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.17k
                if ( curModifier.size() == 0 ) {
2793
73.3k
                    for (size_t j = 0; j < 512; j++) {
2794
73.2k
                        curModifier.push_back(1);
2795
73.2k
                    }
2796
1.03k
                } else {
2797
209k
                    for (auto& c : curModifier) {
2798
209k
                        c++;
2799
209k
                    }
2800
1.03k
                }
2801
1.17k
            }
2802
1.17k
        }
2803
2804
5.03k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.03k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.03k
        const auto& result = results.back();
2811
2812
5.03k
        if ( result.second != std::nullopt ) {
2813
101
            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
101
        }
2820
2821
5.03k
        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
5.03k
        if ( options.disableTests == false ) {
2830
5.03k
            tests::test(op, result.second);
2831
5.03k
        }
2832
2833
5.03k
        postprocess(module, op, result);
2834
5.03k
    }
2835
2836
4.11k
    if ( options.noCompare == false ) {
2837
3.85k
        compare(operations, results, data, size);
2838
3.85k
    }
2839
4.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::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
142
    do {
2725
142
        auto op = getOp(&parentDs, data, size);
2726
142
        auto module = getModule(parentDs);
2727
142
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
3
            break;
2736
3
        }
2737
142
    } while ( parentDs.Get<bool>() == true );
2738
2739
57
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
57
        for (const auto& m : modules ) {
2748
39
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
39
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
39
            moduleIDs.insert(moduleID);
2756
39
        }
2757
2758
57
        std::set<uint64_t> operationModuleIDs;
2759
98
        for (const auto& op : operations) {
2760
98
            operationModuleIDs.insert(op.first->ID);
2761
98
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
155
    for (size_t i = 0; i < operations.size(); i++) {
2781
98
        auto& operation = operations[i];
2782
2783
98
        auto& module = operation.first;
2784
98
        auto& op = operation.second;
2785
2786
98
        if ( i > 0 ) {
2787
59
            auto& prevModule = operations[i-1].first;
2788
59
            auto& prevOp = operations[i].second;
2789
2790
59
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
59
                auto& curModifier = op.modifier.GetVectorPtr();
2792
59
                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
30
                } else {
2797
1.20k
                    for (auto& c : curModifier) {
2798
1.20k
                        c++;
2799
1.20k
                    }
2800
30
                }
2801
59
            }
2802
59
        }
2803
2804
98
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
98
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
98
        const auto& result = results.back();
2811
2812
98
        if ( result.second != std::nullopt ) {
2813
36
            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
36
        }
2820
2821
98
        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
98
        if ( options.disableTests == false ) {
2830
98
            tests::test(op, result.second);
2831
98
        }
2832
2833
98
        postprocess(module, op, result);
2834
98
    }
2835
2836
57
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
57
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.96k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.96k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.96k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.41k
    do {
2725
4.41k
        auto op = getOp(&parentDs, data, size);
2726
4.41k
        auto module = getModule(parentDs);
2727
4.41k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.41k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.41k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
59
            break;
2736
59
        }
2737
4.41k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.96k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.96k
#if 1
2745
2.96k
    {
2746
2.96k
        std::set<uint64_t> moduleIDs;
2747
2.96k
        for (const auto& m : modules ) {
2748
2.72k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.72k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.72k
            moduleIDs.insert(moduleID);
2756
2.72k
        }
2757
2758
2.96k
        std::set<uint64_t> operationModuleIDs;
2759
3.98k
        for (const auto& op : operations) {
2760
3.98k
            operationModuleIDs.insert(op.first->ID);
2761
3.98k
        }
2762
2763
2.96k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.96k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.96k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.96k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.96k
    }
2771
2.96k
#endif
2772
2773
2.96k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.96k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.95k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.98k
        auto& operation = operations[i];
2782
2783
3.98k
        auto& module = operation.first;
2784
3.98k
        auto& op = operation.second;
2785
2786
3.98k
        if ( i > 0 ) {
2787
1.26k
            auto& prevModule = operations[i-1].first;
2788
1.26k
            auto& prevOp = operations[i].second;
2789
2790
1.26k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.26k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.26k
                if ( curModifier.size() == 0 ) {
2793
174k
                    for (size_t j = 0; j < 512; j++) {
2794
174k
                        curModifier.push_back(1);
2795
174k
                    }
2796
922
                } else {
2797
134k
                    for (auto& c : curModifier) {
2798
134k
                        c++;
2799
134k
                    }
2800
922
                }
2801
1.26k
            }
2802
1.26k
        }
2803
2804
3.98k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.98k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.98k
        const auto& result = results.back();
2811
2812
3.98k
        if ( result.second != std::nullopt ) {
2813
2.20k
            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
2.20k
        }
2820
2821
3.98k
        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.98k
        if ( options.disableTests == false ) {
2830
3.98k
            tests::test(op, result.second);
2831
3.98k
        }
2832
2833
3.98k
        postprocess(module, op, result);
2834
3.98k
    }
2835
2836
2.96k
    if ( options.noCompare == false ) {
2837
2.72k
        compare(operations, results, data, size);
2838
2.72k
    }
2839
2.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.48k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.48k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.48k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.01k
    do {
2725
3.01k
        auto op = getOp(&parentDs, data, size);
2726
3.01k
        auto module = getModule(parentDs);
2727
3.01k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.01k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.01k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
80
            break;
2736
80
        }
2737
3.01k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.48k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.48k
#if 1
2745
1.48k
    {
2746
1.48k
        std::set<uint64_t> moduleIDs;
2747
1.48k
        for (const auto& m : modules ) {
2748
1.23k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.23k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.23k
            moduleIDs.insert(moduleID);
2756
1.23k
        }
2757
2758
1.48k
        std::set<uint64_t> operationModuleIDs;
2759
2.57k
        for (const auto& op : operations) {
2760
2.57k
            operationModuleIDs.insert(op.first->ID);
2761
2.57k
        }
2762
2763
1.48k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.48k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.48k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.48k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.48k
    }
2771
1.48k
#endif
2772
2773
1.48k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.48k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.05k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.57k
        auto& operation = operations[i];
2782
2783
2.57k
        auto& module = operation.first;
2784
2.57k
        auto& op = operation.second;
2785
2786
2.57k
        if ( i > 0 ) {
2787
1.34k
            auto& prevModule = operations[i-1].first;
2788
1.34k
            auto& prevOp = operations[i].second;
2789
2790
1.34k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.34k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.34k
                if ( curModifier.size() == 0 ) {
2793
265k
                    for (size_t j = 0; j < 512; j++) {
2794
264k
                        curModifier.push_back(1);
2795
264k
                    }
2796
824
                } else {
2797
125k
                    for (auto& c : curModifier) {
2798
125k
                        c++;
2799
125k
                    }
2800
824
                }
2801
1.34k
            }
2802
1.34k
        }
2803
2804
2.57k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.57k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.57k
        const auto& result = results.back();
2811
2812
2.57k
        if ( result.second != std::nullopt ) {
2813
470
            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
470
        }
2820
2821
2.57k
        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.57k
        if ( options.disableTests == false ) {
2830
2.57k
            tests::test(op, result.second);
2831
2.57k
        }
2832
2833
2.57k
        postprocess(module, op, result);
2834
2.57k
    }
2835
2836
1.48k
    if ( options.noCompare == false ) {
2837
1.23k
        compare(operations, results, data, size);
2838
1.23k
    }
2839
1.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
39.7k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
39.7k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
39.7k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
53.3k
    do {
2725
53.3k
        auto op = getOp(&parentDs, data, size);
2726
53.3k
        auto module = getModule(parentDs);
2727
53.3k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
53.3k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
53.3k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
701
            break;
2736
701
        }
2737
53.3k
    } while ( parentDs.Get<bool>() == true );
2738
2739
39.7k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
39.7k
#if 1
2745
39.7k
    {
2746
39.7k
        std::set<uint64_t> moduleIDs;
2747
39.7k
        for (const auto& m : modules ) {
2748
39.4k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
39.4k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
39.4k
            moduleIDs.insert(moduleID);
2756
39.4k
        }
2757
2758
39.7k
        std::set<uint64_t> operationModuleIDs;
2759
52.7k
        for (const auto& op : operations) {
2760
52.7k
            operationModuleIDs.insert(op.first->ID);
2761
52.7k
        }
2762
2763
39.7k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
39.7k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
39.7k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
39.7k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
39.7k
    }
2771
39.7k
#endif
2772
2773
39.7k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
39.7k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
92.4k
    for (size_t i = 0; i < operations.size(); i++) {
2781
52.7k
        auto& operation = operations[i];
2782
2783
52.7k
        auto& module = operation.first;
2784
52.7k
        auto& op = operation.second;
2785
2786
52.7k
        if ( i > 0 ) {
2787
13.3k
            auto& prevModule = operations[i-1].first;
2788
13.3k
            auto& prevOp = operations[i].second;
2789
2790
13.3k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
13.3k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
13.3k
                if ( curModifier.size() == 0 ) {
2793
2.03M
                    for (size_t j = 0; j < 512; j++) {
2794
2.03M
                        curModifier.push_back(1);
2795
2.03M
                    }
2796
9.33k
                } else {
2797
3.93M
                    for (auto& c : curModifier) {
2798
3.93M
                        c++;
2799
3.93M
                    }
2800
9.33k
                }
2801
13.3k
            }
2802
13.3k
        }
2803
2804
52.7k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
52.7k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
52.7k
        const auto& result = results.back();
2811
2812
52.7k
        if ( result.second != std::nullopt ) {
2813
18.7k
            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.7k
        }
2820
2821
52.7k
        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
52.7k
        if ( options.disableTests == false ) {
2830
52.7k
            tests::test(op, result.second);
2831
52.7k
        }
2832
2833
52.7k
        postprocess(module, op, result);
2834
52.7k
    }
2835
2836
39.7k
    if ( options.noCompare == false ) {
2837
39.4k
        compare(operations, results, data, size);
2838
39.4k
    }
2839
39.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
80
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
80
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
80
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
176
    do {
2725
176
        auto op = getOp(&parentDs, data, size);
2726
176
        auto module = getModule(parentDs);
2727
176
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
176
    } while ( parentDs.Get<bool>() == true );
2738
2739
80
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
80
#if 1
2745
80
    {
2746
80
        std::set<uint64_t> moduleIDs;
2747
80
        for (const auto& m : modules ) {
2748
64
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
64
            moduleIDs.insert(moduleID);
2756
64
        }
2757
2758
80
        std::set<uint64_t> operationModuleIDs;
2759
140
        for (const auto& op : operations) {
2760
140
            operationModuleIDs.insert(op.first->ID);
2761
140
        }
2762
2763
80
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
80
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
80
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
80
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
80
    }
2771
80
#endif
2772
2773
80
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
80
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
220
    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
76
            auto& prevModule = operations[i-1].first;
2788
76
            auto& prevOp = operations[i].second;
2789
2790
76
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
76
                auto& curModifier = op.modifier.GetVectorPtr();
2792
76
                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
42
                } else {
2797
1.09k
                    for (auto& c : curModifier) {
2798
1.09k
                        c++;
2799
1.09k
                    }
2800
42
                }
2801
76
            }
2802
76
        }
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
80
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
312
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
312
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
312
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
679
    do {
2725
679
        auto op = getOp(&parentDs, data, size);
2726
679
        auto module = getModule(parentDs);
2727
679
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
679
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
679
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
679
    } while ( parentDs.Get<bool>() == true );
2738
2739
312
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
312
#if 1
2745
312
    {
2746
312
        std::set<uint64_t> moduleIDs;
2747
312
        for (const auto& m : modules ) {
2748
288
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
288
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
288
            moduleIDs.insert(moduleID);
2756
288
        }
2757
2758
312
        std::set<uint64_t> operationModuleIDs;
2759
634
        for (const auto& op : operations) {
2760
634
            operationModuleIDs.insert(op.first->ID);
2761
634
        }
2762
2763
312
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
312
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
312
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
312
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
312
    }
2771
312
#endif
2772
2773
312
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
312
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
946
    for (size_t i = 0; i < operations.size(); i++) {
2781
634
        auto& operation = operations[i];
2782
2783
634
        auto& module = operation.first;
2784
634
        auto& op = operation.second;
2785
2786
634
        if ( i > 0 ) {
2787
346
            auto& prevModule = operations[i-1].first;
2788
346
            auto& prevOp = operations[i].second;
2789
2790
346
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
346
                auto& curModifier = op.modifier.GetVectorPtr();
2792
346
                if ( curModifier.size() == 0 ) {
2793
117k
                    for (size_t j = 0; j < 512; j++) {
2794
117k
                        curModifier.push_back(1);
2795
117k
                    }
2796
229
                } else {
2797
67.9k
                    for (auto& c : curModifier) {
2798
67.9k
                        c++;
2799
67.9k
                    }
2800
117
                }
2801
346
            }
2802
346
        }
2803
2804
634
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
634
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
634
        const auto& result = results.back();
2811
2812
634
        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
634
        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
634
        if ( options.disableTests == false ) {
2830
634
            tests::test(op, result.second);
2831
634
        }
2832
2833
634
        postprocess(module, op, result);
2834
634
    }
2835
2836
312
    if ( options.noCompare == false ) {
2837
288
        compare(operations, results, data, size);
2838
288
    }
2839
312
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::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
101
    do {
2725
101
        auto op = getOp(&parentDs, data, size);
2726
101
        auto module = getModule(parentDs);
2727
101
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
101
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
101
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
101
    } while ( parentDs.Get<bool>() == true );
2738
2739
44
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
44
        for (const auto& m : modules ) {
2748
28
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
28
            moduleIDs.insert(moduleID);
2756
28
        }
2757
2758
44
        std::set<uint64_t> operationModuleIDs;
2759
63
        for (const auto& op : operations) {
2760
63
            operationModuleIDs.insert(op.first->ID);
2761
63
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
107
    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
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i].second;
2789
2790
35
            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
338
                    for (auto& c : curModifier) {
2798
338
                        c++;
2799
338
                    }
2800
24
                }
2801
35
            }
2802
35
        }
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
44
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
90
    do {
2725
90
        auto op = getOp(&parentDs, data, size);
2726
90
        auto module = getModule(parentDs);
2727
90
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
4
            break;
2736
4
        }
2737
90
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
23
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
23
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
23
            moduleIDs.insert(moduleID);
2756
23
        }
2757
2758
36
        std::set<uint64_t> operationModuleIDs;
2759
60
        for (const auto& op : operations) {
2760
60
            operationModuleIDs.insert(op.first->ID);
2761
60
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
96
    for (size_t i = 0; i < operations.size(); i++) {
2781
60
        auto& operation = operations[i];
2782
2783
60
        auto& module = operation.first;
2784
60
        auto& op = operation.second;
2785
2786
60
        if ( i > 0 ) {
2787
37
            auto& prevModule = operations[i-1].first;
2788
37
            auto& prevOp = operations[i].second;
2789
2790
37
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
37
                auto& curModifier = op.modifier.GetVectorPtr();
2792
37
                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
23
                } else {
2797
261
                    for (auto& c : curModifier) {
2798
261
                        c++;
2799
261
                    }
2800
23
                }
2801
37
            }
2802
37
        }
2803
2804
60
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
60
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
60
        const auto& result = results.back();
2811
2812
60
        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
60
        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
60
        if ( options.disableTests == false ) {
2830
60
            tests::test(op, result.second);
2831
60
        }
2832
2833
60
        postprocess(module, op, result);
2834
60
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
23
        compare(operations, results, data, size);
2838
23
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::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
96
    do {
2725
96
        auto op = getOp(&parentDs, data, size);
2726
96
        auto module = getModule(parentDs);
2727
96
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
96
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
96
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
96
    } while ( parentDs.Get<bool>() == true );
2738
2739
44
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
44
        for (const auto& m : modules ) {
2748
27
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
27
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
27
            moduleIDs.insert(moduleID);
2756
27
        }
2757
2758
44
        std::set<uint64_t> operationModuleIDs;
2759
62
        for (const auto& op : operations) {
2760
62
            operationModuleIDs.insert(op.first->ID);
2761
62
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
106
    for (size_t i = 0; i < operations.size(); i++) {
2781
62
        auto& operation = operations[i];
2782
2783
62
        auto& module = operation.first;
2784
62
        auto& op = operation.second;
2785
2786
62
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i].second;
2789
2790
35
            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
275
                    for (auto& c : curModifier) {
2798
275
                        c++;
2799
275
                    }
2800
20
                }
2801
35
            }
2802
35
        }
2803
2804
62
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
62
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
62
        const auto& result = results.back();
2811
2812
62
        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
62
        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
62
        if ( options.disableTests == false ) {
2830
62
            tests::test(op, result.second);
2831
62
        }
2832
2833
62
        postprocess(module, op, result);
2834
62
    }
2835
2836
44
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
44
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
77
    do {
2725
77
        auto op = getOp(&parentDs, data, size);
2726
77
        auto module = getModule(parentDs);
2727
77
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
77
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
77
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
77
    } while ( parentDs.Get<bool>() == true );
2738
2739
34
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
34
#if 1
2745
34
    {
2746
34
        std::set<uint64_t> moduleIDs;
2747
34
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
34
        std::set<uint64_t> operationModuleIDs;
2759
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
2762
2763
34
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
34
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
34
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
34
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
34
    }
2771
34
#endif
2772
2773
34
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
34
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
82
    for (size_t i = 0; i < operations.size(); i++) {
2781
48
        auto& operation = operations[i];
2782
2783
48
        auto& module = operation.first;
2784
48
        auto& op = operation.second;
2785
2786
48
        if ( i > 0 ) {
2787
30
            auto& prevModule = operations[i-1].first;
2788
30
            auto& prevOp = operations[i].second;
2789
2790
30
            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
3.16k
                    for (auto& c : curModifier) {
2798
3.16k
                        c++;
2799
3.16k
                    }
2800
20
                }
2801
30
            }
2802
30
        }
2803
2804
48
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
48
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
48
        const auto& result = results.back();
2811
2812
48
        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
48
        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
48
        if ( options.disableTests == false ) {
2830
48
            tests::test(op, result.second);
2831
48
        }
2832
2833
48
        postprocess(module, op, result);
2834
48
    }
2835
2836
34
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
105
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
105
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
105
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
201
    do {
2725
201
        auto op = getOp(&parentDs, data, size);
2726
201
        auto module = getModule(parentDs);
2727
201
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
2
            break;
2736
2
        }
2737
201
    } while ( parentDs.Get<bool>() == true );
2738
2739
105
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
105
#if 1
2745
105
    {
2746
105
        std::set<uint64_t> moduleIDs;
2747
105
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
105
        std::set<uint64_t> operationModuleIDs;
2759
105
        for (const auto& op : operations) {
2760
59
            operationModuleIDs.insert(op.first->ID);
2761
59
        }
2762
2763
105
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
105
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
105
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
105
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
105
    }
2771
105
#endif
2772
2773
105
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
105
    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
59
        auto& operation = operations[i];
2782
2783
59
        auto& module = operation.first;
2784
59
        auto& op = operation.second;
2785
2786
59
        if ( i > 0 ) {
2787
38
            auto& prevModule = operations[i-1].first;
2788
38
            auto& prevOp = operations[i].second;
2789
2790
38
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
38
                auto& curModifier = op.modifier.GetVectorPtr();
2792
38
                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
22
                } else {
2797
1.18k
                    for (auto& c : curModifier) {
2798
1.18k
                        c++;
2799
1.18k
                    }
2800
22
                }
2801
38
            }
2802
38
        }
2803
2804
59
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
59
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
59
        const auto& result = results.back();
2811
2812
59
        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
59
        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
59
        if ( options.disableTests == false ) {
2830
59
            tests::test(op, result.second);
2831
59
        }
2832
2833
59
        postprocess(module, op, result);
2834
59
    }
2835
2836
105
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
105
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::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
154
    do {
2725
154
        auto op = getOp(&parentDs, data, size);
2726
154
        auto module = getModule(parentDs);
2727
154
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
154
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
154
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
154
    } while ( parentDs.Get<bool>() == true );
2738
2739
68
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
68
#if 1
2745
68
    {
2746
68
        std::set<uint64_t> moduleIDs;
2747
68
        for (const auto& m : modules ) {
2748
24
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
24
            moduleIDs.insert(moduleID);
2756
24
        }
2757
2758
68
        std::set<uint64_t> operationModuleIDs;
2759
69
        for (const auto& op : operations) {
2760
69
            operationModuleIDs.insert(op.first->ID);
2761
69
        }
2762
2763
68
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
68
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
68
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
68
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
68
    }
2771
68
#endif
2772
2773
68
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
68
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
137
    for (size_t i = 0; i < operations.size(); i++) {
2781
69
        auto& operation = operations[i];
2782
2783
69
        auto& module = operation.first;
2784
69
        auto& op = operation.second;
2785
2786
69
        if ( i > 0 ) {
2787
45
            auto& prevModule = operations[i-1].first;
2788
45
            auto& prevOp = operations[i].second;
2789
2790
45
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                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
25
                } else {
2797
273
                    for (auto& c : curModifier) {
2798
273
                        c++;
2799
273
                    }
2800
25
                }
2801
45
            }
2802
45
        }
2803
2804
69
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
69
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
69
        const auto& result = results.back();
2811
2812
69
        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
69
        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
69
        if ( options.disableTests == false ) {
2830
69
            tests::test(op, result.second);
2831
69
        }
2832
2833
69
        postprocess(module, op, result);
2834
69
    }
2835
2836
68
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
68
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
105
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
105
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
105
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
194
    do {
2725
194
        auto op = getOp(&parentDs, data, size);
2726
194
        auto module = getModule(parentDs);
2727
194
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
194
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
194
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
194
    } while ( parentDs.Get<bool>() == true );
2738
2739
105
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
105
#if 1
2745
105
    {
2746
105
        std::set<uint64_t> moduleIDs;
2747
105
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
105
        std::set<uint64_t> operationModuleIDs;
2759
105
        for (const auto& op : operations) {
2760
66
            operationModuleIDs.insert(op.first->ID);
2761
66
        }
2762
2763
105
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
105
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
105
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
105
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
105
    }
2771
105
#endif
2772
2773
105
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
105
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
171
    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
45
            auto& prevModule = operations[i-1].first;
2788
45
            auto& prevOp = operations[i].second;
2789
2790
45
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                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
25
                } else {
2797
1.29k
                    for (auto& c : curModifier) {
2798
1.29k
                        c++;
2799
1.29k
                    }
2800
25
                }
2801
45
            }
2802
45
        }
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
105
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
105
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
81
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
81
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
81
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
173
    do {
2725
173
        auto op = getOp(&parentDs, data, size);
2726
173
        auto module = getModule(parentDs);
2727
173
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
6
            break;
2736
6
        }
2737
173
    } while ( parentDs.Get<bool>() == true );
2738
2739
81
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
81
#if 1
2745
81
    {
2746
81
        std::set<uint64_t> moduleIDs;
2747
81
        for (const auto& m : modules ) {
2748
26
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26
            moduleIDs.insert(moduleID);
2756
26
        }
2757
2758
81
        std::set<uint64_t> operationModuleIDs;
2759
81
        for (const auto& op : operations) {
2760
79
            operationModuleIDs.insert(op.first->ID);
2761
79
        }
2762
2763
81
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
81
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
81
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
81
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
81
    }
2771
81
#endif
2772
2773
81
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
81
    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
79
        auto& operation = operations[i];
2782
2783
79
        auto& module = operation.first;
2784
79
        auto& op = operation.second;
2785
2786
79
        if ( i > 0 ) {
2787
53
            auto& prevModule = operations[i-1].first;
2788
53
            auto& prevOp = operations[i].second;
2789
2790
53
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                if ( curModifier.size() == 0 ) {
2793
15.9k
                    for (size_t j = 0; j < 512; j++) {
2794
15.8k
                        curModifier.push_back(1);
2795
15.8k
                    }
2796
31
                } else {
2797
338
                    for (auto& c : curModifier) {
2798
338
                        c++;
2799
338
                    }
2800
22
                }
2801
53
            }
2802
53
        }
2803
2804
79
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
79
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
79
        const auto& result = results.back();
2811
2812
79
        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
79
        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
79
        if ( options.disableTests == false ) {
2830
79
            tests::test(op, result.second);
2831
79
        }
2832
2833
79
        postprocess(module, op, result);
2834
79
    }
2835
2836
81
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
89
    do {
2725
89
        auto op = getOp(&parentDs, data, size);
2726
89
        auto module = getModule(parentDs);
2727
89
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
89
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
89
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
89
    } while ( parentDs.Get<bool>() == true );
2738
2739
34
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
34
#if 1
2745
34
    {
2746
34
        std::set<uint64_t> moduleIDs;
2747
34
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
34
        std::set<uint64_t> operationModuleIDs;
2759
50
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
2762
2763
34
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
34
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
34
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
34
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
34
    }
2771
34
#endif
2772
2773
34
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
34
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
84
    for (size_t i = 0; i < operations.size(); i++) {
2781
50
        auto& operation = operations[i];
2782
2783
50
        auto& module = operation.first;
2784
50
        auto& op = operation.second;
2785
2786
50
        if ( i > 0 ) {
2787
33
            auto& prevModule = operations[i-1].first;
2788
33
            auto& prevOp = operations[i].second;
2789
2790
33
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
33
                auto& curModifier = op.modifier.GetVectorPtr();
2792
33
                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
20
                } else {
2797
2.33k
                    for (auto& c : curModifier) {
2798
2.33k
                        c++;
2799
2.33k
                    }
2800
20
                }
2801
33
            }
2802
33
        }
2803
2804
50
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
50
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
50
        const auto& result = results.back();
2811
2812
50
        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
50
        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
50
        if ( options.disableTests == false ) {
2830
50
            tests::test(op, result.second);
2831
50
        }
2832
2833
50
        postprocess(module, op, result);
2834
50
    }
2835
2836
34
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
89
    do {
2725
89
        auto op = getOp(&parentDs, data, size);
2726
89
        auto module = getModule(parentDs);
2727
89
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
89
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
89
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
89
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
36
        std::set<uint64_t> operationModuleIDs;
2759
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
84
    for (size_t i = 0; i < operations.size(); i++) {
2781
48
        auto& operation = operations[i];
2782
2783
48
        auto& module = operation.first;
2784
48
        auto& op = operation.second;
2785
2786
48
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                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
19
                } else {
2797
287
                    for (auto& c : curModifier) {
2798
287
                        c++;
2799
287
                    }
2800
19
                }
2801
31
            }
2802
31
        }
2803
2804
48
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
48
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
48
        const auto& result = results.back();
2811
2812
48
        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
48
        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
48
        if ( options.disableTests == false ) {
2830
48
            tests::test(op, result.second);
2831
48
        }
2832
2833
48
        postprocess(module, op, result);
2834
48
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
91
    do {
2725
91
        auto op = getOp(&parentDs, data, size);
2726
91
        auto module = getModule(parentDs);
2727
91
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
91
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
91
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
91
    } while ( parentDs.Get<bool>() == true );
2738
2739
35
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
35
#if 1
2745
35
    {
2746
35
        std::set<uint64_t> moduleIDs;
2747
35
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
35
        std::set<uint64_t> operationModuleIDs;
2759
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
2762
2763
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
35
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
35
    }
2771
35
#endif
2772
2773
35
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
35
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
83
    for (size_t i = 0; i < operations.size(); i++) {
2781
48
        auto& operation = operations[i];
2782
2783
48
        auto& module = operation.first;
2784
48
        auto& op = operation.second;
2785
2786
48
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                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
17
                } else {
2797
2.43k
                    for (auto& c : curModifier) {
2798
2.43k
                        c++;
2799
2.43k
                    }
2800
17
                }
2801
31
            }
2802
31
        }
2803
2804
48
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
48
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
48
        const auto& result = results.back();
2811
2812
48
        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
48
        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
48
        if ( options.disableTests == false ) {
2830
48
            tests::test(op, result.second);
2831
48
        }
2832
2833
48
        postprocess(module, op, result);
2834
48
    }
2835
2836
35
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
31
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
31
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
31
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
77
    do {
2725
77
        auto op = getOp(&parentDs, data, size);
2726
77
        auto module = getModule(parentDs);
2727
77
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
77
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
77
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
77
    } while ( parentDs.Get<bool>() == true );
2738
2739
31
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
31
#if 1
2745
31
    {
2746
31
        std::set<uint64_t> moduleIDs;
2747
31
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
31
        std::set<uint64_t> operationModuleIDs;
2759
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
2762
2763
31
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
31
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
31
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
31
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
31
    }
2771
31
#endif
2772
2773
31
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
31
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
79
    for (size_t i = 0; i < operations.size(); i++) {
2781
48
        auto& operation = operations[i];
2782
2783
48
        auto& module = operation.first;
2784
48
        auto& op = operation.second;
2785
2786
48
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                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
20
                } else {
2797
248
                    for (auto& c : curModifier) {
2798
248
                        c++;
2799
248
                    }
2800
20
                }
2801
31
            }
2802
31
        }
2803
2804
48
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
48
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
48
        const auto& result = results.back();
2811
2812
48
        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
48
        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
48
        if ( options.disableTests == false ) {
2830
48
            tests::test(op, result.second);
2831
48
        }
2832
2833
48
        postprocess(module, op, result);
2834
48
    }
2835
2836
31
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
30
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
30
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
30
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
81
    do {
2725
81
        auto op = getOp(&parentDs, data, size);
2726
81
        auto module = getModule(parentDs);
2727
81
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
81
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
81
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
81
    } while ( parentDs.Get<bool>() == true );
2738
2739
30
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
30
#if 1
2745
30
    {
2746
30
        std::set<uint64_t> moduleIDs;
2747
30
        for (const auto& m : modules ) {
2748
15
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
15
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
15
            moduleIDs.insert(moduleID);
2756
15
        }
2757
2758
30
        std::set<uint64_t> operationModuleIDs;
2759
47
        for (const auto& op : operations) {
2760
47
            operationModuleIDs.insert(op.first->ID);
2761
47
        }
2762
2763
30
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
30
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
30
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
30
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
30
    }
2771
30
#endif
2772
2773
30
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
30
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
77
    for (size_t i = 0; i < operations.size(); i++) {
2781
47
        auto& operation = operations[i];
2782
2783
47
        auto& module = operation.first;
2784
47
        auto& op = operation.second;
2785
2786
47
        if ( i > 0 ) {
2787
32
            auto& prevModule = operations[i-1].first;
2788
32
            auto& prevOp = operations[i].second;
2789
2790
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
32
                auto& curModifier = op.modifier.GetVectorPtr();
2792
32
                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
18
                } else {
2797
359
                    for (auto& c : curModifier) {
2798
359
                        c++;
2799
359
                    }
2800
18
                }
2801
32
            }
2802
32
        }
2803
2804
47
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
47
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
47
        const auto& result = results.back();
2811
2812
47
        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
47
        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
47
        if ( options.disableTests == false ) {
2830
47
            tests::test(op, result.second);
2831
47
        }
2832
2833
47
        postprocess(module, op, result);
2834
47
    }
2835
2836
30
    if ( options.noCompare == false ) {
2837
15
        compare(operations, results, data, size);
2838
15
    }
2839
30
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
73
    do {
2725
73
        auto op = getOp(&parentDs, data, size);
2726
73
        auto module = getModule(parentDs);
2727
73
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
73
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
73
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
73
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
29
        std::set<uint64_t> operationModuleIDs;
2759
44
        for (const auto& op : operations) {
2760
44
            operationModuleIDs.insert(op.first->ID);
2761
44
        }
2762
2763
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
29
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
29
    }
2771
29
#endif
2772
2773
29
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
29
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
73
    for (size_t i = 0; i < operations.size(); i++) {
2781
44
        auto& operation = operations[i];
2782
2783
44
        auto& module = operation.first;
2784
44
        auto& op = operation.second;
2785
2786
44
        if ( i > 0 ) {
2787
27
            auto& prevModule = operations[i-1].first;
2788
27
            auto& prevOp = operations[i].second;
2789
2790
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
27
                auto& curModifier = op.modifier.GetVectorPtr();
2792
27
                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
14
                } else {
2797
332
                    for (auto& c : curModifier) {
2798
332
                        c++;
2799
332
                    }
2800
14
                }
2801
27
            }
2802
27
        }
2803
2804
44
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
44
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
44
        const auto& result = results.back();
2811
2812
44
        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
44
        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
44
        if ( options.disableTests == false ) {
2830
44
            tests::test(op, result.second);
2831
44
        }
2832
2833
44
        postprocess(module, op, result);
2834
44
    }
2835
2836
29
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
72
    do {
2725
72
        auto op = getOp(&parentDs, data, size);
2726
72
        auto module = getModule(parentDs);
2727
72
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
2
            break;
2736
2
        }
2737
72
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
29
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
45
            operationModuleIDs.insert(op.first->ID);
2761
45
        }
2762
2763
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
29
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
29
    }
2771
29
#endif
2772
2773
29
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
29
    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
45
        auto& operation = operations[i];
2782
2783
45
        auto& module = operation.first;
2784
45
        auto& op = operation.second;
2785
2786
45
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i].second;
2789
2790
28
            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
1.04k
                    for (auto& c : curModifier) {
2798
1.04k
                        c++;
2799
1.04k
                    }
2800
18
                }
2801
28
            }
2802
28
        }
2803
2804
45
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
45
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
45
        const auto& result = results.back();
2811
2812
45
        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
45
        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
45
        if ( options.disableTests == false ) {
2830
45
            tests::test(op, result.second);
2831
45
        }
2832
2833
45
        postprocess(module, op, result);
2834
45
    }
2835
2836
29
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::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
110
    do {
2725
110
        auto op = getOp(&parentDs, data, size);
2726
110
        auto module = getModule(parentDs);
2727
110
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
3
            break;
2736
3
        }
2737
110
    } while ( parentDs.Get<bool>() == true );
2738
2739
52
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
52
#if 1
2745
52
    {
2746
52
        std::set<uint64_t> moduleIDs;
2747
52
        for (const auto& m : modules ) {
2748
34
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
34
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
34
            moduleIDs.insert(moduleID);
2756
34
        }
2757
2758
52
        std::set<uint64_t> operationModuleIDs;
2759
69
        for (const auto& op : operations) {
2760
69
            operationModuleIDs.insert(op.first->ID);
2761
69
        }
2762
2763
52
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
52
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
52
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
52
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
52
    }
2771
52
#endif
2772
2773
52
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
52
    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
69
        auto& operation = operations[i];
2782
2783
69
        auto& module = operation.first;
2784
69
        auto& op = operation.second;
2785
2786
69
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                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
21
                } else {
2797
985
                    for (auto& c : curModifier) {
2798
985
                        c++;
2799
985
                    }
2800
21
                }
2801
35
            }
2802
35
        }
2803
2804
69
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
69
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
69
        const auto& result = results.back();
2811
2812
69
        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
69
        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
69
        if ( options.disableTests == false ) {
2830
69
            tests::test(op, result.second);
2831
69
        }
2832
2833
69
        postprocess(module, op, result);
2834
69
    }
2835
2836
52
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
52
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
48
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
48
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
48
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
115
    do {
2725
115
        auto op = getOp(&parentDs, data, size);
2726
115
        auto module = getModule(parentDs);
2727
115
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
115
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
115
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
115
    } while ( parentDs.Get<bool>() == true );
2738
2739
48
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
48
        for (const auto& m : modules ) {
2748
33
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
33
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
33
            moduleIDs.insert(moduleID);
2756
33
        }
2757
2758
48
        std::set<uint64_t> operationModuleIDs;
2759
83
        for (const auto& op : operations) {
2760
83
            operationModuleIDs.insert(op.first->ID);
2761
83
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
131
    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
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
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
15.9k
                    for (size_t j = 0; j < 512; j++) {
2794
15.8k
                        curModifier.push_back(1);
2795
15.8k
                    }
2796
31
                } else {
2797
5.11k
                    for (auto& c : curModifier) {
2798
5.11k
                        c++;
2799
5.11k
                    }
2800
19
                }
2801
50
            }
2802
50
        }
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
48
    if ( options.noCompare == false ) {
2837
33
        compare(operations, results, data, size);
2838
33
    }
2839
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
27
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
27
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
27
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
68
    do {
2725
68
        auto op = getOp(&parentDs, data, size);
2726
68
        auto module = getModule(parentDs);
2727
68
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
68
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
68
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
68
    } while ( parentDs.Get<bool>() == true );
2738
2739
27
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
27
#if 1
2745
27
    {
2746
27
        std::set<uint64_t> moduleIDs;
2747
27
        for (const auto& m : modules ) {
2748
15
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
15
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
15
            moduleIDs.insert(moduleID);
2756
15
        }
2757
2758
27
        std::set<uint64_t> operationModuleIDs;
2759
42
        for (const auto& op : operations) {
2760
42
            operationModuleIDs.insert(op.first->ID);
2761
42
        }
2762
2763
27
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
27
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
27
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
27
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
27
    }
2771
27
#endif
2772
2773
27
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
27
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
69
    for (size_t i = 0; i < operations.size(); i++) {
2781
42
        auto& operation = operations[i];
2782
2783
42
        auto& module = operation.first;
2784
42
        auto& op = operation.second;
2785
2786
42
        if ( i > 0 ) {
2787
27
            auto& prevModule = operations[i-1].first;
2788
27
            auto& prevOp = operations[i].second;
2789
2790
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
27
                auto& curModifier = op.modifier.GetVectorPtr();
2792
27
                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
17
                } else {
2797
273
                    for (auto& c : curModifier) {
2798
273
                        c++;
2799
273
                    }
2800
17
                }
2801
27
            }
2802
27
        }
2803
2804
42
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
42
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
42
        const auto& result = results.back();
2811
2812
42
        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
42
        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
42
        if ( options.disableTests == false ) {
2830
42
            tests::test(op, result.second);
2831
42
        }
2832
2833
42
        postprocess(module, op, result);
2834
42
    }
2835
2836
27
    if ( options.noCompare == false ) {
2837
15
        compare(operations, results, data, size);
2838
15
    }
2839
27
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
27
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
27
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
27
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
68
    do {
2725
68
        auto op = getOp(&parentDs, data, size);
2726
68
        auto module = getModule(parentDs);
2727
68
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
68
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
68
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
68
    } while ( parentDs.Get<bool>() == true );
2738
2739
27
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
27
#if 1
2745
27
    {
2746
27
        std::set<uint64_t> moduleIDs;
2747
27
        for (const auto& m : modules ) {
2748
16
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
16
            moduleIDs.insert(moduleID);
2756
16
        }
2757
2758
27
        std::set<uint64_t> operationModuleIDs;
2759
43
        for (const auto& op : operations) {
2760
43
            operationModuleIDs.insert(op.first->ID);
2761
43
        }
2762
2763
27
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
27
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
27
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
27
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
27
    }
2771
27
#endif
2772
2773
27
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
27
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
70
    for (size_t i = 0; i < operations.size(); i++) {
2781
43
        auto& operation = operations[i];
2782
2783
43
        auto& module = operation.first;
2784
43
        auto& op = operation.second;
2785
2786
43
        if ( i > 0 ) {
2787
27
            auto& prevModule = operations[i-1].first;
2788
27
            auto& prevOp = operations[i].second;
2789
2790
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
27
                auto& curModifier = op.modifier.GetVectorPtr();
2792
27
                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
17
                } else {
2797
526
                    for (auto& c : curModifier) {
2798
526
                        c++;
2799
526
                    }
2800
17
                }
2801
27
            }
2802
27
        }
2803
2804
43
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
43
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
43
        const auto& result = results.back();
2811
2812
43
        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
43
        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
43
        if ( options.disableTests == false ) {
2830
43
            tests::test(op, result.second);
2831
43
        }
2832
2833
43
        postprocess(module, op, result);
2834
43
    }
2835
2836
27
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
31
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
31
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
31
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
79
    do {
2725
79
        auto op = getOp(&parentDs, data, size);
2726
79
        auto module = getModule(parentDs);
2727
79
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
79
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
79
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
79
    } while ( parentDs.Get<bool>() == true );
2738
2739
31
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
31
#if 1
2745
31
    {
2746
31
        std::set<uint64_t> moduleIDs;
2747
31
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
31
        std::set<uint64_t> operationModuleIDs;
2759
46
        for (const auto& op : operations) {
2760
46
            operationModuleIDs.insert(op.first->ID);
2761
46
        }
2762
2763
31
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
31
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
31
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
31
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
31
    }
2771
31
#endif
2772
2773
31
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
31
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
77
    for (size_t i = 0; i < operations.size(); i++) {
2781
46
        auto& operation = operations[i];
2782
2783
46
        auto& module = operation.first;
2784
46
        auto& op = operation.second;
2785
2786
46
        if ( i > 0 ) {
2787
29
            auto& prevModule = operations[i-1].first;
2788
29
            auto& prevOp = operations[i].second;
2789
2790
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
29
                auto& curModifier = op.modifier.GetVectorPtr();
2792
29
                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
19
                } else {
2797
296
                    for (auto& c : curModifier) {
2798
296
                        c++;
2799
296
                    }
2800
19
                }
2801
29
            }
2802
29
        }
2803
2804
46
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
46
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
46
        const auto& result = results.back();
2811
2812
46
        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
46
        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
46
        if ( options.disableTests == false ) {
2830
46
            tests::test(op, result.second);
2831
46
        }
2832
2833
46
        postprocess(module, op, result);
2834
46
    }
2835
2836
31
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
86
    do {
2725
86
        auto op = getOp(&parentDs, data, size);
2726
86
        auto module = getModule(parentDs);
2727
86
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
2
            break;
2736
2
        }
2737
86
    } while ( parentDs.Get<bool>() == true );
2738
2739
34
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
34
#if 1
2745
34
    {
2746
34
        std::set<uint64_t> moduleIDs;
2747
34
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
34
        std::set<uint64_t> operationModuleIDs;
2759
46
        for (const auto& op : operations) {
2760
46
            operationModuleIDs.insert(op.first->ID);
2761
46
        }
2762
2763
34
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
34
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
34
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
34
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
34
    }
2771
34
#endif
2772
2773
34
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
34
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
80
    for (size_t i = 0; i < operations.size(); i++) {
2781
46
        auto& operation = operations[i];
2782
2783
46
        auto& module = operation.first;
2784
46
        auto& op = operation.second;
2785
2786
46
        if ( i > 0 ) {
2787
29
            auto& prevModule = operations[i-1].first;
2788
29
            auto& prevOp = operations[i].second;
2789
2790
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
29
                auto& curModifier = op.modifier.GetVectorPtr();
2792
29
                if ( curModifier.size() == 0 ) {
2793
4.61k
                    for (size_t j = 0; j < 512; j++) {
2794
4.60k
                        curModifier.push_back(1);
2795
4.60k
                    }
2796
20
                } else {
2797
537
                    for (auto& c : curModifier) {
2798
537
                        c++;
2799
537
                    }
2800
20
                }
2801
29
            }
2802
29
        }
2803
2804
46
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
46
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
46
        const auto& result = results.back();
2811
2812
46
        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
46
        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
46
        if ( options.disableTests == false ) {
2830
46
            tests::test(op, result.second);
2831
46
        }
2832
2833
46
        postprocess(module, op, result);
2834
46
    }
2835
2836
34
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
30
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
30
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
30
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
80
    do {
2725
80
        auto op = getOp(&parentDs, data, size);
2726
80
        auto module = getModule(parentDs);
2727
80
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
80
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
80
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
80
    } while ( parentDs.Get<bool>() == true );
2738
2739
30
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
30
#if 1
2745
30
    {
2746
30
        std::set<uint64_t> moduleIDs;
2747
30
        for (const auto& m : modules ) {
2748
16
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
16
            moduleIDs.insert(moduleID);
2756
16
        }
2757
2758
30
        std::set<uint64_t> operationModuleIDs;
2759
44
        for (const auto& op : operations) {
2760
44
            operationModuleIDs.insert(op.first->ID);
2761
44
        }
2762
2763
30
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
30
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
30
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
30
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
30
    }
2771
30
#endif
2772
2773
30
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
30
    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
44
        auto& operation = operations[i];
2782
2783
44
        auto& module = operation.first;
2784
44
        auto& op = operation.second;
2785
2786
44
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i].second;
2789
2790
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
28
                auto& curModifier = op.modifier.GetVectorPtr();
2792
28
                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
17
                } else {
2797
295
                    for (auto& c : curModifier) {
2798
295
                        c++;
2799
295
                    }
2800
17
                }
2801
28
            }
2802
28
        }
2803
2804
44
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
44
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
44
        const auto& result = results.back();
2811
2812
44
        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
44
        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
44
        if ( options.disableTests == false ) {
2830
44
            tests::test(op, result.second);
2831
44
        }
2832
2833
44
        postprocess(module, op, result);
2834
44
    }
2835
2836
30
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
30
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::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
137
    do {
2725
137
        auto op = getOp(&parentDs, data, size);
2726
137
        auto module = getModule(parentDs);
2727
137
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
137
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
137
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
137
    } while ( parentDs.Get<bool>() == true );
2738
2739
64
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
64
        for (const auto& m : modules ) {
2748
50
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
50
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
50
            moduleIDs.insert(moduleID);
2756
50
        }
2757
2758
64
        std::set<uint64_t> operationModuleIDs;
2759
102
        for (const auto& op : operations) {
2760
102
            operationModuleIDs.insert(op.first->ID);
2761
102
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
166
    for (size_t i = 0; i < operations.size(); i++) {
2781
102
        auto& operation = operations[i];
2782
2783
102
        auto& module = operation.first;
2784
102
        auto& op = operation.second;
2785
2786
102
        if ( i > 0 ) {
2787
52
            auto& prevModule = operations[i-1].first;
2788
52
            auto& prevOp = operations[i].second;
2789
2790
52
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
52
                auto& curModifier = op.modifier.GetVectorPtr();
2792
52
                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
30
                } else {
2797
2.78k
                    for (auto& c : curModifier) {
2798
2.78k
                        c++;
2799
2.78k
                    }
2800
30
                }
2801
52
            }
2802
52
        }
2803
2804
102
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
102
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
102
        const auto& result = results.back();
2811
2812
102
        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
102
        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
102
        if ( options.disableTests == false ) {
2830
102
            tests::test(op, result.second);
2831
102
        }
2832
2833
102
        postprocess(module, op, result);
2834
102
    }
2835
2836
64
    if ( options.noCompare == false ) {
2837
50
        compare(operations, results, data, size);
2838
50
    }
2839
64
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
48
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
48
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
48
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
104
    do {
2725
104
        auto op = getOp(&parentDs, data, size);
2726
104
        auto module = getModule(parentDs);
2727
104
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
104
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
104
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
104
    } while ( parentDs.Get<bool>() == true );
2738
2739
48
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
48
        for (const auto& m : modules ) {
2748
37
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
37
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
37
            moduleIDs.insert(moduleID);
2756
37
        }
2757
2758
48
        std::set<uint64_t> operationModuleIDs;
2759
83
        for (const auto& op : operations) {
2760
83
            operationModuleIDs.insert(op.first->ID);
2761
83
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
131
    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
46
            auto& prevModule = operations[i-1].first;
2788
46
            auto& prevOp = operations[i].second;
2789
2790
46
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
46
                auto& curModifier = op.modifier.GetVectorPtr();
2792
46
                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
28
                } else {
2797
1.01k
                    for (auto& c : curModifier) {
2798
1.01k
                        c++;
2799
1.01k
                    }
2800
28
                }
2801
46
            }
2802
46
        }
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
48
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
48
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
76
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
76
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
76
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
160
    do {
2725
160
        auto op = getOp(&parentDs, data, size);
2726
160
        auto module = getModule(parentDs);
2727
160
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
160
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
160
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
160
    } while ( parentDs.Get<bool>() == true );
2738
2739
76
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
76
#if 1
2745
76
    {
2746
76
        std::set<uint64_t> moduleIDs;
2747
76
        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
76
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
128
            operationModuleIDs.insert(op.first->ID);
2761
128
        }
2762
2763
76
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
76
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
76
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
76
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
76
    }
2771
76
#endif
2772
2773
76
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
76
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
204
    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
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
65
                auto& curModifier = op.modifier.GetVectorPtr();
2792
65
                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
35
                } else {
2797
4.13k
                    for (auto& c : curModifier) {
2798
4.13k
                        c++;
2799
4.13k
                    }
2800
30
                }
2801
65
            }
2802
65
        }
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
76
    if ( options.noCompare == false ) {
2837
63
        compare(operations, results, data, size);
2838
63
    }
2839
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::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
115
    do {
2725
115
        auto op = getOp(&parentDs, data, size);
2726
115
        auto module = getModule(parentDs);
2727
115
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
115
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
115
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
115
    } while ( parentDs.Get<bool>() == true );
2738
2739
57
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
57
        for (const auto& m : modules ) {
2748
39
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
39
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
39
            moduleIDs.insert(moduleID);
2756
39
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
130
    for (size_t i = 0; i < operations.size(); i++) {
2781
73
        auto& operation = operations[i];
2782
2783
73
        auto& module = operation.first;
2784
73
        auto& op = operation.second;
2785
2786
73
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
34
                auto& curModifier = op.modifier.GetVectorPtr();
2792
34
                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
28
                } else {
2797
6.17k
                    for (auto& c : curModifier) {
2798
6.17k
                        c++;
2799
6.17k
                    }
2800
28
                }
2801
34
            }
2802
34
        }
2803
2804
73
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
73
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
73
        const auto& result = results.back();
2811
2812
73
        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
73
        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
73
        if ( options.disableTests == false ) {
2830
73
            tests::test(op, result.second);
2831
73
        }
2832
2833
73
        postprocess(module, op, result);
2834
73
    }
2835
2836
57
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
57
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
107
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
107
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
107
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
219
    do {
2725
219
        auto op = getOp(&parentDs, data, size);
2726
219
        auto module = getModule(parentDs);
2727
219
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
219
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
219
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
219
    } while ( parentDs.Get<bool>() == true );
2738
2739
107
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
107
#if 1
2745
107
    {
2746
107
        std::set<uint64_t> moduleIDs;
2747
107
        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
107
        std::set<uint64_t> operationModuleIDs;
2759
177
        for (const auto& op : operations) {
2760
177
            operationModuleIDs.insert(op.first->ID);
2761
177
        }
2762
2763
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
107
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
107
    }
2771
107
#endif
2772
2773
107
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
107
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
284
    for (size_t i = 0; i < operations.size(); i++) {
2781
177
        auto& operation = operations[i];
2782
2783
177
        auto& module = operation.first;
2784
177
        auto& op = operation.second;
2785
2786
177
        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
87
                auto& curModifier = op.modifier.GetVectorPtr();
2792
87
                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
24.9k
                    for (auto& c : curModifier) {
2798
24.9k
                        c++;
2799
24.9k
                    }
2800
43
                }
2801
87
            }
2802
87
        }
2803
2804
177
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
177
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
177
        const auto& result = results.back();
2811
2812
177
        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
177
        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
177
        if ( options.disableTests == false ) {
2830
177
            tests::test(op, result.second);
2831
177
        }
2832
2833
177
        postprocess(module, op, result);
2834
177
    }
2835
2836
107
    if ( options.noCompare == false ) {
2837
90
        compare(operations, results, data, size);
2838
90
    }
2839
107
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
76
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
76
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
76
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
138
    do {
2725
138
        auto op = getOp(&parentDs, data, size);
2726
138
        auto module = getModule(parentDs);
2727
138
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
138
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
138
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
138
    } while ( parentDs.Get<bool>() == true );
2738
2739
76
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
76
#if 1
2745
76
    {
2746
76
        std::set<uint64_t> moduleIDs;
2747
76
        for (const auto& m : modules ) {
2748
64
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
64
            moduleIDs.insert(moduleID);
2756
64
        }
2757
2758
76
        std::set<uint64_t> operationModuleIDs;
2759
111
        for (const auto& op : operations) {
2760
111
            operationModuleIDs.insert(op.first->ID);
2761
111
        }
2762
2763
76
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
76
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
76
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
76
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
76
    }
2771
76
#endif
2772
2773
76
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
76
    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
111
        auto& operation = operations[i];
2782
2783
111
        auto& module = operation.first;
2784
111
        auto& op = operation.second;
2785
2786
111
        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
47
                auto& curModifier = op.modifier.GetVectorPtr();
2792
47
                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
30
                } else {
2797
3.91k
                    for (auto& c : curModifier) {
2798
3.91k
                        c++;
2799
3.91k
                    }
2800
30
                }
2801
47
            }
2802
47
        }
2803
2804
111
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
111
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
111
        const auto& result = results.back();
2811
2812
111
        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
111
        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
111
        if ( options.disableTests == false ) {
2830
111
            tests::test(op, result.second);
2831
111
        }
2832
2833
111
        postprocess(module, op, result);
2834
111
    }
2835
2836
76
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
76
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
109
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
109
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
109
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
220
    do {
2725
220
        auto op = getOp(&parentDs, data, size);
2726
220
        auto module = getModule(parentDs);
2727
220
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
220
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
220
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
220
    } while ( parentDs.Get<bool>() == true );
2738
2739
109
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
109
#if 1
2745
109
    {
2746
109
        std::set<uint64_t> moduleIDs;
2747
109
        for (const auto& m : modules ) {
2748
86
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
86
            moduleIDs.insert(moduleID);
2756
86
        }
2757
2758
109
        std::set<uint64_t> operationModuleIDs;
2759
168
        for (const auto& op : operations) {
2760
168
            operationModuleIDs.insert(op.first->ID);
2761
168
        }
2762
2763
109
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
109
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
109
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
109
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
109
    }
2771
109
#endif
2772
2773
109
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
109
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
277
    for (size_t i = 0; i < operations.size(); i++) {
2781
168
        auto& operation = operations[i];
2782
2783
168
        auto& module = operation.first;
2784
168
        auto& op = operation.second;
2785
2786
168
        if ( i > 0 ) {
2787
82
            auto& prevModule = operations[i-1].first;
2788
82
            auto& prevOp = operations[i].second;
2789
2790
82
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
82
                auto& curModifier = op.modifier.GetVectorPtr();
2792
82
                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
50
                } else {
2797
6.80k
                    for (auto& c : curModifier) {
2798
6.80k
                        c++;
2799
6.80k
                    }
2800
50
                }
2801
82
            }
2802
82
        }
2803
2804
168
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
168
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
168
        const auto& result = results.back();
2811
2812
168
        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
168
        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
168
        if ( options.disableTests == false ) {
2830
168
            tests::test(op, result.second);
2831
168
        }
2832
2833
168
        postprocess(module, op, result);
2834
168
    }
2835
2836
109
    if ( options.noCompare == false ) {
2837
86
        compare(operations, results, data, size);
2838
86
    }
2839
109
}
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
128
    do {
2725
128
        auto op = getOp(&parentDs, data, size);
2726
128
        auto module = getModule(parentDs);
2727
128
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
128
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
128
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
128
    } while ( parentDs.Get<bool>() == true );
2738
2739
66
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
66
#if 1
2745
66
    {
2746
66
        std::set<uint64_t> moduleIDs;
2747
66
        for (const auto& m : modules ) {
2748
49
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
49
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
49
            moduleIDs.insert(moduleID);
2756
49
        }
2757
2758
66
        std::set<uint64_t> operationModuleIDs;
2759
88
        for (const auto& op : operations) {
2760
88
            operationModuleIDs.insert(op.first->ID);
2761
88
        }
2762
2763
66
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
66
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
66
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
66
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
66
    }
2771
66
#endif
2772
2773
66
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
66
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
154
    for (size_t i = 0; i < operations.size(); i++) {
2781
88
        auto& operation = operations[i];
2782
2783
88
        auto& module = operation.first;
2784
88
        auto& op = operation.second;
2785
2786
88
        if ( i > 0 ) {
2787
39
            auto& prevModule = operations[i-1].first;
2788
39
            auto& prevOp = operations[i].second;
2789
2790
39
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
39
                auto& curModifier = op.modifier.GetVectorPtr();
2792
39
                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
24
                } else {
2797
2.11k
                    for (auto& c : curModifier) {
2798
2.11k
                        c++;
2799
2.11k
                    }
2800
24
                }
2801
39
            }
2802
39
        }
2803
2804
88
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
88
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
88
        const auto& result = results.back();
2811
2812
88
        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
88
        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
88
        if ( options.disableTests == false ) {
2830
88
            tests::test(op, result.second);
2831
88
        }
2832
2833
88
        postprocess(module, op, result);
2834
88
    }
2835
2836
66
    if ( options.noCompare == false ) {
2837
49
        compare(operations, results, data, size);
2838
49
    }
2839
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
113
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
113
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
113
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
218
    do {
2725
218
        auto op = getOp(&parentDs, data, size);
2726
218
        auto module = getModule(parentDs);
2727
218
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
218
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
218
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
218
    } while ( parentDs.Get<bool>() == true );
2738
2739
113
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
113
#if 1
2745
113
    {
2746
113
        std::set<uint64_t> moduleIDs;
2747
113
        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
113
        std::set<uint64_t> operationModuleIDs;
2759
116
        for (const auto& op : operations) {
2760
116
            operationModuleIDs.insert(op.first->ID);
2761
116
        }
2762
2763
113
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
113
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
113
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
113
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
113
    }
2771
113
#endif
2772
2773
113
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
113
    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
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
62
            auto& prevModule = operations[i-1].first;
2788
62
            auto& prevOp = operations[i].second;
2789
2790
62
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
62
                auto& curModifier = op.modifier.GetVectorPtr();
2792
62
                if ( curModifier.size() == 0 ) {
2793
15.9k
                    for (size_t j = 0; j < 512; j++) {
2794
15.8k
                        curModifier.push_back(1);
2795
15.8k
                    }
2796
31
                } else {
2797
23.0k
                    for (auto& c : curModifier) {
2798
23.0k
                        c++;
2799
23.0k
                    }
2800
31
                }
2801
62
            }
2802
62
        }
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
113
    if ( options.noCompare == false ) {
2837
54
        compare(operations, results, data, size);
2838
54
    }
2839
113
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
78
    do {
2725
78
        auto op = getOp(&parentDs, data, size);
2726
78
        auto module = getModule(parentDs);
2727
78
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
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
78
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
16
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
16
            moduleIDs.insert(moduleID);
2756
16
        }
2757
2758
29
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
45
            operationModuleIDs.insert(op.first->ID);
2761
45
        }
2762
2763
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
29
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
29
    }
2771
29
#endif
2772
2773
29
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
29
    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
45
        auto& operation = operations[i];
2782
2783
45
        auto& module = operation.first;
2784
45
        auto& op = operation.second;
2785
2786
45
        if ( i > 0 ) {
2787
29
            auto& prevModule = operations[i-1].first;
2788
29
            auto& prevOp = operations[i].second;
2789
2790
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
29
                auto& curModifier = op.modifier.GetVectorPtr();
2792
29
                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
17
                } else {
2797
496
                    for (auto& c : curModifier) {
2798
496
                        c++;
2799
496
                    }
2800
17
                }
2801
29
            }
2802
29
        }
2803
2804
45
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
45
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
45
        const auto& result = results.back();
2811
2812
45
        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
45
        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
45
        if ( options.disableTests == false ) {
2830
45
            tests::test(op, result.second);
2831
45
        }
2832
2833
45
        postprocess(module, op, result);
2834
45
    }
2835
2836
29
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::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
130
    do {
2725
130
        auto op = getOp(&parentDs, data, size);
2726
130
        auto module = getModule(parentDs);
2727
130
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
130
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
130
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
130
    } while ( parentDs.Get<bool>() == true );
2738
2739
65
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
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
19
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
19
            moduleIDs.insert(moduleID);
2756
19
        }
2757
2758
65
        std::set<uint64_t> operationModuleIDs;
2759
65
        for (const auto& op : operations) {
2760
54
            operationModuleIDs.insert(op.first->ID);
2761
54
        }
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
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
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
119
    for (size_t i = 0; i < operations.size(); i++) {
2781
54
        auto& operation = operations[i];
2782
2783
54
        auto& module = operation.first;
2784
54
        auto& op = operation.second;
2785
2786
54
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                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
19
                } else {
2797
331
                    for (auto& c : curModifier) {
2798
331
                        c++;
2799
331
                    }
2800
19
                }
2801
35
            }
2802
35
        }
2803
2804
54
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
54
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
54
        const auto& result = results.back();
2811
2812
54
        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
54
        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
54
        if ( options.disableTests == false ) {
2830
54
            tests::test(op, result.second);
2831
54
        }
2832
2833
54
        postprocess(module, op, result);
2834
54
    }
2835
2836
65
    if ( options.noCompare == false ) {
2837
19
        compare(operations, results, data, size);
2838
19
    }
2839
65
}
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 */