Coverage Report

Created: 2024-11-21 07:00

/src/cryptofuzz/executor.cpp
Line
Count
Source (jump to first uncovered line)
1
#include "executor.h"
2
#include "tests.h"
3
#include "mutatorpool.h"
4
#include "config.h"
5
#include <cryptofuzz/util.h>
6
#include <fuzzing/memory.hpp>
7
#include <algorithm>
8
#include <set>
9
#include <boost/multiprecision/cpp_int.hpp>
10
11
uint32_t PRNG(void);
12
13
99.7k
#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
5.78k
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
5.78k
    (void)module;
53
5.78k
    (void)op;
54
55
5.78k
    if ( result.second != std::nullopt ) {
56
3.07k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
3.07k
    }
58
5.78k
}
59
60
5.78k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
5.78k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
5.78k
    return module->OpDigest(op);
64
5.78k
}
65
66
/* Specialization for operation::HMAC */
67
2.80k
template<> void ExecutorBase<component::MAC, operation::HMAC>::postprocess(std::shared_ptr<Module> module, operation::HMAC& op, const ExecutorBase<component::MAC, operation::HMAC>::ResultPair& result) const {
68
2.80k
    (void)module;
69
2.80k
    (void)op;
70
71
2.80k
    if ( result.second != std::nullopt ) {
72
1.47k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
1.47k
    }
74
2.80k
}
75
76
2.80k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
2.80k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
2.80k
    return module->OpHMAC(op);
80
2.80k
}
81
82
/* Specialization for operation::UMAC */
83
4.63k
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
4.63k
    (void)module;
85
4.63k
    (void)op;
86
87
4.63k
    if ( result.second != std::nullopt ) {
88
2.25k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
2.25k
    }
90
4.63k
}
91
92
4.63k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
4.63k
    return module->OpUMAC(op);
94
4.63k
}
95
96
/* Specialization for operation::CMAC */
97
3.33k
template<> void ExecutorBase<component::MAC, operation::CMAC>::postprocess(std::shared_ptr<Module> module, operation::CMAC& op, const ExecutorBase<component::MAC, operation::CMAC>::ResultPair& result) const {
98
3.33k
    (void)module;
99
3.33k
    (void)op;
100
101
3.33k
    if ( result.second != std::nullopt ) {
102
1.67k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
1.67k
    }
104
3.33k
}
105
106
3.33k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
3.33k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
3.33k
    return module->OpCMAC(op);
110
3.33k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
16.3k
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
16.3k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
16.3k
    if ( result.second != std::nullopt ) {
119
4.83k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
4.83k
        if ( result.second->tag != std::nullopt ) {
121
2.44k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
2.44k
        }
123
4.83k
    }
124
125
16.3k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
4.28k
        using fuzzing::datasource::ID;
127
128
4.28k
        bool tryDecrypt = true;
129
130
4.28k
        if ( module->ID == CF_MODULE("OpenSSL") ) {
131
0
            switch ( op.cipher.cipherType.Get() ) {
132
0
                case    ID("Cryptofuzz/Cipher/AES_128_OCB"):
133
0
                case    ID("Cryptofuzz/Cipher/AES_256_OCB"):
134
0
                    tryDecrypt = false;
135
0
                    break;
136
0
                case    ID("Cryptofuzz/Cipher/AES_128_GCM"):
137
0
                case    ID("Cryptofuzz/Cipher/AES_192_GCM"):
138
0
                case    ID("Cryptofuzz/Cipher/AES_256_GCM"):
139
0
                case    ID("Cryptofuzz/Cipher/AES_128_CCM"):
140
0
                case    ID("Cryptofuzz/Cipher/AES_192_CCM"):
141
0
                case    ID("Cryptofuzz/Cipher/AES_256_CCM"):
142
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_CCM"):
143
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_CCM"):
144
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_CCM"):
145
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_GCM"):
146
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_GCM"):
147
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_GCM"):
148
0
                    if ( op.tagSize == std::nullopt ) {
149
                        /* OpenSSL fails to decrypt its own CCM and GCM ciphertexts if
150
                         * a tag is not included
151
                         */
152
0
                        tryDecrypt = false;
153
0
                    }
154
0
                    break;
155
0
            }
156
0
        }
157
158
4.28k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
4.28k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
4.28k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
4.28k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
4.28k
                    op.cleartext.GetSize() + 32,
171
172
4.28k
                    op.aad,
173
174
                    /* Empty modifier */
175
4.28k
                    {});
176
177
4.28k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
4.28k
            if ( cleartext == std::nullopt ) {
180
                /* Decryption failed, OpSymmetricDecrypt() returned std::nullopt */
181
0
                printf("Cannot decrypt ciphertext\n\n");
182
0
                printf("Operation:\n%s\n", op.ToString().c_str());
183
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
184
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
185
0
                abort(
186
0
                        {module->name},
187
0
                        op.Name(),
188
0
                        op.GetAlgorithmString(),
189
0
                        "cannot decrypt ciphertext"
190
0
                );
191
4.28k
            } else if ( cleartext->Get() != op.cleartext.Get() ) {
192
                /* Decryption ostensibly succeeded, but the cleartext returned by OpSymmetricDecrypt()
193
                 * does not match to original cleartext */
194
195
0
                printf("Cannot decrypt ciphertext (but decryption ostensibly succeeded)\n\n");
196
0
                printf("Operation:\n%s\n", op.ToString().c_str());
197
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
198
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
199
0
                printf("Purported cleartext: %s\n", util::HexDump(cleartext->Get()).c_str());
200
0
                abort(
201
0
                        {module->name},
202
0
                        op.Name(),
203
0
                        op.GetAlgorithmString(),
204
0
                        "cannot decrypt ciphertext"
205
0
                );
206
0
            }
207
4.28k
        }
208
4.28k
    }
209
16.3k
}
210
211
16.3k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
16.3k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
16.3k
    return module->OpSymmetricEncrypt(op);
215
16.3k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
11.9k
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
11.9k
    (void)module;
220
11.9k
    (void)op;
221
222
11.9k
    if ( result.second != std::nullopt ) {
223
887
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
887
    }
225
11.9k
}
226
227
11.9k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
11.9k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
11.9k
    return module->OpSymmetricDecrypt(op);
231
11.9k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
1.23k
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
1.23k
    (void)module;
236
1.23k
    (void)op;
237
238
1.23k
    if ( result.second != std::nullopt ) {
239
341
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
341
    }
241
1.23k
}
242
243
1.23k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
1.23k
    return module->OpKDF_SCRYPT(op);
245
1.23k
}
246
247
/* Specialization for operation::KDF_HKDF */
248
6.81k
template<> void ExecutorBase<component::Key, operation::KDF_HKDF>::postprocess(std::shared_ptr<Module> module, operation::KDF_HKDF& op, const ExecutorBase<component::Key, operation::KDF_HKDF>::ResultPair& result) const {
249
6.81k
    (void)module;
250
6.81k
    (void)op;
251
252
6.81k
    if ( result.second != std::nullopt ) {
253
3.56k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
3.56k
    }
255
6.81k
}
256
257
6.81k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
6.81k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
6.81k
    return module->OpKDF_HKDF(op);
261
6.81k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
553
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
553
    (void)module;
266
553
    (void)op;
267
268
553
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
553
}
272
273
553
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
553
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
553
    return module->OpKDF_PBKDF(op);
277
553
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
647
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
647
    (void)module;
282
647
    (void)op;
283
284
647
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
647
}
288
289
647
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
647
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
647
    return module->OpKDF_PBKDF1(op);
293
647
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
2.86k
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
2.86k
    (void)module;
298
2.86k
    (void)op;
299
300
2.86k
    if ( result.second != std::nullopt ) {
301
1.23k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
1.23k
    }
303
2.86k
}
304
305
2.86k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
2.86k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
2.86k
    return module->OpKDF_PBKDF2(op);
309
2.86k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
1.10k
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
1.10k
    (void)module;
314
1.10k
    (void)op;
315
316
1.10k
    if ( result.second != std::nullopt ) {
317
539
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
539
    }
319
1.10k
}
320
321
1.10k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
1.10k
    return module->OpKDF_ARGON2(op);
323
1.10k
}
324
325
/* Specialization for operation::KDF_SSH */
326
547
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
547
    (void)module;
328
547
    (void)op;
329
330
547
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
547
}
334
335
547
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
547
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
547
    return module->OpKDF_SSH(op);
339
547
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
780
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
780
    (void)module;
344
780
    (void)op;
345
346
780
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
780
}
350
351
780
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
780
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
780
    return module->OpKDF_TLS1_PRF(op);
355
780
}
356
357
/* Specialization for operation::KDF_X963 */
358
508
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
508
    (void)module;
360
508
    (void)op;
361
362
508
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
508
}
366
367
508
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
508
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
508
    return module->OpKDF_X963(op);
371
508
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
248
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
248
    (void)module;
376
248
    (void)op;
377
378
248
    if ( result.second != std::nullopt ) {
379
61
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
61
    }
381
248
}
382
383
248
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
248
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
248
    return module->OpKDF_BCRYPT(op);
387
248
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
2.06k
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
2.06k
    (void)module;
392
2.06k
    (void)op;
393
394
2.06k
    if ( result.second != std::nullopt ) {
395
866
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
866
    }
397
2.06k
}
398
399
2.06k
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
2.06k
    if ( op.mech.mode == true ) {
401
1.38k
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
1.38k
    }
403
404
2.06k
    return module->OpKDF_SP_800_108(op);
405
2.06k
}
406
407
/* Specialization for operation::KDF_SRTP */
408
673
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
673
    (void)module;
410
673
    (void)op;
411
673
    (void)result;
412
673
}
413
414
673
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
673
    return module->OpKDF_SRTP(op);
416
673
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
531
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
531
    (void)module;
421
531
    (void)op;
422
531
    (void)result;
423
531
}
424
425
531
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
531
    return module->OpKDF_SRTCP(op);
427
531
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
2.01k
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
2.01k
    (void)module;
432
433
2.01k
    if ( result.second != std::nullopt  ) {
434
688
        const auto curveID = op.curveType.Get();
435
688
        const auto privkey = op.priv.ToTrimmedString();
436
688
        const auto pub_x = result.second->first.ToTrimmedString();
437
688
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
688
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
688
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
688
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
688
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
688
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
688
    }
446
2.01k
}
447
448
2.01k
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
2.01k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
2.01k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
2.01k
    if ( size == 0 || size > 4096 ) {
454
0
        return std::nullopt;
455
0
    }
456
457
2.01k
    return module->OpECC_PrivateToPublic(op);
458
2.01k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
1.81k
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
1.81k
    (void)module;
463
1.81k
    (void)op;
464
1.81k
    (void)result;
465
1.81k
}
466
467
1.81k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
1.81k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
1.81k
    return module->OpECC_ValidatePubkey(op);
471
1.81k
}
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
64
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
64
    (void)operations;
479
64
    (void)results;
480
64
    (void)data;
481
64
    (void)size;
482
64
}
483
484
3.20k
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
3.20k
    (void)module;
486
487
3.20k
    if ( result.second != std::nullopt  ) {
488
1.13k
        const auto curveID = op.curveType.Get();
489
1.13k
        const auto privkey = result.second->priv.ToTrimmedString();
490
1.13k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
1.13k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
1.13k
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
1.13k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
1.13k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
1.13k
        {
498
1.13k
            auto opValidate = operation::ECC_ValidatePubkey(
499
1.13k
                    op.curveType,
500
1.13k
                    result.second->pub,
501
1.13k
                    op.modifier);
502
503
1.13k
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
1.13k
            CF_ASSERT(
505
1.13k
                    validateResult == std::nullopt ||
506
1.13k
                    *validateResult == true,
507
1.13k
                    "Cannot validate generated public key");
508
1.13k
        }
509
1.13k
    }
510
3.20k
}
511
512
3.20k
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
3.20k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
3.20k
    return module->OpECC_GenerateKeyPair(op);
516
3.20k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
231
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
231
    (void)module;
521
522
231
    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
231
}
565
566
231
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
231
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
231
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
231
    const size_t size = op.priv.ToTrimmedString().size();
571
572
231
    if ( size == 0 || size > 4096 ) {
573
0
        return std::nullopt;
574
0
    }
575
576
231
    return module->OpECCSI_Sign(op);
577
231
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
2.42k
template<> void ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Sign& op, const ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::ResultPair& result) const {
581
2.42k
    (void)module;
582
583
2.42k
    if ( result.second != std::nullopt  ) {
584
1.02k
        const auto curveID = op.curveType.Get();
585
1.02k
        const auto cleartext = op.cleartext.ToHex();
586
1.02k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
1.02k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
1.02k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
1.02k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
1.02k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
1.02k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
1.02k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
1.02k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
1.02k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
1.02k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
1.02k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
1.02k
        {
601
1.02k
            auto opVerify = operation::ECDSA_Verify(
602
1.02k
                    op,
603
1.02k
                    *(result.second),
604
1.02k
                    op.modifier);
605
606
1.02k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
1.02k
            CF_ASSERT(
608
1.02k
                    verifyResult == std::nullopt ||
609
1.02k
                    *verifyResult == true,
610
1.02k
                    "Cannot verify generated signature");
611
1.02k
        }
612
1.02k
    }
613
2.42k
}
614
615
2.42k
template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const {
616
2.42k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
2.42k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
2.42k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
2.42k
    if ( size == 0 || size > 4096 ) {
622
0
        return std::nullopt;
623
0
    }
624
625
2.42k
    return module->OpECDSA_Sign(op);
626
2.42k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
685
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
685
    (void)module;
631
632
685
    if ( result.second != std::nullopt  ) {
633
83
        const auto curveID = op.curveType.Get();
634
83
        const auto cleartext = op.cleartext.ToHex();
635
83
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
83
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
83
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
83
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
83
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
83
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
83
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
83
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
83
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
83
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
83
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
83
    }
649
685
}
650
651
685
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
685
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
685
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
685
    const size_t size = op.priv.ToTrimmedString().size();
656
657
685
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
685
    return module->OpECGDSA_Sign(op);
662
685
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
188
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
188
    (void)module;
667
668
188
    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
188
}
686
687
188
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
188
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
188
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
188
    const size_t size = op.priv.ToTrimmedString().size();
692
693
188
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
188
    return module->OpECRDSA_Sign(op);
698
188
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
223
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
223
    (void)module;
703
704
223
    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
223
}
722
723
223
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
223
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
223
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
223
    const size_t size = op.priv.ToTrimmedString().size();
728
729
223
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
223
    return module->OpSchnorr_Sign(op);
734
223
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
213
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
213
    (void)module;
739
213
    (void)op;
740
213
    (void)result;
741
213
}
742
743
213
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
213
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
213
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
213
    return module->OpECCSI_Verify(op);
748
213
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
1.16k
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
1.16k
    (void)module;
753
1.16k
    (void)op;
754
1.16k
    (void)result;
755
1.16k
}
756
757
1.16k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
1.16k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
1.16k
    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
1.16k
    return module->OpECDSA_Verify(op);
772
1.16k
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
639
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
639
    (void)module;
777
639
    (void)op;
778
639
    (void)result;
779
639
}
780
781
639
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
639
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
639
    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
639
    return module->OpECGDSA_Verify(op);
796
639
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
227
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
227
    (void)module;
801
227
    (void)op;
802
227
    (void)result;
803
227
}
804
805
227
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
227
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
227
    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
227
    return module->OpECRDSA_Verify(op);
820
227
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
194
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
194
    (void)module;
825
194
    (void)op;
826
194
    (void)result;
827
194
}
828
829
194
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
194
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
194
    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
194
    return module->OpSchnorr_Verify(op);
844
194
}
845
846
2.38k
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
2.38k
    (void)module;
848
2.38k
    (void)op;
849
2.38k
    (void)result;
850
2.38k
}
851
852
2.38k
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
2.38k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
2.38k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
2.38k
    return module->OpECDSA_Recover(op);
857
2.38k
}
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
855
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
855
    (void)module;
869
855
    (void)op;
870
855
    (void)result;
871
855
}
872
873
855
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
855
    const std::vector<size_t> sizes = {
875
855
        op.parameters.p.ToTrimmedString().size(),
876
855
        op.parameters.q.ToTrimmedString().size(),
877
855
        op.parameters.g.ToTrimmedString().size(),
878
855
        op.pub.ToTrimmedString().size(),
879
855
        op.signature.first.ToTrimmedString().size(),
880
855
        op.signature.second.ToTrimmedString().size(),
881
855
    };
882
883
5.13k
    for (const auto& size : sizes) {
884
5.13k
        if ( size == 0 || size > 4096 ) {
885
0
            return std::nullopt;
886
0
        }
887
5.13k
    }
888
889
855
    return module->OpDSA_Verify(op);
890
855
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
77
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
77
    (void)operations;
897
77
    (void)results;
898
77
    (void)data;
899
77
    (void)size;
900
77
}
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
243
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
243
    (void)module;
910
243
    (void)op;
911
243
    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
243
}
934
935
243
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
243
    const std::vector<size_t> sizes = {
937
243
        op.parameters.p.ToTrimmedString().size(),
938
243
        op.parameters.q.ToTrimmedString().size(),
939
243
        op.parameters.g.ToTrimmedString().size(),
940
243
        op.priv.ToTrimmedString().size(),
941
243
    };
942
943
972
    for (const auto& size : sizes) {
944
972
        if ( size == 0 || size > 4096 ) {
945
0
            return std::nullopt;
946
0
        }
947
972
    }
948
949
243
    return module->OpDSA_Sign(op);
950
243
}
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
197
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
197
    (void)result;
963
197
    (void)module;
964
197
    (void)op;
965
197
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
197
}
969
970
197
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
197
    return module->OpDSA_PrivateToPublic(op);
972
197
}
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
71
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
71
    (void)operations;
980
71
    (void)results;
981
71
    (void)data;
982
71
    (void)size;
983
71
}
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
251
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
251
    (void)result;
994
251
    (void)module;
995
251
    (void)op;
996
251
    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
251
}
1003
1004
251
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
251
    const std::vector<size_t> sizes = {
1006
251
        op.p.ToTrimmedString().size(),
1007
251
        op.q.ToTrimmedString().size(),
1008
251
        op.g.ToTrimmedString().size(),
1009
251
    };
1010
1011
753
    for (const auto& size : sizes) {
1012
753
        if ( size == 0 || size > 4096 ) {
1013
0
            return std::nullopt;
1014
0
        }
1015
753
    }
1016
1017
251
    return module->OpDSA_GenerateKeyPair(op);
1018
251
}
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
52
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
52
    (void)operations;
1026
52
    (void)results;
1027
52
    (void)data;
1028
52
    (void)size;
1029
52
}
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
198
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
198
    (void)result;
1040
198
    (void)module;
1041
198
    (void)op;
1042
198
    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
198
}
1054
1055
198
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
198
    return module->OpDSA_GenerateParameters(op);
1057
198
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
153
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
153
    (void)module;
1062
153
    (void)op;
1063
153
    (void)result;
1064
153
}
1065
1066
153
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
153
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
153
    return module->OpECDH_Derive(op);
1070
153
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
52
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
52
    (void)operations;
1076
52
    (void)results;
1077
52
    (void)data;
1078
52
    (void)size;
1079
52
}
1080
213
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
213
    (void)module;
1082
213
    (void)op;
1083
213
    (void)result;
1084
213
}
1085
1086
213
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
213
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
213
    return module->OpECIES_Encrypt(op);
1090
213
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
193
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
193
    (void)module;
1095
193
    (void)op;
1096
193
    (void)result;
1097
193
}
1098
1099
193
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
193
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
193
    return module->OpECIES_Decrypt(op);
1103
193
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
351
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
351
    (void)module;
1108
1109
351
    if ( result.second != std::nullopt  ) {
1110
34
        const auto curveID = op.curveType.Get();
1111
34
        const auto x = result.second->first.ToTrimmedString();
1112
34
        const auto y = result.second->second.ToTrimmedString();
1113
1114
34
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
34
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
34
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
34
    }
1119
351
}
1120
1121
351
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
351
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
351
    return module->OpECC_Point_Add(op);
1125
351
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
319
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
319
    (void)module;
1130
1131
319
    if ( result.second != std::nullopt  ) {
1132
21
        const auto curveID = op.curveType.Get();
1133
21
        const auto x = result.second->first.ToTrimmedString();
1134
21
        const auto y = result.second->second.ToTrimmedString();
1135
1136
21
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
21
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
21
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
21
    }
1141
319
}
1142
1143
319
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
319
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
319
    return module->OpECC_Point_Sub(op);
1147
319
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
1.77k
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
1.77k
    (void)module;
1152
1153
1.77k
    if ( result.second != std::nullopt  ) {
1154
317
        const auto curveID = op.curveType.Get();
1155
317
        const auto x = result.second->first.ToTrimmedString();
1156
317
        const auto y = result.second->second.ToTrimmedString();
1157
1158
317
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
317
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
317
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
317
    }
1163
1.77k
}
1164
1165
1.77k
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
1.77k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
1.77k
    return module->OpECC_Point_Mul(op);
1169
1.77k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
388
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
388
    (void)module;
1174
1175
388
    if ( result.second != std::nullopt  ) {
1176
76
        const auto curveID = op.curveType.Get();
1177
76
        const auto x = result.second->first.ToTrimmedString();
1178
76
        const auto y = result.second->second.ToTrimmedString();
1179
1180
76
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
76
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
76
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
76
    }
1185
388
}
1186
1187
388
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
388
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
388
    return module->OpECC_Point_Neg(op);
1191
388
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
422
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
422
    (void)module;
1196
1197
422
    if ( result.second != std::nullopt  ) {
1198
60
        const auto curveID = op.curveType.Get();
1199
60
        const auto x = result.second->first.ToTrimmedString();
1200
60
        const auto y = result.second->second.ToTrimmedString();
1201
1202
60
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
60
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
60
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
60
    }
1207
422
}
1208
1209
422
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
422
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
422
    return module->OpECC_Point_Dbl(op);
1213
422
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
380
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
380
    (void)module;
1218
380
    (void)result;
1219
380
    (void)op;
1220
380
}
1221
1222
380
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
380
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
380
    return module->OpECC_Point_Cmp(op);
1226
380
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
843
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
843
    (void)module;
1231
843
    (void)op;
1232
843
    (void)result;
1233
843
}
1234
1235
843
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
843
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
838
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
838
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
838
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
833
    return module->OpDH_Derive(op);
1242
838
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
219
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
219
    (void)result;
1247
219
    (void)op;
1248
219
    (void)module;
1249
1250
219
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
0
        const auto priv = result.second->first.ToTrimmedString();
1252
0
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
0
        Pool_DH_PrivateKey.Set(priv);
1255
0
        Pool_DH_PublicKey.Set(pub);
1256
0
    }
1257
219
}
1258
1259
219
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
219
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
217
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
215
    return module->OpDH_GenerateKeyPair(op);
1264
217
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
11.8k
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
11.8k
    (void)module;
1269
11.8k
    (void)op;
1270
1271
11.8k
    if ( result.second != std::nullopt  ) {
1272
5.15k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
5.15k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
5.11k
            Pool_Bignum.Set(bignum);
1276
5.11k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
1.21k
                Pool_Bignum_Primes.Set(bignum);
1278
1.21k
            }
1279
5.11k
        }
1280
5.15k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
249
            if ( bignum == "1" ) {
1282
129
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
129
            }
1284
249
        }
1285
5.15k
    }
1286
11.8k
}
1287
1288
11.8k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
11.8k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
11.8k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
11.8k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
11.8k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
11.8k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
11.8k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
918
        return std::nullopt;
1299
918
    }
1300
1301
10.9k
    switch ( op.calcOp.Get() ) {
1302
72
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
72
            if ( op.bn1.GetSize() > 4 ) {
1305
22
                return std::nullopt;
1306
22
            }
1307
50
            break;
1308
119
        case    CF_CALCOP("Exp(A,B)"):
1309
119
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
43
                return std::nullopt;
1311
43
            }
1312
76
            break;
1313
76
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
30
            if ( op.bn1.GetSize() > 4 ) {
1315
14
                return std::nullopt;
1316
14
            }
1317
16
            break;
1318
86
        case    CF_CALCOP("Exp2(A)"):
1319
86
            if ( op.bn0.GetSize() > 4 ) {
1320
21
                return std::nullopt;
1321
21
            }
1322
65
            break;
1323
10.9k
    }
1324
1325
10.8k
    return module->OpBignumCalc(op);
1326
10.9k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
300
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
300
    (void)module;
1331
300
    (void)op;
1332
1333
300
    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
300
}
1345
1346
300
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
300
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
300
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
291
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
282
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
273
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
262
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
253
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
244
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
235
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
224
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
224
    return module->OpBignumCalc_Fp2(op);
1364
224
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
1.12k
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
1.12k
    (void)module;
1369
1.12k
    (void)op;
1370
1371
1.12k
    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
1.12k
}
1400
1401
1.12k
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
1.12k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
1.12k
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
1.11k
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
1.10k
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
1.09k
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
1.08k
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
1.06k
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
1.05k
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
1.04k
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
1.02k
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
1.01k
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
1.00k
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
985
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
970
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
947
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
938
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
921
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
910
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
895
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
878
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
861
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
846
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
831
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
820
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
803
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
794
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
777
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
762
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
751
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
734
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
716
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
700
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
691
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
674
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
659
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
640
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
623
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
607
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
588
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
571
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
562
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
546
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
535
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
512
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
502
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
491
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
480
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
463
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
446
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
435
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
435
    return module->OpBignumCalc_Fp12(op);
1462
435
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
234
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
234
    (void)module;
1467
1468
234
    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
234
}
1479
1480
234
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
234
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
234
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
234
    if ( size == 0 || size > 4096 ) {
1486
2
        return std::nullopt;
1487
2
    }
1488
1489
232
    return module->OpBLS_PrivateToPublic(op);
1490
234
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
220
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
220
    (void)module;
1495
220
    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
220
}
1510
1511
220
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
220
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
220
    if ( size == 0 || size > 4096 ) {
1515
0
        return std::nullopt;
1516
0
    }
1517
1518
220
    return module->OpBLS_PrivateToPublic_G2(op);
1519
220
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
261
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
261
    (void)module;
1524
1525
261
    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
261
}
1553
1554
261
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
261
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
261
    if ( size == 0 || size > 4096 ) {
1558
0
        return std::nullopt;
1559
0
    }
1560
1561
261
    return module->OpBLS_Sign(op);
1562
261
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
181
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
181
    (void)module;
1567
181
    (void)op;
1568
181
    (void)result;
1569
181
}
1570
1571
181
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
181
    return module->OpBLS_Verify(op);
1588
181
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
237
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
237
    (void)module;
1593
237
    (void)op;
1594
1595
237
    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
237
}
1624
1625
237
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
237
    return module->OpBLS_BatchSign(op);
1627
237
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
232
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
232
    (void)module;
1632
232
    (void)op;
1633
232
    (void)result;
1634
232
}
1635
1636
232
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
232
    return module->OpBLS_BatchVerify(op);
1638
232
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
228
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
228
    (void)module;
1643
228
    (void)op;
1644
228
    (void)result;
1645
228
}
1646
1647
228
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
228
    return module->OpBLS_Aggregate_G1(op);
1649
228
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
244
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
244
    (void)module;
1654
244
    (void)op;
1655
244
    (void)result;
1656
244
}
1657
1658
244
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
244
    return module->OpBLS_Aggregate_G2(op);
1660
244
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
200
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
200
    (void)module;
1665
200
    (void)op;
1666
1667
200
    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
200
}
1684
1685
200
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
200
    return module->OpBLS_Pairing(op);
1687
200
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
206
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
206
    (void)module;
1692
206
    (void)op;
1693
1694
206
    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
206
}
1711
1712
206
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
206
    return module->OpBLS_MillerLoop(op);
1714
206
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
198
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
198
    (void)module;
1719
198
    (void)op;
1720
1721
198
    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
198
}
1738
1739
198
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
198
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
198
    return module->OpBLS_FinalExp(op);
1742
198
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
190
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
190
    (void)module;
1747
1748
190
    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
190
}
1759
1760
190
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
190
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
190
    return module->OpBLS_HashToG1(op);
1763
190
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
230
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
230
    (void)module;
1768
1769
230
    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
230
}
1780
1781
230
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
230
    return module->OpBLS_MapToG1(op);
1783
230
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
194
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
194
    (void)module;
1788
1789
194
    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
194
}
1804
1805
194
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
194
    return module->OpBLS_MapToG2(op);
1807
194
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
236
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
236
    (void)module;
1812
236
    (void)op;
1813
236
    (void)result;
1814
236
}
1815
1816
236
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
236
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
236
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
236
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
236
    return module->OpBLS_IsG1OnCurve(op);
1822
236
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
252
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
252
    (void)module;
1827
252
    (void)op;
1828
252
    (void)result;
1829
252
}
1830
1831
252
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
252
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
243
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
238
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
229
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
220
    return module->OpBLS_IsG2OnCurve(op);
1838
229
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
218
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
218
    (void)module;
1843
1844
218
    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
218
}
1857
1858
218
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
218
    return module->OpBLS_GenerateKeyPair(op);
1860
218
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
232
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
232
    (void)module;
1865
1866
232
    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
232
}
1877
1878
232
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
232
    return module->OpBLS_Decompress_G1(op);
1880
232
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
187
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
187
    (void)module;
1885
187
    (void)op;
1886
1887
187
    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
187
}
1893
1894
187
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
187
    return module->OpBLS_Compress_G1(op);
1896
187
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
208
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
208
    (void)module;
1901
1902
208
    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
208
}
1917
1918
208
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
208
    return module->OpBLS_Decompress_G2(op);
1920
208
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
224
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
224
    (void)module;
1925
1926
224
    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
224
}
1937
1938
224
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
224
    return module->OpBLS_Compress_G2(op);
1940
224
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
230
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
230
    (void)module;
1945
1946
230
    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
230
}
1957
1958
230
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
230
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
230
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
230
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
230
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
230
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
230
    return module->OpBLS_G1_Add(op);
1966
230
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
268
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
268
    (void)module;
1971
1972
268
    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
268
}
1983
1984
268
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
268
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
268
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
268
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
268
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
268
    return module->OpBLS_G1_Mul(op);
1991
268
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
294
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
294
    (void)module;
1996
294
    (void)op;
1997
294
    (void)result;
1998
294
}
1999
2000
294
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
294
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
294
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
294
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
294
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
294
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
294
    return module->OpBLS_G1_IsEq(op);
2008
294
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
228
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
228
    (void)module;
2013
2014
228
    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
228
}
2025
2026
228
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
228
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
228
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
228
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
228
    return module->OpBLS_G1_Neg(op);
2032
228
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
336
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
336
    (void)module;
2037
2038
336
    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
336
}
2053
2054
336
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
336
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
336
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
336
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
327
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
316
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
307
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
296
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
285
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
278
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
278
    return module->OpBLS_G2_Add(op);
2066
278
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
250
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
250
    (void)module;
2071
2072
250
    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
250
}
2087
2088
250
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
250
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
250
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
250
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
250
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
250
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
250
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
250
    return module->OpBLS_G2_Mul(op);
2097
250
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
310
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
310
    (void)module;
2102
310
    (void)op;
2103
310
    (void)result;
2104
310
}
2105
2106
310
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
310
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
310
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
301
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
301
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
301
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
292
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
283
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
274
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
265
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
256
    return module->OpBLS_G2_IsEq(op);
2118
265
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
265
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
265
    (void)module;
2123
2124
265
    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
265
}
2139
2140
265
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
265
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
265
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
265
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
265
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
265
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
265
    return module->OpBLS_G2_Neg(op);
2148
265
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
287
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
287
    (void)module;
2153
2154
287
    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
287
}
2165
2166
287
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
287
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
4.38k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
4.38k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
4.37k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
4.37k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
4.37k
    }
2174
2175
278
    return module->OpBLS_G1_MultiExp(op);
2176
287
}
2177
2178
/* Specialization for operation::Misc */
2179
206
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
206
    (void)module;
2181
206
    (void)op;
2182
206
    (void)result;
2183
206
}
2184
2185
206
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
206
    return module->OpMisc(op);
2187
206
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
207
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
207
    (void)module;
2192
2193
207
    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
207
}
2208
2209
207
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
207
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
207
    return module->OpBLS_HashToG2(op);
2212
207
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
46
{ }
2217
44
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
44
    this->modulo = component::Bignum(modulo);
2219
44
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
2
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
2
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
2
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
2
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
2
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
2
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
2
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
2
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
2
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
2
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
2
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
2
    CF_NORET(SetModulo("18446744069414584321"));
2279
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
2
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
2
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
2
    CF_NORET(SetModulo("18446744073709551616"));
2304
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
2
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
2
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
2
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
2
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
2
}
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
2
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
2
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
2
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
2
{ }
2334
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2335
0
    this->modulo = component::Bignum(modulo);
2336
0
}
2337
2338
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2339
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
2
{ }
2341
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2342
0
    this->modulo = component::Bignum(modulo);
2343
0
}
2344
2345
template <class ResultType, class OperationType>
2346
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2347
    operationID(operationID),
2348
    modules(modules),
2349
    options(options)
2350
214
{
2351
214
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
46
{
2351
46
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
2
{
2351
2
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
251
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
251
    (void)module;
2356
251
    (void)op;
2357
251
    (void)result;
2358
251
}
2359
2360
251
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
251
    return module->OpSR25519_Verify(op);
2362
251
}
2363
2364
template <class ResultType, class OperationType>
2365
214
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
214
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
46
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
46
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
2
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
2
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
28.7k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28.7k
    ResultSet ret;
2372
2373
102k
    for (const auto& result : results) {
2374
102k
        if ( result.second == std::nullopt ) {
2375
71.5k
            continue;
2376
71.5k
        }
2377
2378
31.1k
        ret.push_back(result);
2379
31.1k
    }
2380
2381
28.7k
    return ret;
2382
28.7k
}
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
2.01k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.01k
    ResultSet ret;
2372
2373
5.78k
    for (const auto& result : results) {
2374
5.78k
        if ( result.second == std::nullopt ) {
2375
2.71k
            continue;
2376
2.71k
        }
2377
2378
3.07k
        ret.push_back(result);
2379
3.07k
    }
2380
2381
2.01k
    return ret;
2382
2.01k
}
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
813
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
813
    ResultSet ret;
2372
2373
2.80k
    for (const auto& result : results) {
2374
2.80k
        if ( result.second == std::nullopt ) {
2375
1.33k
            continue;
2376
1.33k
        }
2377
2378
1.47k
        ret.push_back(result);
2379
1.47k
    }
2380
2381
813
    return ret;
2382
813
}
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
814
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
814
    ResultSet ret;
2372
2373
4.63k
    for (const auto& result : results) {
2374
4.63k
        if ( result.second == std::nullopt ) {
2375
2.38k
            continue;
2376
2.38k
        }
2377
2378
2.25k
        ret.push_back(result);
2379
2.25k
    }
2380
2381
814
    return ret;
2382
814
}
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
764
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
764
    ResultSet ret;
2372
2373
3.33k
    for (const auto& result : results) {
2374
3.33k
        if ( result.second == std::nullopt ) {
2375
1.66k
            continue;
2376
1.66k
        }
2377
2378
1.67k
        ret.push_back(result);
2379
1.67k
    }
2380
2381
764
    return ret;
2382
764
}
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
3.84k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3.84k
    ResultSet ret;
2372
2373
16.3k
    for (const auto& result : results) {
2374
16.3k
        if ( result.second == std::nullopt ) {
2375
11.5k
            continue;
2376
11.5k
        }
2377
2378
4.83k
        ret.push_back(result);
2379
4.83k
    }
2380
2381
3.84k
    return ret;
2382
3.84k
}
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
2.97k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.97k
    ResultSet ret;
2372
2373
11.9k
    for (const auto& result : results) {
2374
11.9k
        if ( result.second == std::nullopt ) {
2375
11.0k
            continue;
2376
11.0k
        }
2377
2378
887
        ret.push_back(result);
2379
887
    }
2380
2381
2.97k
    return ret;
2382
2.97k
}
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
212
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
212
    ResultSet ret;
2372
2373
1.23k
    for (const auto& result : results) {
2374
1.23k
        if ( result.second == std::nullopt ) {
2375
889
            continue;
2376
889
        }
2377
2378
341
        ret.push_back(result);
2379
341
    }
2380
2381
212
    return ret;
2382
212
}
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
1.96k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.96k
    ResultSet ret;
2372
2373
6.81k
    for (const auto& result : results) {
2374
6.81k
        if ( result.second == std::nullopt ) {
2375
3.25k
            continue;
2376
3.25k
        }
2377
2378
3.56k
        ret.push_back(result);
2379
3.56k
    }
2380
2381
1.96k
    return ret;
2382
1.96k
}
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
132
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
132
    ResultSet ret;
2372
2373
780
    for (const auto& result : results) {
2374
780
        if ( result.second == std::nullopt ) {
2375
780
            continue;
2376
780
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
132
    return ret;
2382
132
}
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
75
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
75
    ResultSet ret;
2372
2373
553
    for (const auto& result : results) {
2374
553
        if ( result.second == std::nullopt ) {
2375
553
            continue;
2376
553
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
75
    return ret;
2382
75
}
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
82
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
82
    ResultSet ret;
2372
2373
647
    for (const auto& result : results) {
2374
647
        if ( result.second == std::nullopt ) {
2375
647
            continue;
2376
647
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
82
    return ret;
2382
82
}
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
879
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
879
    ResultSet ret;
2372
2373
2.86k
    for (const auto& result : results) {
2374
2.86k
        if ( result.second == std::nullopt ) {
2375
1.62k
            continue;
2376
1.62k
        }
2377
2378
1.23k
        ret.push_back(result);
2379
1.23k
    }
2380
2381
879
    return ret;
2382
879
}
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
439
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
439
    ResultSet ret;
2372
2373
1.10k
    for (const auto& result : results) {
2374
1.10k
        if ( result.second == std::nullopt ) {
2375
570
            continue;
2376
570
        }
2377
2378
539
        ret.push_back(result);
2379
539
    }
2380
2381
439
    return ret;
2382
439
}
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
80
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
80
    ResultSet ret;
2372
2373
547
    for (const auto& result : results) {
2374
547
        if ( result.second == std::nullopt ) {
2375
547
            continue;
2376
547
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
80
    return ret;
2382
80
}
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
75
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
75
    ResultSet ret;
2372
2373
508
    for (const auto& result : results) {
2374
508
        if ( result.second == std::nullopt ) {
2375
508
            continue;
2376
508
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
75
    return ret;
2382
75
}
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
111
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
111
    ResultSet ret;
2372
2373
248
    for (const auto& result : results) {
2374
248
        if ( result.second == std::nullopt ) {
2375
187
            continue;
2376
187
        }
2377
2378
61
        ret.push_back(result);
2379
61
    }
2380
2381
111
    return ret;
2382
111
}
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
480
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
480
    ResultSet ret;
2372
2373
2.06k
    for (const auto& result : results) {
2374
2.06k
        if ( result.second == std::nullopt ) {
2375
1.19k
            continue;
2376
1.19k
        }
2377
2378
866
        ret.push_back(result);
2379
866
    }
2380
2381
480
    return ret;
2382
480
}
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
95
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
95
    ResultSet ret;
2372
2373
673
    for (const auto& result : results) {
2374
673
        if ( result.second == std::nullopt ) {
2375
673
            continue;
2376
673
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
95
    return ret;
2382
95
}
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
72
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
72
    ResultSet ret;
2372
2373
531
    for (const auto& result : results) {
2374
531
        if ( result.second == std::nullopt ) {
2375
531
            continue;
2376
531
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
72
    return ret;
2382
72
}
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
739
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
739
    ResultSet ret;
2372
2373
2.01k
    for (const auto& result : results) {
2374
2.01k
        if ( result.second == std::nullopt ) {
2375
1.32k
            continue;
2376
1.32k
        }
2377
2378
688
        ret.push_back(result);
2379
688
    }
2380
2381
739
    return ret;
2382
739
}
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
770
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
770
    ResultSet ret;
2372
2373
1.81k
    for (const auto& result : results) {
2374
1.81k
        if ( result.second == std::nullopt ) {
2375
1.03k
            continue;
2376
1.03k
        }
2377
2378
775
        ret.push_back(result);
2379
775
    }
2380
2381
770
    return ret;
2382
770
}
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
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
61
    ResultSet ret;
2372
2373
231
    for (const auto& result : results) {
2374
231
        if ( result.second == std::nullopt ) {
2375
231
            continue;
2376
231
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
61
    return ret;
2382
61
}
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
812
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
812
    ResultSet ret;
2372
2373
2.42k
    for (const auto& result : results) {
2374
2.42k
        if ( result.second == std::nullopt ) {
2375
1.39k
            continue;
2376
1.39k
        }
2377
2378
1.02k
        ret.push_back(result);
2379
1.02k
    }
2380
2381
812
    return ret;
2382
812
}
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
245
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
245
    ResultSet ret;
2372
2373
685
    for (const auto& result : results) {
2374
685
        if ( result.second == std::nullopt ) {
2375
602
            continue;
2376
602
        }
2377
2378
83
        ret.push_back(result);
2379
83
    }
2380
2381
245
    return ret;
2382
245
}
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
52
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
52
    ResultSet ret;
2372
2373
188
    for (const auto& result : results) {
2374
188
        if ( result.second == std::nullopt ) {
2375
188
            continue;
2376
188
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
52
    return ret;
2382
52
}
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
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
59
    ResultSet ret;
2372
2373
223
    for (const auto& result : results) {
2374
223
        if ( result.second == std::nullopt ) {
2375
223
            continue;
2376
223
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
59
    return ret;
2382
59
}
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
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
59
    ResultSet ret;
2372
2373
213
    for (const auto& result : results) {
2374
213
        if ( result.second == std::nullopt ) {
2375
213
            continue;
2376
213
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
59
    return ret;
2382
59
}
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
373
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
373
    ResultSet ret;
2372
2373
1.16k
    for (const auto& result : results) {
2374
1.16k
        if ( result.second == std::nullopt ) {
2375
515
            continue;
2376
515
        }
2377
2378
650
        ret.push_back(result);
2379
650
    }
2380
2381
373
    return ret;
2382
373
}
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
207
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
207
    ResultSet ret;
2372
2373
639
    for (const auto& result : results) {
2374
639
        if ( result.second == std::nullopt ) {
2375
380
            continue;
2376
380
        }
2377
2378
259
        ret.push_back(result);
2379
259
    }
2380
2381
207
    return ret;
2382
207
}
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
60
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
60
    ResultSet ret;
2372
2373
227
    for (const auto& result : results) {
2374
227
        if ( result.second == std::nullopt ) {
2375
227
            continue;
2376
227
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
60
    return ret;
2382
60
}
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
52
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
52
    ResultSet ret;
2372
2373
194
    for (const auto& result : results) {
2374
194
        if ( result.second == std::nullopt ) {
2375
194
            continue;
2376
194
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
52
    return ret;
2382
52
}
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
799
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
799
    ResultSet ret;
2372
2373
2.38k
    for (const auto& result : results) {
2374
2.38k
        if ( result.second == std::nullopt ) {
2375
1.38k
            continue;
2376
1.38k
        }
2377
2378
993
        ret.push_back(result);
2379
993
    }
2380
2381
799
    return ret;
2382
799
}
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
257
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
257
    ResultSet ret;
2372
2373
855
    for (const auto& result : results) {
2374
855
        if ( result.second == std::nullopt ) {
2375
679
            continue;
2376
679
        }
2377
2378
176
        ret.push_back(result);
2379
176
    }
2380
2381
257
    return ret;
2382
257
}
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
52
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
52
    ResultSet ret;
2372
2373
197
    for (const auto& result : results) {
2374
197
        if ( result.second == std::nullopt ) {
2375
197
            continue;
2376
197
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
52
    return ret;
2382
52
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
153
    for (const auto& result : results) {
2374
153
        if ( result.second == std::nullopt ) {
2375
153
            continue;
2376
153
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
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
53
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
53
    ResultSet ret;
2372
2373
193
    for (const auto& result : results) {
2374
193
        if ( result.second == std::nullopt ) {
2375
193
            continue;
2376
193
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
53
    return ret;
2382
53
}
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
103
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
103
    ResultSet ret;
2372
2373
351
    for (const auto& result : results) {
2374
351
        if ( result.second == std::nullopt ) {
2375
317
            continue;
2376
317
        }
2377
2378
34
        ret.push_back(result);
2379
34
    }
2380
2381
103
    return ret;
2382
103
}
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
94
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
94
    ResultSet ret;
2372
2373
319
    for (const auto& result : results) {
2374
319
        if ( result.second == std::nullopt ) {
2375
298
            continue;
2376
298
        }
2377
2378
21
        ret.push_back(result);
2379
21
    }
2380
2381
94
    return ret;
2382
94
}
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
554
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
554
    ResultSet ret;
2372
2373
1.77k
    for (const auto& result : results) {
2374
1.77k
        if ( result.second == std::nullopt ) {
2375
1.46k
            continue;
2376
1.46k
        }
2377
2378
317
        ret.push_back(result);
2379
317
    }
2380
2381
554
    return ret;
2382
554
}
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
112
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
112
    ResultSet ret;
2372
2373
388
    for (const auto& result : results) {
2374
388
        if ( result.second == std::nullopt ) {
2375
312
            continue;
2376
312
        }
2377
2378
76
        ret.push_back(result);
2379
76
    }
2380
2381
112
    return ret;
2382
112
}
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
129
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
129
    ResultSet ret;
2372
2373
422
    for (const auto& result : results) {
2374
422
        if ( result.second == std::nullopt ) {
2375
362
            continue;
2376
362
        }
2377
2378
60
        ret.push_back(result);
2379
60
    }
2380
2381
129
    return ret;
2382
129
}
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
103
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
103
    ResultSet ret;
2372
2373
380
    for (const auto& result : results) {
2374
380
        if ( result.second == std::nullopt ) {
2375
334
            continue;
2376
334
        }
2377
2378
46
        ret.push_back(result);
2379
46
    }
2380
2381
103
    return ret;
2382
103
}
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
282
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
282
    ResultSet ret;
2372
2373
843
    for (const auto& result : results) {
2374
843
        if ( result.second == std::nullopt ) {
2375
786
            continue;
2376
786
        }
2377
2378
57
        ret.push_back(result);
2379
57
    }
2380
2381
282
    return ret;
2382
282
}
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
4.10k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
4.10k
    ResultSet ret;
2372
2373
11.8k
    for (const auto& result : results) {
2374
11.8k
        if ( result.second == std::nullopt ) {
2375
6.68k
            continue;
2376
6.68k
        }
2377
2378
5.15k
        ret.push_back(result);
2379
5.15k
    }
2380
2381
4.10k
    return ret;
2382
4.10k
}
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
97
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
97
    ResultSet ret;
2372
2373
300
    for (const auto& result : results) {
2374
300
        if ( result.second == std::nullopt ) {
2375
300
            continue;
2376
300
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
97
    return ret;
2382
97
}
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
353
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
353
    ResultSet ret;
2372
2373
1.12k
    for (const auto& result : results) {
2374
1.12k
        if ( result.second == std::nullopt ) {
2375
1.12k
            continue;
2376
1.12k
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
353
    return ret;
2382
353
}
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
73
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
73
    ResultSet ret;
2372
2373
234
    for (const auto& result : results) {
2374
234
        if ( result.second == std::nullopt ) {
2375
234
            continue;
2376
234
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
73
    return ret;
2382
73
}
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
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
66
    ResultSet ret;
2372
2373
220
    for (const auto& result : results) {
2374
220
        if ( result.second == std::nullopt ) {
2375
220
            continue;
2376
220
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
66
    return ret;
2382
66
}
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
73
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
73
    ResultSet ret;
2372
2373
261
    for (const auto& result : results) {
2374
261
        if ( result.second == std::nullopt ) {
2375
261
            continue;
2376
261
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
73
    return ret;
2382
73
}
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
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
49
    ResultSet ret;
2372
2373
181
    for (const auto& result : results) {
2374
181
        if ( result.second == std::nullopt ) {
2375
181
            continue;
2376
181
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
49
    return ret;
2382
49
}
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
70
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
70
    ResultSet ret;
2372
2373
237
    for (const auto& result : results) {
2374
237
        if ( result.second == std::nullopt ) {
2375
237
            continue;
2376
237
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
70
    return ret;
2382
70
}
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
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
61
    ResultSet ret;
2372
2373
232
    for (const auto& result : results) {
2374
232
        if ( result.second == std::nullopt ) {
2375
232
            continue;
2376
232
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
61
    return ret;
2382
61
}
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
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
62
    ResultSet ret;
2372
2373
228
    for (const auto& result : results) {
2374
228
        if ( result.second == std::nullopt ) {
2375
228
            continue;
2376
228
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
62
    return ret;
2382
62
}
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
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
61
    ResultSet ret;
2372
2373
244
    for (const auto& result : results) {
2374
244
        if ( result.second == std::nullopt ) {
2375
244
            continue;
2376
244
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
61
    return ret;
2382
61
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
55
    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
55
    return ret;
2382
55
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
55
    ResultSet ret;
2372
2373
206
    for (const auto& result : results) {
2374
206
        if ( result.second == std::nullopt ) {
2375
206
            continue;
2376
206
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
55
    return ret;
2382
55
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
55
    ResultSet ret;
2372
2373
198
    for (const auto& result : results) {
2374
198
        if ( result.second == std::nullopt ) {
2375
198
            continue;
2376
198
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
55
    return ret;
2382
55
}
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
51
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
51
    ResultSet ret;
2372
2373
190
    for (const auto& result : results) {
2374
190
        if ( result.second == std::nullopt ) {
2375
190
            continue;
2376
190
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
51
    return ret;
2382
51
}
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
58
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
58
    ResultSet ret;
2372
2373
207
    for (const auto& result : results) {
2374
207
        if ( result.second == std::nullopt ) {
2375
207
            continue;
2376
207
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
58
    return ret;
2382
58
}
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
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
61
    ResultSet ret;
2372
2373
230
    for (const auto& result : results) {
2374
230
        if ( result.second == std::nullopt ) {
2375
230
            continue;
2376
230
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
61
    return ret;
2382
61
}
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
52
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
52
    ResultSet ret;
2372
2373
194
    for (const auto& result : results) {
2374
194
        if ( result.second == std::nullopt ) {
2375
194
            continue;
2376
194
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
52
    return ret;
2382
52
}
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
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
69
    ResultSet ret;
2372
2373
236
    for (const auto& result : results) {
2374
236
        if ( result.second == std::nullopt ) {
2375
236
            continue;
2376
236
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
69
    return ret;
2382
69
}
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
80
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
80
    ResultSet ret;
2372
2373
252
    for (const auto& result : results) {
2374
252
        if ( result.second == std::nullopt ) {
2375
252
            continue;
2376
252
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
80
    return ret;
2382
80
}
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
59
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
59
    ResultSet ret;
2372
2373
218
    for (const auto& result : results) {
2374
218
        if ( result.second == std::nullopt ) {
2375
218
            continue;
2376
218
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
59
    return ret;
2382
59
}
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
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
69
    ResultSet ret;
2372
2373
232
    for (const auto& result : results) {
2374
232
        if ( result.second == std::nullopt ) {
2375
232
            continue;
2376
232
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
69
    return ret;
2382
69
}
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
53
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
53
    ResultSet ret;
2372
2373
187
    for (const auto& result : results) {
2374
187
        if ( result.second == std::nullopt ) {
2375
187
            continue;
2376
187
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
53
    return ret;
2382
53
}
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
58
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
58
    ResultSet ret;
2372
2373
208
    for (const auto& result : results) {
2374
208
        if ( result.second == std::nullopt ) {
2375
208
            continue;
2376
208
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
58
    return ret;
2382
58
}
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
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
61
    ResultSet ret;
2372
2373
224
    for (const auto& result : results) {
2374
224
        if ( result.second == std::nullopt ) {
2375
224
            continue;
2376
224
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
61
    return ret;
2382
61
}
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
68
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
68
    ResultSet ret;
2372
2373
230
    for (const auto& result : results) {
2374
230
        if ( result.second == std::nullopt ) {
2375
230
            continue;
2376
230
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
68
    return ret;
2382
68
}
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
76
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
76
    ResultSet ret;
2372
2373
268
    for (const auto& result : results) {
2374
268
        if ( result.second == std::nullopt ) {
2375
268
            continue;
2376
268
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
76
    return ret;
2382
76
}
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
90
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
90
    ResultSet ret;
2372
2373
294
    for (const auto& result : results) {
2374
294
        if ( result.second == std::nullopt ) {
2375
294
            continue;
2376
294
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
90
    return ret;
2382
90
}
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
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
69
    ResultSet ret;
2372
2373
228
    for (const auto& result : results) {
2374
228
        if ( result.second == std::nullopt ) {
2375
228
            continue;
2376
228
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
69
    return ret;
2382
69
}
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
109
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
109
    ResultSet ret;
2372
2373
336
    for (const auto& result : results) {
2374
336
        if ( result.second == std::nullopt ) {
2375
336
            continue;
2376
336
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
109
    return ret;
2382
109
}
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
79
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
79
    ResultSet ret;
2372
2373
250
    for (const auto& result : results) {
2374
250
        if ( result.second == std::nullopt ) {
2375
250
            continue;
2376
250
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
79
    return ret;
2382
79
}
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
98
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
98
    ResultSet ret;
2372
2373
310
    for (const auto& result : results) {
2374
310
        if ( result.second == std::nullopt ) {
2375
310
            continue;
2376
310
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
98
    return ret;
2382
98
}
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
79
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
79
    ResultSet ret;
2372
2373
265
    for (const auto& result : results) {
2374
265
        if ( result.second == std::nullopt ) {
2375
265
            continue;
2376
265
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
79
    return ret;
2382
79
}
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
85
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
85
    ResultSet ret;
2372
2373
287
    for (const auto& result : results) {
2374
287
        if ( result.second == std::nullopt ) {
2375
287
            continue;
2376
287
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
85
    return ret;
2382
85
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
55
    ResultSet ret;
2372
2373
206
    for (const auto& result : results) {
2374
206
        if ( result.second == std::nullopt ) {
2375
206
            continue;
2376
206
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
55
    return ret;
2382
55
}
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
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
64
    ResultSet ret;
2372
2373
251
    for (const auto& result : results) {
2374
251
        if ( result.second == std::nullopt ) {
2375
251
            continue;
2376
251
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
64
    return ret;
2382
64
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
1.33k
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
1.33k
    (void)operations;
2388
1.33k
    (void)results;
2389
1.33k
    (void)data;
2390
1.33k
    (void)size;
2391
1.33k
}
2392
2393
template <class ResultType, class OperationType>
2394
3.33k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
3.33k
    (void)operation;
2396
2397
3.33k
    return false;
2398
3.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
755
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
755
    (void)operation;
2396
2397
755
    return false;
2398
755
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2394
338
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
338
    (void)operation;
2396
2397
338
    return false;
2398
338
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2394
40
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
40
    (void)operation;
2396
2397
40
    return false;
2398
40
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
799
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
799
    (void)operation;
2396
2397
799
    return false;
2398
799
}
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
225
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
225
    (void)operation;
2396
2397
225
    return false;
2398
225
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2394
101
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
101
    (void)operation;
2396
2397
101
    return false;
2398
101
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::dontCompare(cryptofuzz::operation::KDF_SSH const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::dontCompare(cryptofuzz::operation::KDF_X963 const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const
Line
Count
Source
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::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2394
119
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
119
    (void)operation;
2396
2397
119
    return false;
2398
119
}
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
191
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
191
    (void)operation;
2396
2397
191
    return false;
2398
191
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
80
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
80
    (void)operation;
2396
2397
80
    return false;
2398
80
}
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
173
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
173
    (void)operation;
2396
2397
173
    return false;
2398
173
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2394
64
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
64
    (void)operation;
2396
2397
64
    return false;
2398
64
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const
Line
Count
Source
2394
240
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
240
    (void)operation;
2396
2397
240
    return false;
2398
240
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2394
51
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
51
    (void)operation;
2396
2397
51
    return false;
2398
51
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2394
7
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
7
    (void)operation;
2396
2397
7
    return false;
2398
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
Line
Count
Source
2394
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
5
    (void)operation;
2396
2397
5
    return false;
2398
5
}
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
21
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
21
    (void)operation;
2396
2397
21
    return false;
2398
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl 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<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
12
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
12
    (void)operation;
2396
2397
12
    return false;
2398
12
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DH_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::dontCompare(cryptofuzz::operation::DH_Derive const&) const
Line
Count
Source
2394
11
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
11
    (void)operation;
2396
2397
11
    return false;
2398
11
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::dontCompare(cryptofuzz::operation::BLS_G1_MultiExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
2399
2400
template <>
2401
1.12k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
1.12k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
1.12k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
1.12k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
861
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
852
    return false;
2408
861
}
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
201
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
201
    if (
2419
201
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
201
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
122
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
97
            return true;
2424
97
        }
2425
122
    }
2426
2427
104
    return false;
2428
201
}
2429
2430
template <>
2431
4
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2432
4
    if (
2433
4
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2434
4
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2435
4
        if ( operation.UseRandomNonce() ) {
2436
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2437
4
            return true;
2438
4
        }
2439
4
    }
2440
2441
0
    return false;
2442
4
}
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
776
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
776
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
776
    return false;
2464
776
}
2465
2466
template <>
2467
144
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
144
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
144
    return false;
2471
144
}
2472
2473
template <>
2474
264
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
264
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
264
    return false;
2478
264
}
2479
2480
template <>
2481
342
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
342
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
340
    return false;
2485
342
}
2486
2487
template <class ResultType, class OperationType>
2488
28.7k
void ExecutorBase<ResultType, OperationType>::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.7k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
28.7k
    const auto filtered = filter(results);
2495
2496
28.7k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
22.5k
        return;
2499
22.5k
    }
2500
2501
6.18k
    if ( dontCompare(operations[0].second) == true ) {
2502
374
        return;
2503
374
    }
2504
2505
24.1k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
18.3k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
18.3k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
18.3k
        const bool equal = *prev == *cur;
2510
2511
18.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
18.3k
    }
2528
5.81k
}
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
2.01k
void ExecutorBase<ResultType, OperationType>::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.01k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2.01k
    const auto filtered = filter(results);
2495
2496
2.01k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.26k
        return;
2499
1.26k
    }
2500
2501
755
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.74k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.99k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.99k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.99k
        const bool equal = *prev == *cur;
2510
2511
1.99k
        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.99k
    }
2528
755
}
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
813
void ExecutorBase<ResultType, OperationType>::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
813
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
813
    const auto filtered = filter(results);
2495
2496
813
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
471
        return;
2499
471
    }
2500
2501
342
    if ( dontCompare(operations[0].second) == true ) {
2502
2
        return;
2503
2
    }
2504
2505
1.31k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
972
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
972
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
972
        const bool equal = *prev == *cur;
2510
2511
972
        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
972
    }
2528
340
}
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
814
void ExecutorBase<ResultType, OperationType>::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
814
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
814
    const auto filtered = filter(results);
2495
2496
814
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
476
        return;
2499
476
    }
2500
2501
338
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.05k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.71k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.71k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.71k
        const bool equal = *prev == *cur;
2510
2511
1.71k
        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.71k
    }
2528
338
}
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
764
void ExecutorBase<ResultType, OperationType>::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
764
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
764
    const auto filtered = filter(results);
2495
2496
764
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
500
        return;
2499
500
    }
2500
2501
264
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.48k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.21k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.21k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.21k
        const bool equal = *prev == *cur;
2510
2511
1.21k
        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.21k
    }
2528
264
}
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
3.84k
void ExecutorBase<ResultType, OperationType>::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.84k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3.84k
    const auto filtered = filter(results);
2495
2496
3.84k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3.07k
        return;
2499
3.07k
    }
2500
2501
776
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
4.52k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
3.75k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
3.75k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
3.75k
        const bool equal = *prev == *cur;
2510
2511
3.75k
        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
3.75k
    }
2528
776
}
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
2.97k
void ExecutorBase<ResultType, OperationType>::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.97k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2.97k
    const auto filtered = filter(results);
2495
2496
2.97k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2.82k
        return;
2499
2.82k
    }
2500
2501
144
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
781
    for (size_t i = 1; i < filtered.size(); i++) {
2506
637
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
637
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
637
        const bool equal = *prev == *cur;
2510
2511
637
        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
637
    }
2528
144
}
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
212
void ExecutorBase<ResultType, OperationType>::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
212
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
212
    const auto filtered = filter(results);
2495
2496
212
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
172
        return;
2499
172
    }
2500
2501
40
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
274
    for (size_t i = 1; i < filtered.size(); i++) {
2506
234
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
234
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
234
        const bool equal = *prev == *cur;
2510
2511
234
        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
234
    }
2528
40
}
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
1.96k
void ExecutorBase<ResultType, OperationType>::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.96k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.96k
    const auto filtered = filter(results);
2495
2496
1.96k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.16k
        return;
2499
1.16k
    }
2500
2501
799
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
3.32k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2.52k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2.52k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2.52k
        const bool equal = *prev == *cur;
2510
2511
2.52k
        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
2.52k
    }
2528
799
}
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
132
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
132
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
132
    const auto filtered = filter(results);
2495
2496
132
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
132
        return;
2499
132
    }
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
75
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
75
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
75
    const auto filtered = filter(results);
2495
2496
75
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
75
        return;
2499
75
    }
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
82
void ExecutorBase<ResultType, OperationType>::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
82
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
82
    const auto filtered = filter(results);
2495
2496
82
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
82
        return;
2499
82
    }
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
879
void ExecutorBase<ResultType, OperationType>::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
879
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
879
    const auto filtered = filter(results);
2495
2496
879
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
654
        return;
2499
654
    }
2500
2501
225
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
987
    for (size_t i = 1; i < filtered.size(); i++) {
2506
762
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
762
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
762
        const bool equal = *prev == *cur;
2510
2511
762
        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
762
    }
2528
225
}
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
439
void ExecutorBase<ResultType, OperationType>::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
439
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
439
    const auto filtered = filter(results);
2495
2496
439
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
338
        return;
2499
338
    }
2500
2501
101
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
261
    for (size_t i = 1; i < filtered.size(); i++) {
2506
160
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
160
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
160
        const bool equal = *prev == *cur;
2510
2511
160
        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
160
    }
2528
101
}
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
80
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
80
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
80
    const auto filtered = filter(results);
2495
2496
80
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
80
        return;
2499
80
    }
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
75
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
75
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
75
    const auto filtered = filter(results);
2495
2496
75
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
75
        return;
2499
75
    }
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
111
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
111
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
111
    const auto filtered = filter(results);
2495
2496
111
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
101
        return;
2499
101
    }
2500
2501
10
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
20
    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
10
}
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
480
void ExecutorBase<ResultType, OperationType>::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
480
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
480
    const auto filtered = filter(results);
2495
2496
480
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
361
        return;
2499
361
    }
2500
2501
119
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
625
    for (size_t i = 1; i < filtered.size(); i++) {
2506
506
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
506
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
506
        const bool equal = *prev == *cur;
2510
2511
506
        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
506
    }
2528
119
}
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
95
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
95
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
95
    const auto filtered = filter(results);
2495
2496
95
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
95
        return;
2499
95
    }
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
72
void ExecutorBase<ResultType, OperationType>::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
72
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
72
    const auto filtered = filter(results);
2495
2496
72
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
72
        return;
2499
72
    }
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
739
void ExecutorBase<ResultType, OperationType>::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
739
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
739
    const auto filtered = filter(results);
2495
2496
739
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
548
        return;
2499
548
    }
2500
2501
191
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
511
    for (size_t i = 1; i < filtered.size(); i++) {
2506
320
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
320
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
320
        const bool equal = *prev == *cur;
2510
2511
320
        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
320
    }
2528
191
}
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
770
void ExecutorBase<ResultType, OperationType>::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
770
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
770
    const auto filtered = filter(results);
2495
2496
770
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
690
        return;
2499
690
    }
2500
2501
80
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
222
    for (size_t i = 1; i < filtered.size(); i++) {
2506
142
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
142
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
142
        const bool equal = *prev == *cur;
2510
2511
142
        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
142
    }
2528
80
}
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
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
61
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
61
    const auto filtered = filter(results);
2495
2496
61
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
61
        return;
2499
61
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
812
void ExecutorBase<ResultType, OperationType>::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
812
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
812
    const auto filtered = filter(results);
2495
2496
812
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
611
        return;
2499
611
    }
2500
2501
201
    if ( dontCompare(operations[0].second) == true ) {
2502
97
        return;
2503
97
    }
2504
2505
359
    for (size_t i = 1; i < filtered.size(); i++) {
2506
255
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
255
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
255
        const bool equal = *prev == *cur;
2510
2511
255
        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
255
    }
2528
104
}
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
245
void ExecutorBase<ResultType, OperationType>::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
245
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
245
    const auto filtered = filter(results);
2495
2496
245
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
241
        return;
2499
241
    }
2500
2501
4
    if ( dontCompare(operations[0].second) == true ) {
2502
4
        return;
2503
4
    }
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
52
void ExecutorBase<ResultType, OperationType>::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
52
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
52
    const auto filtered = filter(results);
2495
2496
52
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
52
        return;
2499
52
    }
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
59
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
59
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
59
    const auto filtered = filter(results);
2495
2496
59
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
59
        return;
2499
59
    }
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
59
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
59
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
59
    const auto filtered = filter(results);
2495
2496
59
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
59
        return;
2499
59
    }
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
373
void ExecutorBase<ResultType, OperationType>::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
373
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
373
    const auto filtered = filter(results);
2495
2496
373
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
200
        return;
2499
200
    }
2500
2501
173
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
538
    for (size_t i = 1; i < filtered.size(); i++) {
2506
365
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
365
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
365
        const bool equal = *prev == *cur;
2510
2511
365
        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
365
    }
2528
173
}
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
207
void ExecutorBase<ResultType, OperationType>::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
207
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
207
    const auto filtered = filter(results);
2495
2496
207
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
143
        return;
2499
143
    }
2500
2501
64
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
188
    for (size_t i = 1; i < filtered.size(); i++) {
2506
124
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
124
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
124
        const bool equal = *prev == *cur;
2510
2511
124
        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
124
    }
2528
64
}
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
60
void ExecutorBase<ResultType, OperationType>::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
60
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
60
    const auto filtered = filter(results);
2495
2496
60
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
60
        return;
2499
60
    }
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
52
void ExecutorBase<ResultType, OperationType>::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
52
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
52
    const auto filtered = filter(results);
2495
2496
52
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
52
        return;
2499
52
    }
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
799
void ExecutorBase<ResultType, OperationType>::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
799
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
799
    const auto filtered = filter(results);
2495
2496
799
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
559
        return;
2499
559
    }
2500
2501
240
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
723
    for (size_t i = 1; i < filtered.size(); i++) {
2506
483
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
483
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
483
        const bool equal = *prev == *cur;
2510
2511
483
        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
483
    }
2528
240
}
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
257
void ExecutorBase<ResultType, OperationType>::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
257
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
257
    const auto filtered = filter(results);
2495
2496
257
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
206
        return;
2499
206
    }
2500
2501
51
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
153
    for (size_t i = 1; i < filtered.size(); i++) {
2506
102
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
102
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
102
        const bool equal = *prev == *cur;
2510
2511
102
        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
102
    }
2528
51
}
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
52
void ExecutorBase<ResultType, OperationType>::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
52
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
52
    const auto filtered = filter(results);
2495
2496
52
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
52
        return;
2499
52
    }
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
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
43
    const auto filtered = filter(results);
2495
2496
43
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
43
        return;
2499
43
    }
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::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
53
void ExecutorBase<ResultType, OperationType>::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
53
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
53
    const auto filtered = filter(results);
2495
2496
53
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
53
        return;
2499
53
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
103
void ExecutorBase<ResultType, OperationType>::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
103
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
103
    const auto filtered = filter(results);
2495
2496
103
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
96
        return;
2499
96
    }
2500
2501
7
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
24
    for (size_t i = 1; i < filtered.size(); i++) {
2506
17
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
17
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
17
        const bool equal = *prev == *cur;
2510
2511
17
        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
17
    }
2528
7
}
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
94
void ExecutorBase<ResultType, OperationType>::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
94
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
94
    const auto filtered = filter(results);
2495
2496
94
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
89
        return;
2499
89
    }
2500
2501
5
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
16
    for (size_t i = 1; i < filtered.size(); i++) {
2506
11
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
11
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
11
        const bool equal = *prev == *cur;
2510
2511
11
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
11
    }
2528
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_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
554
void ExecutorBase<ResultType, OperationType>::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
554
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
554
    const auto filtered = filter(results);
2495
2496
554
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
471
        return;
2499
471
    }
2500
2501
83
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
236
    for (size_t i = 1; i < filtered.size(); i++) {
2506
153
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
153
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
153
        const bool equal = *prev == *cur;
2510
2511
153
        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
153
    }
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
112
void ExecutorBase<ResultType, OperationType>::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
112
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
112
    const auto filtered = filter(results);
2495
2496
112
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
91
        return;
2499
91
    }
2500
2501
21
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
63
    for (size_t i = 1; i < filtered.size(); i++) {
2506
42
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
42
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
42
        const bool equal = *prev == *cur;
2510
2511
42
        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
42
    }
2528
21
}
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
129
void ExecutorBase<ResultType, OperationType>::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
129
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
129
    const auto filtered = filter(results);
2495
2496
129
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
119
        return;
2499
119
    }
2500
2501
10
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
34
    for (size_t i = 1; i < filtered.size(); i++) {
2506
24
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
24
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
24
        const bool equal = *prev == *cur;
2510
2511
24
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
24
    }
2528
10
}
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
103
void ExecutorBase<ResultType, OperationType>::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
103
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
103
    const auto filtered = filter(results);
2495
2496
103
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
91
        return;
2499
91
    }
2500
2501
12
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
42
    for (size_t i = 1; i < filtered.size(); i++) {
2506
30
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
30
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
30
        const bool equal = *prev == *cur;
2510
2511
30
        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
30
    }
2528
12
}
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
282
void ExecutorBase<ResultType, OperationType>::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
282
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
282
    const auto filtered = filter(results);
2495
2496
282
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
271
        return;
2499
271
    }
2500
2501
11
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
34
    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
11
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
4.10k
void ExecutorBase<ResultType, OperationType>::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.10k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
4.10k
    const auto filtered = filter(results);
2495
2496
4.10k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2.98k
        return;
2499
2.98k
    }
2500
2501
1.12k
    if ( dontCompare(operations[0].second) == true ) {
2502
271
        return;
2503
271
    }
2504
2505
2.59k
    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
852
}
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
97
void ExecutorBase<ResultType, OperationType>::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
97
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
97
    const auto filtered = filter(results);
2495
2496
97
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
97
        return;
2499
97
    }
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
353
void ExecutorBase<ResultType, OperationType>::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
353
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
353
    const auto filtered = filter(results);
2495
2496
353
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
353
        return;
2499
353
    }
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
73
void ExecutorBase<ResultType, OperationType>::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
73
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
73
    const auto filtered = filter(results);
2495
2496
73
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
73
        return;
2499
73
    }
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
66
void ExecutorBase<ResultType, OperationType>::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
66
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
66
    const auto filtered = filter(results);
2495
2496
66
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
66
        return;
2499
66
    }
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
73
void ExecutorBase<ResultType, OperationType>::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
73
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
73
    const auto filtered = filter(results);
2495
2496
73
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
73
        return;
2499
73
    }
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
49
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
49
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
49
    const auto filtered = filter(results);
2495
2496
49
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
49
        return;
2499
49
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
70
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
70
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
70
    const auto filtered = filter(results);
2495
2496
70
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
70
        return;
2499
70
    }
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
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
61
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
61
    const auto filtered = filter(results);
2495
2496
61
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
61
        return;
2499
61
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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
62
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
62
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
62
    const auto filtered = filter(results);
2495
2496
62
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
62
        return;
2499
62
    }
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
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
61
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
61
    const auto filtered = filter(results);
2495
2496
61
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
61
        return;
2499
61
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
55
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
55
    const auto filtered = filter(results);
2495
2496
55
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
55
        return;
2499
55
    }
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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
55
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
55
    const auto filtered = filter(results);
2495
2496
55
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
55
        return;
2499
55
    }
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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
55
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
55
    const auto filtered = filter(results);
2495
2496
55
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
55
        return;
2499
55
    }
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
51
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
51
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
51
    const auto filtered = filter(results);
2495
2496
51
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
51
        return;
2499
51
    }
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
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
58
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
58
    const auto filtered = filter(results);
2495
2496
58
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
58
        return;
2499
58
    }
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
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
61
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
61
    const auto filtered = filter(results);
2495
2496
61
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
61
        return;
2499
61
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
52
void ExecutorBase<ResultType, OperationType>::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
52
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
52
    const auto filtered = filter(results);
2495
2496
52
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
52
        return;
2499
52
    }
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
69
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
69
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
69
    const auto filtered = filter(results);
2495
2496
69
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
69
        return;
2499
69
    }
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
80
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
80
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
80
    const auto filtered = filter(results);
2495
2496
80
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
80
        return;
2499
80
    }
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
59
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
59
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
59
    const auto filtered = filter(results);
2495
2496
59
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
59
        return;
2499
59
    }
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
69
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
69
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
69
    const auto filtered = filter(results);
2495
2496
69
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
69
        return;
2499
69
    }
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
53
void ExecutorBase<ResultType, OperationType>::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
53
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
53
    const auto filtered = filter(results);
2495
2496
53
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
53
        return;
2499
53
    }
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
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
58
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
58
    const auto filtered = filter(results);
2495
2496
58
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
58
        return;
2499
58
    }
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
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
61
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
61
    const auto filtered = filter(results);
2495
2496
61
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
61
        return;
2499
61
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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
68
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
68
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
68
    const auto filtered = filter(results);
2495
2496
68
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
68
        return;
2499
68
    }
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
76
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
76
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
76
    const auto filtered = filter(results);
2495
2496
76
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
76
        return;
2499
76
    }
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
90
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
90
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
90
    const auto filtered = filter(results);
2495
2496
90
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
90
        return;
2499
90
    }
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
69
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
69
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
69
    const auto filtered = filter(results);
2495
2496
69
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
69
        return;
2499
69
    }
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
109
void ExecutorBase<ResultType, OperationType>::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
109
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
109
    const auto filtered = filter(results);
2495
2496
109
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
109
        return;
2499
109
    }
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
79
void ExecutorBase<ResultType, OperationType>::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
79
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
79
    const auto filtered = filter(results);
2495
2496
79
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
79
        return;
2499
79
    }
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
98
void ExecutorBase<ResultType, OperationType>::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
98
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
98
    const auto filtered = filter(results);
2495
2496
98
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
98
        return;
2499
98
    }
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
79
void ExecutorBase<ResultType, OperationType>::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
79
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
79
    const auto filtered = filter(results);
2495
2496
79
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
79
        return;
2499
79
    }
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
85
void ExecutorBase<ResultType, OperationType>::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
85
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
85
    const auto filtered = filter(results);
2495
2496
85
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
85
        return;
2499
85
    }
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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
55
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
55
    const auto filtered = filter(results);
2495
2496
55
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
55
        return;
2499
55
    }
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
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
0
        return;
2492
0
    }
2493
2494
64
    const auto filtered = filter(results);
2495
2496
64
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
64
        return;
2499
64
    }
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
351k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
351k
    (void)parentDs;
2551
351k
    return op;
2552
351k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
8.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8.56k
    (void)parentDs;
2551
8.56k
    return op;
2552
8.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
5.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.80k
    (void)parentDs;
2551
5.80k
    return op;
2552
5.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
8.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8.28k
    (void)parentDs;
2551
8.28k
    return op;
2552
8.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
7.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.81k
    (void)parentDs;
2551
7.81k
    return op;
2552
7.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
25.0k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
25.0k
    (void)parentDs;
2551
25.0k
    return op;
2552
25.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
17.7k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
17.7k
    (void)parentDs;
2551
17.7k
    return op;
2552
17.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
4.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.58k
    (void)parentDs;
2551
4.58k
    return op;
2552
4.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
10.6k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
10.6k
    (void)parentDs;
2551
10.6k
    return op;
2552
10.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
3.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.53k
    (void)parentDs;
2551
3.53k
    return op;
2552
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
3.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.44k
    (void)parentDs;
2551
3.44k
    return op;
2552
3.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
3.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.98k
    (void)parentDs;
2551
3.98k
    return op;
2552
3.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
5.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.62k
    (void)parentDs;
2551
5.62k
    return op;
2552
5.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
3.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.91k
    (void)parentDs;
2551
3.91k
    return op;
2552
3.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
3.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.45k
    (void)parentDs;
2551
3.45k
    return op;
2552
3.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
3.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.60k
    (void)parentDs;
2551
3.60k
    return op;
2552
3.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
3.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.34k
    (void)parentDs;
2551
3.34k
    return op;
2552
3.34k
}
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
5.63k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.63k
    (void)parentDs;
2551
5.63k
    return op;
2552
5.63k
}
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
4.20k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.20k
    (void)parentDs;
2551
4.20k
    return op;
2552
4.20k
}
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
3.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.62k
    (void)parentDs;
2551
3.62k
    return op;
2552
3.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
4.39k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.39k
    (void)parentDs;
2551
4.39k
    return op;
2552
4.39k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
3.77k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.77k
    (void)parentDs;
2551
3.77k
    return op;
2552
3.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
4.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.58k
    (void)parentDs;
2551
4.58k
    return op;
2552
4.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
2.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.78k
    (void)parentDs;
2551
2.78k
    return op;
2552
2.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) 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::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
4.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.11k
    (void)parentDs;
2551
4.11k
    return op;
2552
4.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) 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::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
3.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.49k
    (void)parentDs;
2551
3.49k
    return op;
2552
3.49k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
3.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.22k
    (void)parentDs;
2551
3.22k
    return op;
2552
3.22k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
4.20k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.20k
    (void)parentDs;
2551
4.20k
    return op;
2552
4.20k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
3.38k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.38k
    (void)parentDs;
2551
3.38k
    return op;
2552
3.38k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
3.15k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.15k
    (void)parentDs;
2551
3.15k
    return op;
2552
3.15k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.66k
    (void)parentDs;
2551
2.66k
    return op;
2552
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
5.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.14k
    (void)parentDs;
2551
5.14k
    return op;
2552
5.14k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
4.07k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.07k
    (void)parentDs;
2551
4.07k
    return op;
2552
4.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
3.32k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.32k
    (void)parentDs;
2551
3.32k
    return op;
2552
3.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
2.48k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.48k
    (void)parentDs;
2551
2.48k
    return op;
2552
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
3.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.53k
    (void)parentDs;
2551
3.53k
    return op;
2552
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
3.25k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.25k
    (void)parentDs;
2551
3.25k
    return op;
2552
3.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
3.16k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.16k
    (void)parentDs;
2551
3.16k
    return op;
2552
3.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
3.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.50k
    (void)parentDs;
2551
3.50k
    return op;
2552
3.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
3.46k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.46k
    (void)parentDs;
2551
3.46k
    return op;
2552
3.46k
}
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.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.01k
    (void)parentDs;
2551
3.01k
    return op;
2552
3.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
2.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.73k
    (void)parentDs;
2551
2.73k
    return op;
2552
2.73k
}
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.30k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.30k
    (void)parentDs;
2551
4.30k
    return op;
2552
4.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.45k
    (void)parentDs;
2551
2.45k
    return op;
2552
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.05k
    (void)parentDs;
2551
2.05k
    return op;
2552
2.05k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
3.41k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.41k
    (void)parentDs;
2551
3.41k
    return op;
2552
3.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
3.10k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.10k
    (void)parentDs;
2551
3.10k
    return op;
2552
3.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
4.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.40k
    (void)parentDs;
2551
4.40k
    return op;
2552
4.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
10.9k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
10.9k
    (void)parentDs;
2551
10.9k
    return op;
2552
10.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.58k
    (void)parentDs;
2551
2.58k
    return op;
2552
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
4.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.66k
    (void)parentDs;
2551
4.66k
    return op;
2552
4.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
2.11k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.11k
    (void)parentDs;
2551
2.11k
    return op;
2552
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.37k
    (void)parentDs;
2551
2.37k
    return op;
2552
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
3.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.22k
    (void)parentDs;
2551
3.22k
    return op;
2552
3.22k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
2.49k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.49k
    (void)parentDs;
2551
2.49k
    return op;
2552
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
3.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.74k
    (void)parentDs;
2551
3.74k
    return op;
2552
3.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
2.25k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.25k
    (void)parentDs;
2551
2.25k
    return op;
2552
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.58k
    (void)parentDs;
2551
2.58k
    return op;
2552
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
2.93k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.93k
    (void)parentDs;
2551
2.93k
    return op;
2552
2.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
2.88k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.88k
    (void)parentDs;
2551
2.88k
    return op;
2552
2.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
2.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.73k
    (void)parentDs;
2551
2.73k
    return op;
2552
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
2.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.53k
    (void)parentDs;
2551
2.53k
    return op;
2552
2.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
3.12k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.12k
    (void)parentDs;
2551
3.12k
    return op;
2552
3.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
2.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.80k
    (void)parentDs;
2551
2.80k
    return op;
2552
2.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.92k
    (void)parentDs;
2551
2.92k
    return op;
2552
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
2.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.57k
    (void)parentDs;
2551
2.57k
    return op;
2552
2.57k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.60k
    (void)parentDs;
2551
2.60k
    return op;
2552
2.60k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
2.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.84k
    (void)parentDs;
2551
2.84k
    return op;
2552
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2549
3.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.17k
    (void)parentDs;
2551
3.17k
    return op;
2552
3.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.95k
    (void)parentDs;
2551
2.95k
    return op;
2552
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
2.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.79k
    (void)parentDs;
2551
2.79k
    return op;
2552
2.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2549
2.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.57k
    (void)parentDs;
2551
2.57k
    return op;
2552
2.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
2.75k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.75k
    (void)parentDs;
2551
2.75k
    return op;
2552
2.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
3.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.06k
    (void)parentDs;
2551
3.06k
    return op;
2552
3.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
4.55k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.55k
    (void)parentDs;
2551
4.55k
    return op;
2552
4.55k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
3.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.69k
    (void)parentDs;
2551
3.69k
    return op;
2552
3.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.37k
    (void)parentDs;
2551
2.37k
    return op;
2552
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
3.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.00k
    (void)parentDs;
2551
3.00k
    return op;
2552
3.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.92k
    (void)parentDs;
2551
2.92k
    return op;
2552
2.92k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.69k
    (void)parentDs;
2551
2.69k
    return op;
2552
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
2.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.62k
    (void)parentDs;
2551
2.62k
    return op;
2552
2.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
3.38k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.38k
    (void)parentDs;
2551
3.38k
    return op;
2552
3.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
2.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.67k
    (void)parentDs;
2551
2.67k
    return op;
2552
2.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
3.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.92k
    (void)parentDs;
2551
3.92k
    return op;
2552
3.92k
}
2553
2554
299
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
299
    (void)parentDs;
2556
299
    op.modulo = modulo;
2557
299
    return op;
2558
299
}
2559
2560
827
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
827
    (void)parentDs;
2562
827
    op.modulo = modulo;
2563
827
    return op;
2564
827
}
2565
2566
383
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
383
    (void)parentDs;
2568
383
    op.modulo = modulo;
2569
383
    return op;
2570
383
}
2571
2572
508
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
508
    (void)parentDs;
2574
508
    op.modulo = modulo;
2575
508
    return op;
2576
508
}
2577
2578
318
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
318
    (void)parentDs;
2580
318
    op.modulo = modulo;
2581
318
    return op;
2582
318
}
2583
2584
452
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
452
    (void)parentDs;
2586
452
    op.modulo = modulo;
2587
452
    return op;
2588
452
}
2589
2590
447
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
447
    (void)parentDs;
2592
447
    op.modulo = modulo;
2593
447
    return op;
2594
447
}
2595
2596
345
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
345
    (void)parentDs;
2598
345
    op.modulo = modulo;
2599
345
    return op;
2600
345
}
2601
2602
481
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
481
    (void)parentDs;
2604
481
    op.modulo = modulo;
2605
481
    return op;
2606
481
}
2607
2608
715
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
715
    (void)parentDs;
2610
715
    op.modulo = modulo;
2611
715
    return op;
2612
715
}
2613
2614
386
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
386
    (void)parentDs;
2616
386
    op.modulo = modulo;
2617
386
    return op;
2618
386
}
2619
2620
421
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
421
    (void)parentDs;
2622
421
    op.modulo = modulo;
2623
421
    return op;
2624
421
}
2625
2626
366
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
366
    (void)parentDs;
2628
366
    op.modulo = modulo;
2629
366
    return op;
2630
366
}
2631
2632
609
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
609
    (void)parentDs;
2634
609
    op.modulo = modulo;
2635
609
    return op;
2636
609
}
2637
2638
727
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
727
    (void)parentDs;
2640
727
    op.modulo = modulo;
2641
727
    return op;
2642
727
}
2643
2644
416
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
416
    (void)parentDs;
2646
416
    op.modulo = modulo;
2647
416
    return op;
2648
416
}
2649
2650
526
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
526
    (void)parentDs;
2652
526
    op.modulo = modulo;
2653
526
    return op;
2654
526
}
2655
2656
499
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
499
    (void)parentDs;
2658
499
    op.modulo = modulo;
2659
499
    return op;
2660
499
}
2661
2662
343
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
343
    (void)parentDs;
2664
343
    op.modulo = modulo;
2665
343
    return op;
2666
343
}
2667
2668
325
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
325
    (void)parentDs;
2670
325
    op.modulo = modulo;
2671
325
    return op;
2672
325
}
2673
2674
419
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
419
    (void)parentDs;
2676
419
    op.modulo = modulo;
2677
419
    return op;
2678
419
}
2679
2680
453
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
453
    (void)parentDs;
2682
453
    op.modulo = modulo;
2683
453
    return op;
2684
453
}
2685
2686
template <class ResultType, class OperationType>
2687
365k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
365k
    Datasource ds(data, size);
2689
365k
    if ( parentDs != nullptr ) {
2690
365k
        auto modifier = parentDs->GetData(0);
2691
365k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
365k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
365k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
8.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
8.61k
    Datasource ds(data, size);
2689
8.61k
    if ( parentDs != nullptr ) {
2690
8.61k
        auto modifier = parentDs->GetData(0);
2691
8.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
8.61k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
8.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.85k
    Datasource ds(data, size);
2689
5.85k
    if ( parentDs != nullptr ) {
2690
5.85k
        auto modifier = parentDs->GetData(0);
2691
5.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.85k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
8.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
8.31k
    Datasource ds(data, size);
2689
8.31k
    if ( parentDs != nullptr ) {
2690
8.31k
        auto modifier = parentDs->GetData(0);
2691
8.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
8.31k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
8.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.85k
    Datasource ds(data, size);
2689
7.85k
    if ( parentDs != nullptr ) {
2690
7.85k
        auto modifier = parentDs->GetData(0);
2691
7.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.85k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
25.0k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
25.0k
    Datasource ds(data, size);
2689
25.0k
    if ( parentDs != nullptr ) {
2690
25.0k
        auto modifier = parentDs->GetData(0);
2691
25.0k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
25.0k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
25.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
17.8k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
17.8k
    Datasource ds(data, size);
2689
17.8k
    if ( parentDs != nullptr ) {
2690
17.8k
        auto modifier = parentDs->GetData(0);
2691
17.8k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
17.8k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
17.8k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.62k
    Datasource ds(data, size);
2689
4.62k
    if ( parentDs != nullptr ) {
2690
4.62k
        auto modifier = parentDs->GetData(0);
2691
4.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.62k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
10.6k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
10.6k
    Datasource ds(data, size);
2689
10.6k
    if ( parentDs != nullptr ) {
2690
10.6k
        auto modifier = parentDs->GetData(0);
2691
10.6k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
10.6k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
10.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.56k
    Datasource ds(data, size);
2689
3.56k
    if ( parentDs != nullptr ) {
2690
3.56k
        auto modifier = parentDs->GetData(0);
2691
3.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.56k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.48k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.48k
    Datasource ds(data, size);
2689
3.48k
    if ( parentDs != nullptr ) {
2690
3.48k
        auto modifier = parentDs->GetData(0);
2691
3.48k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.48k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.02k
    Datasource ds(data, size);
2689
4.02k
    if ( parentDs != nullptr ) {
2690
4.02k
        auto modifier = parentDs->GetData(0);
2691
4.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.66k
    Datasource ds(data, size);
2689
5.66k
    if ( parentDs != nullptr ) {
2690
5.66k
        auto modifier = parentDs->GetData(0);
2691
5.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.66k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.95k
    Datasource ds(data, size);
2689
3.95k
    if ( parentDs != nullptr ) {
2690
3.95k
        auto modifier = parentDs->GetData(0);
2691
3.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.49k
    Datasource ds(data, size);
2689
3.49k
    if ( parentDs != nullptr ) {
2690
3.49k
        auto modifier = parentDs->GetData(0);
2691
3.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.49k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.64k
    Datasource ds(data, size);
2689
3.64k
    if ( parentDs != nullptr ) {
2690
3.64k
        auto modifier = parentDs->GetData(0);
2691
3.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.64k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.38k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.38k
    Datasource ds(data, size);
2689
3.38k
    if ( parentDs != nullptr ) {
2690
3.38k
        auto modifier = parentDs->GetData(0);
2691
3.38k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.38k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.67k
    Datasource ds(data, size);
2689
5.67k
    if ( parentDs != nullptr ) {
2690
5.67k
        auto modifier = parentDs->GetData(0);
2691
5.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.67k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.67k
}
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
4.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.24k
    Datasource ds(data, size);
2689
4.24k
    if ( parentDs != nullptr ) {
2690
4.24k
        auto modifier = parentDs->GetData(0);
2691
4.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.24k
}
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
3.65k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.65k
    Datasource ds(data, size);
2689
3.65k
    if ( parentDs != nullptr ) {
2690
3.65k
        auto modifier = parentDs->GetData(0);
2691
3.65k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.65k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.42k
    Datasource ds(data, size);
2689
4.42k
    if ( parentDs != nullptr ) {
2690
4.42k
        auto modifier = parentDs->GetData(0);
2691
4.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.42k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.42k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.79k
    Datasource ds(data, size);
2689
3.79k
    if ( parentDs != nullptr ) {
2690
3.79k
        auto modifier = parentDs->GetData(0);
2691
3.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.79k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.62k
    Datasource ds(data, size);
2689
4.62k
    if ( parentDs != nullptr ) {
2690
4.62k
        auto modifier = parentDs->GetData(0);
2691
4.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.62k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::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::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.32k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.32k
    Datasource ds(data, size);
2689
4.32k
    if ( parentDs != nullptr ) {
2690
4.32k
        auto modifier = parentDs->GetData(0);
2691
4.32k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.32k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.17k
    Datasource ds(data, size);
2689
4.17k
    if ( parentDs != nullptr ) {
2690
4.17k
        auto modifier = parentDs->GetData(0);
2691
4.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.17k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.95k
    Datasource ds(data, size);
2689
2.95k
    if ( parentDs != nullptr ) {
2690
2.95k
        auto modifier = parentDs->GetData(0);
2691
2.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.53k
    Datasource ds(data, size);
2689
3.53k
    if ( parentDs != nullptr ) {
2690
3.53k
        auto modifier = parentDs->GetData(0);
2691
3.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.53k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.53k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.26k
    Datasource ds(data, size);
2689
3.26k
    if ( parentDs != nullptr ) {
2690
3.26k
        auto modifier = parentDs->GetData(0);
2691
3.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.26k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.26k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.23k
    Datasource ds(data, size);
2689
4.23k
    if ( parentDs != nullptr ) {
2690
4.23k
        auto modifier = parentDs->GetData(0);
2691
4.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.23k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.23k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.42k
    Datasource ds(data, size);
2689
3.42k
    if ( parentDs != nullptr ) {
2690
3.42k
        auto modifier = parentDs->GetData(0);
2691
3.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.42k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.42k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.18k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.18k
    Datasource ds(data, size);
2689
3.18k
    if ( parentDs != nullptr ) {
2690
3.18k
        auto modifier = parentDs->GetData(0);
2691
3.18k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.18k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.18k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.69k
    Datasource ds(data, size);
2689
2.69k
    if ( parentDs != nullptr ) {
2690
2.69k
        auto modifier = parentDs->GetData(0);
2691
2.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.69k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.17k
    Datasource ds(data, size);
2689
5.17k
    if ( parentDs != nullptr ) {
2690
5.17k
        auto modifier = parentDs->GetData(0);
2691
5.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.17k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.11k
    Datasource ds(data, size);
2689
4.11k
    if ( parentDs != nullptr ) {
2690
4.11k
        auto modifier = parentDs->GetData(0);
2691
4.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.11k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::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::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.52k
    Datasource ds(data, size);
2689
2.52k
    if ( parentDs != nullptr ) {
2690
2.52k
        auto modifier = parentDs->GetData(0);
2691
2.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.52k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.57k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.57k
    Datasource ds(data, size);
2689
3.57k
    if ( parentDs != nullptr ) {
2690
3.57k
        auto modifier = parentDs->GetData(0);
2691
3.57k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.57k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.29k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.29k
    Datasource ds(data, size);
2689
3.29k
    if ( parentDs != nullptr ) {
2690
3.29k
        auto modifier = parentDs->GetData(0);
2691
3.29k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.29k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.21k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.21k
    Datasource ds(data, size);
2689
3.21k
    if ( parentDs != nullptr ) {
2690
3.21k
        auto modifier = parentDs->GetData(0);
2691
3.21k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.21k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.55k
    Datasource ds(data, size);
2689
3.55k
    if ( parentDs != nullptr ) {
2690
3.55k
        auto modifier = parentDs->GetData(0);
2691
3.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.55k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.50k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.50k
    Datasource ds(data, size);
2689
3.50k
    if ( parentDs != nullptr ) {
2690
3.50k
        auto modifier = parentDs->GetData(0);
2691
3.50k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.50k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.50k
}
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.04k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.04k
    Datasource ds(data, size);
2689
3.04k
    if ( parentDs != nullptr ) {
2690
3.04k
        auto modifier = parentDs->GetData(0);
2691
3.04k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.04k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.77k
    Datasource ds(data, size);
2689
2.77k
    if ( parentDs != nullptr ) {
2690
2.77k
        auto modifier = parentDs->GetData(0);
2691
2.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.77k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.77k
}
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.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.33k
    Datasource ds(data, size);
2689
4.33k
    if ( parentDs != nullptr ) {
2690
4.33k
        auto modifier = parentDs->GetData(0);
2691
4.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.33k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.48k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.48k
    Datasource ds(data, size);
2689
2.48k
    if ( parentDs != nullptr ) {
2690
2.48k
        auto modifier = parentDs->GetData(0);
2691
2.48k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.48k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.08k
    Datasource ds(data, size);
2689
2.08k
    if ( parentDs != nullptr ) {
2690
2.08k
        auto modifier = parentDs->GetData(0);
2691
2.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.08k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.08k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.45k
    Datasource ds(data, size);
2689
3.45k
    if ( parentDs != nullptr ) {
2690
3.45k
        auto modifier = parentDs->GetData(0);
2691
3.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.45k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.13k
    Datasource ds(data, size);
2689
3.13k
    if ( parentDs != nullptr ) {
2690
3.13k
        auto modifier = parentDs->GetData(0);
2691
3.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.13k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.45k
    Datasource ds(data, size);
2689
4.45k
    if ( parentDs != nullptr ) {
2690
4.45k
        auto modifier = parentDs->GetData(0);
2691
4.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.45k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
21.3k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
21.3k
    Datasource ds(data, size);
2689
21.3k
    if ( parentDs != nullptr ) {
2690
21.3k
        auto modifier = parentDs->GetData(0);
2691
21.3k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
21.3k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
21.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.61k
    Datasource ds(data, size);
2689
2.61k
    if ( parentDs != nullptr ) {
2690
2.61k
        auto modifier = parentDs->GetData(0);
2691
2.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.61k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.73k
    Datasource ds(data, size);
2689
4.73k
    if ( parentDs != nullptr ) {
2690
4.73k
        auto modifier = parentDs->GetData(0);
2691
4.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.73k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::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::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.40k
    Datasource ds(data, size);
2689
2.40k
    if ( parentDs != nullptr ) {
2690
2.40k
        auto modifier = parentDs->GetData(0);
2691
2.40k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.40k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.27k
    Datasource ds(data, size);
2689
3.27k
    if ( parentDs != nullptr ) {
2690
3.27k
        auto modifier = parentDs->GetData(0);
2691
3.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.27k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.53k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.53k
    Datasource ds(data, size);
2689
2.53k
    if ( parentDs != nullptr ) {
2690
2.53k
        auto modifier = parentDs->GetData(0);
2691
2.53k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.53k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.84k
    Datasource ds(data, size);
2689
3.84k
    if ( parentDs != nullptr ) {
2690
3.84k
        auto modifier = parentDs->GetData(0);
2691
3.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.84k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.84k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.36k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.36k
    Datasource ds(data, size);
2689
2.36k
    if ( parentDs != nullptr ) {
2690
2.36k
        auto modifier = parentDs->GetData(0);
2691
2.36k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.36k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.66k
    Datasource ds(data, size);
2689
2.66k
    if ( parentDs != nullptr ) {
2690
2.66k
        auto modifier = parentDs->GetData(0);
2691
2.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.66k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.98k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.98k
    Datasource ds(data, size);
2689
2.98k
    if ( parentDs != nullptr ) {
2690
2.98k
        auto modifier = parentDs->GetData(0);
2691
2.98k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.98k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.92k
    Datasource ds(data, size);
2689
2.92k
    if ( parentDs != nullptr ) {
2690
2.92k
        auto modifier = parentDs->GetData(0);
2691
2.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.92k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.77k
    Datasource ds(data, size);
2689
2.77k
    if ( parentDs != nullptr ) {
2690
2.77k
        auto modifier = parentDs->GetData(0);
2691
2.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.77k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.57k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.57k
    Datasource ds(data, size);
2689
2.57k
    if ( parentDs != nullptr ) {
2690
2.57k
        auto modifier = parentDs->GetData(0);
2691
2.57k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.57k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.16k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.16k
    Datasource ds(data, size);
2689
3.16k
    if ( parentDs != nullptr ) {
2690
3.16k
        auto modifier = parentDs->GetData(0);
2691
3.16k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.16k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.84k
    Datasource ds(data, size);
2689
2.84k
    if ( parentDs != nullptr ) {
2690
2.84k
        auto modifier = parentDs->GetData(0);
2691
2.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.84k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.94k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.94k
    Datasource ds(data, size);
2689
2.94k
    if ( parentDs != nullptr ) {
2690
2.94k
        auto modifier = parentDs->GetData(0);
2691
2.94k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.94k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.60k
    Datasource ds(data, size);
2689
2.60k
    if ( parentDs != nullptr ) {
2690
2.60k
        auto modifier = parentDs->GetData(0);
2691
2.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.60k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.60k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.64k
    Datasource ds(data, size);
2689
2.64k
    if ( parentDs != nullptr ) {
2690
2.64k
        auto modifier = parentDs->GetData(0);
2691
2.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.64k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.64k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.87k
    Datasource ds(data, size);
2689
2.87k
    if ( parentDs != nullptr ) {
2690
2.87k
        auto modifier = parentDs->GetData(0);
2691
2.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.87k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.22k
    Datasource ds(data, size);
2689
3.22k
    if ( parentDs != nullptr ) {
2690
3.22k
        auto modifier = parentDs->GetData(0);
2691
3.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.22k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.99k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.99k
    Datasource ds(data, size);
2689
2.99k
    if ( parentDs != nullptr ) {
2690
2.99k
        auto modifier = parentDs->GetData(0);
2691
2.99k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.99k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::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::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.60k
    Datasource ds(data, size);
2689
2.60k
    if ( parentDs != nullptr ) {
2690
2.60k
        auto modifier = parentDs->GetData(0);
2691
2.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.60k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.80k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.80k
    Datasource ds(data, size);
2689
2.80k
    if ( parentDs != nullptr ) {
2690
2.80k
        auto modifier = parentDs->GetData(0);
2691
2.80k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.80k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.10k
    Datasource ds(data, size);
2689
3.10k
    if ( parentDs != nullptr ) {
2690
3.10k
        auto modifier = parentDs->GetData(0);
2691
3.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.10k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.59k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.59k
    Datasource ds(data, size);
2689
4.59k
    if ( parentDs != nullptr ) {
2690
4.59k
        auto modifier = parentDs->GetData(0);
2691
4.59k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.59k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.59k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.72k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.72k
    Datasource ds(data, size);
2689
3.72k
    if ( parentDs != nullptr ) {
2690
3.72k
        auto modifier = parentDs->GetData(0);
2691
3.72k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.72k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.40k
    Datasource ds(data, size);
2689
2.40k
    if ( parentDs != nullptr ) {
2690
2.40k
        auto modifier = parentDs->GetData(0);
2691
2.40k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.40k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.04k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.04k
    Datasource ds(data, size);
2689
3.04k
    if ( parentDs != nullptr ) {
2690
3.04k
        auto modifier = parentDs->GetData(0);
2691
3.04k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.04k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.96k
    Datasource ds(data, size);
2689
2.96k
    if ( parentDs != nullptr ) {
2690
2.96k
        auto modifier = parentDs->GetData(0);
2691
2.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.96k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.74k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.74k
    Datasource ds(data, size);
2689
2.74k
    if ( parentDs != nullptr ) {
2690
2.74k
        auto modifier = parentDs->GetData(0);
2691
2.74k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.74k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.66k
    Datasource ds(data, size);
2689
2.66k
    if ( parentDs != nullptr ) {
2690
2.66k
        auto modifier = parentDs->GetData(0);
2691
2.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.66k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.48k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.48k
    Datasource ds(data, size);
2689
3.48k
    if ( parentDs != nullptr ) {
2690
3.48k
        auto modifier = parentDs->GetData(0);
2691
3.48k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.48k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.71k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.71k
    Datasource ds(data, size);
2689
2.71k
    if ( parentDs != nullptr ) {
2690
2.71k
        auto modifier = parentDs->GetData(0);
2691
2.71k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.71k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.71k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.96k
    Datasource ds(data, size);
2689
3.96k
    if ( parentDs != nullptr ) {
2690
3.96k
        auto modifier = parentDs->GetData(0);
2691
3.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.96k
}
2696
2697
template <class ResultType, class OperationType>
2698
361k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
361k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
361k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
361k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
361k
    if ( modules.find(moduleID) == modules.end() ) {
2712
274k
        return nullptr;
2713
274k
    }
2714
2715
87.5k
    return modules.at(moduleID);
2716
361k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
8.56k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
8.56k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
8.56k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
8.56k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
8.56k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.58k
        return nullptr;
2713
4.58k
    }
2714
2715
3.98k
    return modules.at(moduleID);
2716
8.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.80k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.80k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.80k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.62k
        return nullptr;
2713
3.62k
    }
2714
2715
2.17k
    return modules.at(moduleID);
2716
5.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
8.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
8.28k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
8.28k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
8.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
8.28k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.24k
        return nullptr;
2713
4.24k
    }
2714
2715
4.04k
    return modules.at(moduleID);
2716
8.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.81k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
5.04k
        return nullptr;
2713
5.04k
    }
2714
2715
2.77k
    return modules.at(moduleID);
2716
7.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
25.0k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
25.0k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
25.0k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
25.0k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
25.0k
    if ( modules.find(moduleID) == modules.end() ) {
2712
12.0k
        return nullptr;
2713
12.0k
    }
2714
2715
13.0k
    return modules.at(moduleID);
2716
25.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
17.7k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
17.7k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
17.7k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
17.7k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
17.7k
    if ( modules.find(moduleID) == modules.end() ) {
2712
8.36k
        return nullptr;
2713
8.36k
    }
2714
2715
9.40k
    return modules.at(moduleID);
2716
17.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.58k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.58k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.58k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.38k
        return nullptr;
2713
3.38k
    }
2714
2715
1.19k
    return modules.at(moduleID);
2716
4.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
10.6k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
10.6k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
10.6k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
10.6k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
10.6k
    if ( modules.find(moduleID) == modules.end() ) {
2712
5.40k
        return nullptr;
2713
5.40k
    }
2714
2715
5.20k
    return modules.at(moduleID);
2716
10.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.53k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.68k
        return nullptr;
2713
2.68k
    }
2714
2715
849
    return modules.at(moduleID);
2716
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.44k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.44k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.44k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.74k
        return nullptr;
2713
2.74k
    }
2714
2715
702
    return modules.at(moduleID);
2716
3.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.98k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.98k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.98k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.16k
        return nullptr;
2713
3.16k
    }
2714
2715
818
    return modules.at(moduleID);
2716
3.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.62k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.62k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.62k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.34k
        return nullptr;
2713
3.34k
    }
2714
2715
2.27k
    return modules.at(moduleID);
2716
5.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.91k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.91k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.91k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.14k
        return nullptr;
2713
3.14k
    }
2714
2715
768
    return modules.at(moduleID);
2716
3.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.45k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.45k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.45k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.78k
        return nullptr;
2713
2.78k
    }
2714
2715
671
    return modules.at(moduleID);
2716
3.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.60k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.60k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.60k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.02k
        return nullptr;
2713
3.02k
    }
2714
2715
585
    return modules.at(moduleID);
2716
3.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.34k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.34k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.34k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.16k
        return nullptr;
2713
3.16k
    }
2714
2715
184
    return modules.at(moduleID);
2716
3.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.63k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.63k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.63k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.63k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.63k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.82k
        return nullptr;
2713
3.82k
    }
2714
2715
1.81k
    return modules.at(moduleID);
2716
5.63k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.20k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.20k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.20k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.20k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.20k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.30k
        return nullptr;
2713
3.30k
    }
2714
2715
894
    return modules.at(moduleID);
2716
4.20k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.62k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.62k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.62k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.96k
        return nullptr;
2713
2.96k
    }
2714
2715
656
    return modules.at(moduleID);
2716
3.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.39k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.39k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.39k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.39k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.39k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.03k
        return nullptr;
2713
3.03k
    }
2714
2715
1.35k
    return modules.at(moduleID);
2716
4.39k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.77k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.77k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.77k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.77k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.77k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.62k
        return nullptr;
2713
2.62k
    }
2714
2715
1.14k
    return modules.at(moduleID);
2716
3.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.58k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.58k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.58k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.63k
        return nullptr;
2713
2.63k
    }
2714
2715
1.94k
    return modules.at(moduleID);
2716
4.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.78k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.78k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.78k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.54k
        return nullptr;
2713
2.54k
    }
2714
2715
243
    return modules.at(moduleID);
2716
2.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::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
0
        moduleID = *options.forceModule;
2704
0
    }
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
2.59k
        return nullptr;
2713
2.59k
    }
2714
2715
1.69k
    return modules.at(moduleID);
2716
4.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.11k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.11k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.11k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.59k
        return nullptr;
2713
3.59k
    }
2714
2715
529
    return modules.at(moduleID);
2716
4.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::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
0
        moduleID = *options.forceModule;
2704
0
    }
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
2.70k
        return nullptr;
2713
2.70k
    }
2714
2715
207
    return modules.at(moduleID);
2716
2.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.49k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.49k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.49k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.25k
        return nullptr;
2713
3.25k
    }
2714
2715
241
    return modules.at(moduleID);
2716
3.49k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.22k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.92k
        return nullptr;
2713
2.92k
    }
2714
2715
292
    return modules.at(moduleID);
2716
3.22k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.20k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.20k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.20k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.20k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.20k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.30k
        return nullptr;
2713
3.30k
    }
2714
2715
895
    return modules.at(moduleID);
2716
4.20k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.38k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.38k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.38k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.38k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.38k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.85k
        return nullptr;
2713
2.85k
    }
2714
2715
531
    return modules.at(moduleID);
2716
3.38k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.15k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.15k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.15k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.15k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.15k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.87k
        return nullptr;
2713
2.87k
    }
2714
2715
280
    return modules.at(moduleID);
2716
3.15k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.66k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.66k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.66k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.43k
        return nullptr;
2713
2.43k
    }
2714
2715
228
    return modules.at(moduleID);
2716
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.14k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.14k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.14k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.45k
        return nullptr;
2713
3.45k
    }
2714
2715
1.69k
    return modules.at(moduleID);
2716
5.14k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.07k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.07k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.07k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.07k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.07k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.40k
        return nullptr;
2713
3.40k
    }
2714
2715
663
    return modules.at(moduleID);
2716
4.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.32k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.32k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.32k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.32k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.32k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.08k
        return nullptr;
2713
3.08k
    }
2714
2715
240
    return modules.at(moduleID);
2716
3.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.48k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.48k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.48k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.48k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.48k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.26k
        return nullptr;
2713
2.26k
    }
2714
2715
224
    return modules.at(moduleID);
2716
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.53k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.30k
        return nullptr;
2713
3.30k
    }
2714
2715
228
    return modules.at(moduleID);
2716
3.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.25k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.25k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.25k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.25k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.25k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.99k
        return nullptr;
2713
2.99k
    }
2714
2715
259
    return modules.at(moduleID);
2716
3.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.16k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.16k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.16k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.16k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.16k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.98k
        return nullptr;
2713
2.98k
    }
2714
2715
177
    return modules.at(moduleID);
2716
3.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.50k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.25k
        return nullptr;
2713
3.25k
    }
2714
2715
251
    return modules.at(moduleID);
2716
3.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.46k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.46k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.46k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.46k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.46k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.23k
        return nullptr;
2713
3.23k
    }
2714
2715
229
    return modules.at(moduleID);
2716
3.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.01k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.01k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.01k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.66k
        return nullptr;
2713
2.66k
    }
2714
2715
350
    return modules.at(moduleID);
2716
3.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.73k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.73k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.73k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.39k
        return nullptr;
2713
2.39k
    }
2714
2715
347
    return modules.at(moduleID);
2716
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.30k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.30k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.30k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.30k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.30k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.00k
        return nullptr;
2713
3.00k
    }
2714
2715
1.29k
    return modules.at(moduleID);
2716
4.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.45k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.45k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.45k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.06k
        return nullptr;
2713
2.06k
    }
2714
2715
390
    return modules.at(moduleID);
2716
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.05k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.05k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.05k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.64k
        return nullptr;
2713
1.64k
    }
2714
2715
407
    return modules.at(moduleID);
2716
2.05k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.41k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.41k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.41k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.41k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.41k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.04k
        return nullptr;
2713
3.04k
    }
2714
2715
366
    return modules.at(moduleID);
2716
3.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.10k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.10k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.10k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.10k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.10k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.87k
        return nullptr;
2713
2.87k
    }
2714
2715
236
    return modules.at(moduleID);
2716
3.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.40k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.40k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.40k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.74k
        return nullptr;
2713
3.74k
    }
2714
2715
656
    return modules.at(moduleID);
2716
4.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
21.2k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
21.2k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
21.2k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
21.2k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
21.2k
    if ( modules.find(moduleID) == modules.end() ) {
2712
13.1k
        return nullptr;
2713
13.1k
    }
2714
2715
8.04k
    return modules.at(moduleID);
2716
21.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.58k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.58k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.58k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.31k
        return nullptr;
2713
2.31k
    }
2714
2715
266
    return modules.at(moduleID);
2716
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.66k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.66k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.66k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.84k
        return nullptr;
2713
3.84k
    }
2714
2715
818
    return modules.at(moduleID);
2716
4.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.11k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.11k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.11k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.11k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.11k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.87k
        return nullptr;
2713
1.87k
    }
2714
2715
238
    return modules.at(moduleID);
2716
2.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.14k
        return nullptr;
2713
2.14k
    }
2714
2715
231
    return modules.at(moduleID);
2716
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.22k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.95k
        return nullptr;
2713
2.95k
    }
2714
2715
272
    return modules.at(moduleID);
2716
3.22k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.49k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.49k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.49k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.49k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.49k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.29k
        return nullptr;
2713
2.29k
    }
2714
2715
196
    return modules.at(moduleID);
2716
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.74k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.74k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.74k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.48k
        return nullptr;
2713
3.48k
    }
2714
2715
268
    return modules.at(moduleID);
2716
3.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.25k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.25k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.25k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.25k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.25k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.97k
        return nullptr;
2713
1.97k
    }
2714
2715
277
    return modules.at(moduleID);
2716
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.58k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.58k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.58k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.25k
        return nullptr;
2713
2.25k
    }
2714
2715
325
    return modules.at(moduleID);
2716
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.93k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.93k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.93k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.93k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.93k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.62k
        return nullptr;
2713
2.62k
    }
2714
2715
311
    return modules.at(moduleID);
2716
2.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.88k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.88k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.88k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.88k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.88k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.62k
        return nullptr;
2713
2.62k
    }
2714
2715
262
    return modules.at(moduleID);
2716
2.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.73k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.73k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.73k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.47k
        return nullptr;
2713
2.47k
    }
2714
2715
254
    return modules.at(moduleID);
2716
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.53k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.29k
        return nullptr;
2713
2.29k
    }
2714
2715
232
    return modules.at(moduleID);
2716
2.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.12k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.12k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.12k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.12k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.12k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.90k
        return nullptr;
2713
2.90k
    }
2714
2715
219
    return modules.at(moduleID);
2716
3.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.80k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.80k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.80k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.54k
        return nullptr;
2713
2.54k
    }
2714
2715
253
    return modules.at(moduleID);
2716
2.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.92k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.64k
        return nullptr;
2713
2.64k
    }
2714
2715
273
    return modules.at(moduleID);
2716
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.57k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.57k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.57k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.34k
        return nullptr;
2713
2.34k
    }
2714
2715
233
    return modules.at(moduleID);
2716
2.57k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.60k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.60k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.60k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.34k
        return nullptr;
2713
2.34k
    }
2714
2715
264
    return modules.at(moduleID);
2716
2.60k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.84k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.84k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.84k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.56k
        return nullptr;
2713
2.56k
    }
2714
2715
278
    return modules.at(moduleID);
2716
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.17k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.17k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.17k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.94k
        return nullptr;
2713
2.94k
    }
2714
2715
234
    return modules.at(moduleID);
2716
3.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.95k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.95k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.95k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.95k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.95k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.68k
        return nullptr;
2713
2.68k
    }
2714
2715
267
    return modules.at(moduleID);
2716
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.79k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.79k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.79k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.56k
        return nullptr;
2713
2.56k
    }
2714
2715
225
    return modules.at(moduleID);
2716
2.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.57k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.57k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.57k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.34k
        return nullptr;
2713
2.34k
    }
2714
2715
236
    return modules.at(moduleID);
2716
2.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.75k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.75k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.75k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.75k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.75k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.48k
        return nullptr;
2713
2.48k
    }
2714
2715
275
    return modules.at(moduleID);
2716
2.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.06k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.06k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.06k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.77k
        return nullptr;
2713
2.77k
    }
2714
2715
290
    return modules.at(moduleID);
2716
3.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.55k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.55k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.55k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.55k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.55k
    if ( modules.find(moduleID) == modules.end() ) {
2712
4.28k
        return nullptr;
2713
4.28k
    }
2714
2715
265
    return modules.at(moduleID);
2716
4.55k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.69k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.69k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.69k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.38k
        return nullptr;
2713
3.38k
    }
2714
2715
305
    return modules.at(moduleID);
2716
3.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.12k
        return nullptr;
2713
2.12k
    }
2714
2715
250
    return modules.at(moduleID);
2716
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.00k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.00k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.00k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.64k
        return nullptr;
2713
2.64k
    }
2714
2715
353
    return modules.at(moduleID);
2716
3.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.92k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.68k
        return nullptr;
2713
2.68k
    }
2714
2715
239
    return modules.at(moduleID);
2716
2.92k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.69k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.69k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.69k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.40k
        return nullptr;
2713
2.40k
    }
2714
2715
290
    return modules.at(moduleID);
2716
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.62k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.62k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.62k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.33k
        return nullptr;
2713
2.33k
    }
2714
2715
284
    return modules.at(moduleID);
2716
2.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.38k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.38k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.38k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.38k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.38k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.07k
        return nullptr;
2713
3.07k
    }
2714
2715
315
    return modules.at(moduleID);
2716
3.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.67k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.67k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.67k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.43k
        return nullptr;
2713
2.43k
    }
2714
2715
248
    return modules.at(moduleID);
2716
2.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.92k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.59k
        return nullptr;
2713
3.59k
    }
2714
2715
327
    return modules.at(moduleID);
2716
3.92k
}
2717
2718
template <class ResultType, class OperationType>
2719
40.9k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
40.9k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
40.9k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
365k
    do {
2725
365k
        auto op = getOp(&parentDs, data, size);
2726
365k
        auto module = getModule(parentDs);
2727
365k
        if ( module == nullptr ) {
2728
274k
            continue;
2729
274k
        }
2730
2731
91.2k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
91.2k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1.82k
            break;
2736
1.82k
        }
2737
363k
    } while ( parentDs.Get<bool>() == true );
2738
2739
40.9k
    if ( operations.empty() == true ) {
2740
2.45k
        return;
2741
2.45k
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
38.4k
#if 1
2745
38.4k
    {
2746
38.4k
        std::set<uint64_t> moduleIDs;
2747
60.8k
        for (const auto& m : modules ) {
2748
60.8k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60.8k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60.8k
            moduleIDs.insert(moduleID);
2756
60.8k
        }
2757
2758
38.4k
        std::set<uint64_t> operationModuleIDs;
2759
79.1k
        for (const auto& op : operations) {
2760
79.1k
            operationModuleIDs.insert(op.first->ID);
2761
79.1k
        }
2762
2763
38.4k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
38.4k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
38.4k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
38.4k
        for (const auto& id : addModuleIDs) {
2768
27.8k
            operations.push_back({ modules.at(id), operations[0].second});
2769
27.8k
        }
2770
38.4k
    }
2771
38.4k
#endif
2772
2773
38.4k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
38.4k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
145k
    for (size_t i = 0; i < operations.size(); i++) {
2781
107k
        auto& operation = operations[i];
2782
2783
107k
        auto& module = operation.first;
2784
107k
        auto& op = operation.second;
2785
2786
107k
        if ( i > 0 ) {
2787
76.6k
            auto& prevModule = operations[i-1].first;
2788
76.6k
            auto& prevOp = operations[i].second;
2789
2790
76.6k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43.5k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43.5k
                if ( curModifier.size() == 0 ) {
2793
14.5M
                    for (size_t j = 0; j < 512; j++) {
2794
14.5M
                        curModifier.push_back(1);
2795
14.5M
                    }
2796
28.3k
                } else {
2797
1.01M
                    for (auto& c : curModifier) {
2798
1.01M
                        c++;
2799
1.01M
                    }
2800
15.1k
                }
2801
43.5k
            }
2802
76.6k
        }
2803
2804
107k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
107k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
107k
        const auto& result = results.back();
2811
2812
107k
        if ( result.second != std::nullopt ) {
2813
32.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
32.3k
        }
2820
2821
107k
        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
107k
        if ( options.disableTests == false ) {
2830
107k
            tests::test(op, result.second);
2831
107k
        }
2832
2833
107k
        postprocess(module, op, result);
2834
107k
    }
2835
2836
38.4k
    if ( options.noCompare == false ) {
2837
30.4k
        compare(operations, results, data, size);
2838
30.4k
    }
2839
38.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.24k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.24k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.24k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
8.61k
    do {
2725
8.61k
        auto op = getOp(&parentDs, data, size);
2726
8.61k
        auto module = getModule(parentDs);
2727
8.61k
        if ( module == nullptr ) {
2728
4.58k
            continue;
2729
4.58k
        }
2730
2731
4.03k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.03k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
8.61k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.24k
    if ( operations.empty() == true ) {
2740
77
        return;
2741
77
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.16k
#if 1
2745
2.16k
    {
2746
2.16k
        std::set<uint64_t> moduleIDs;
2747
4.03k
        for (const auto& m : modules ) {
2748
4.03k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.03k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.03k
            moduleIDs.insert(moduleID);
2756
4.03k
        }
2757
2758
2.16k
        std::set<uint64_t> operationModuleIDs;
2759
3.82k
        for (const auto& op : operations) {
2760
3.82k
            operationModuleIDs.insert(op.first->ID);
2761
3.82k
        }
2762
2763
2.16k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.16k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.16k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.16k
        for (const auto& id : addModuleIDs) {
2768
1.95k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.95k
        }
2770
2.16k
    }
2771
2.16k
#endif
2772
2773
2.16k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.16k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.94k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.78k
        auto& operation = operations[i];
2782
2783
5.78k
        auto& module = operation.first;
2784
5.78k
        auto& op = operation.second;
2785
2786
5.78k
        if ( i > 0 ) {
2787
3.76k
            auto& prevModule = operations[i-1].first;
2788
3.76k
            auto& prevOp = operations[i].second;
2789
2790
3.76k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.68k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.68k
                if ( curModifier.size() == 0 ) {
2793
622k
                    for (size_t j = 0; j < 512; j++) {
2794
621k
                        curModifier.push_back(1);
2795
621k
                    }
2796
1.21k
                } else {
2797
6.30k
                    for (auto& c : curModifier) {
2798
6.30k
                        c++;
2799
6.30k
                    }
2800
475
                }
2801
1.68k
            }
2802
3.76k
        }
2803
2804
5.78k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.78k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.78k
        const auto& result = results.back();
2811
2812
5.78k
        if ( result.second != std::nullopt ) {
2813
3.07k
            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.07k
        }
2820
2821
5.78k
        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.78k
        if ( options.disableTests == false ) {
2830
5.78k
            tests::test(op, result.second);
2831
5.78k
        }
2832
2833
5.78k
        postprocess(module, op, result);
2834
5.78k
    }
2835
2836
2.16k
    if ( options.noCompare == false ) {
2837
2.01k
        compare(operations, results, data, size);
2838
2.01k
    }
2839
2.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
936
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
936
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
936
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.85k
    do {
2725
5.85k
        auto op = getOp(&parentDs, data, size);
2726
5.85k
        auto module = getModule(parentDs);
2727
5.85k
        if ( module == nullptr ) {
2728
3.62k
            continue;
2729
3.62k
        }
2730
2731
2.22k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.22k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
5.84k
    } while ( parentDs.Get<bool>() == true );
2738
2739
936
    if ( operations.empty() == true ) {
2740
26
        return;
2741
26
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
910
#if 1
2745
910
    {
2746
910
        std::set<uint64_t> moduleIDs;
2747
1.62k
        for (const auto& m : modules ) {
2748
1.62k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.62k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.62k
            moduleIDs.insert(moduleID);
2756
1.62k
        }
2757
2758
910
        std::set<uint64_t> operationModuleIDs;
2759
2.05k
        for (const auto& op : operations) {
2760
2.05k
            operationModuleIDs.insert(op.first->ID);
2761
2.05k
        }
2762
2763
910
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
910
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
910
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
910
        for (const auto& id : addModuleIDs) {
2768
748
            operations.push_back({ modules.at(id), operations[0].second});
2769
748
        }
2770
910
    }
2771
910
#endif
2772
2773
910
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
910
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.71k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.80k
        auto& operation = operations[i];
2782
2783
2.80k
        auto& module = operation.first;
2784
2.80k
        auto& op = operation.second;
2785
2786
2.80k
        if ( i > 0 ) {
2787
1.99k
            auto& prevModule = operations[i-1].first;
2788
1.99k
            auto& prevOp = operations[i].second;
2789
2790
1.99k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.09k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.09k
                if ( curModifier.size() == 0 ) {
2793
334k
                    for (size_t j = 0; j < 512; j++) {
2794
333k
                        curModifier.push_back(1);
2795
333k
                    }
2796
652
                } else {
2797
30.1k
                    for (auto& c : curModifier) {
2798
30.1k
                        c++;
2799
30.1k
                    }
2800
439
                }
2801
1.09k
            }
2802
1.99k
        }
2803
2804
2.80k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.80k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.80k
        const auto& result = results.back();
2811
2812
2.80k
        if ( result.second != std::nullopt ) {
2813
1.47k
            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.47k
        }
2820
2821
2.80k
        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.80k
        if ( options.disableTests == false ) {
2830
2.80k
            tests::test(op, result.second);
2831
2.80k
        }
2832
2833
2.80k
        postprocess(module, op, result);
2834
2.80k
    }
2835
2836
910
    if ( options.noCompare == false ) {
2837
813
        compare(operations, results, data, size);
2838
813
    }
2839
910
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
906
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
906
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
906
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
8.31k
    do {
2725
8.31k
        auto op = getOp(&parentDs, data, size);
2726
8.31k
        auto module = getModule(parentDs);
2727
8.31k
        if ( module == nullptr ) {
2728
4.24k
            continue;
2729
4.24k
        }
2730
2731
4.07k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.07k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
8.30k
    } while ( parentDs.Get<bool>() == true );
2738
2739
906
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
890
#if 1
2745
890
    {
2746
890
        std::set<uint64_t> moduleIDs;
2747
1.62k
        for (const auto& m : modules ) {
2748
1.62k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.62k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.62k
            moduleIDs.insert(moduleID);
2756
1.62k
        }
2757
2758
890
        std::set<uint64_t> operationModuleIDs;
2759
3.86k
        for (const auto& op : operations) {
2760
3.86k
            operationModuleIDs.insert(op.first->ID);
2761
3.86k
        }
2762
2763
890
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
890
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
890
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
890
        for (const auto& id : addModuleIDs) {
2768
772
            operations.push_back({ modules.at(id), operations[0].second});
2769
772
        }
2770
890
    }
2771
890
#endif
2772
2773
890
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
890
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5.52k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.63k
        auto& operation = operations[i];
2782
2783
4.63k
        auto& module = operation.first;
2784
4.63k
        auto& op = operation.second;
2785
2786
4.63k
        if ( i > 0 ) {
2787
3.82k
            auto& prevModule = operations[i-1].first;
2788
3.82k
            auto& prevOp = operations[i].second;
2789
2790
3.82k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.96k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.96k
                if ( curModifier.size() == 0 ) {
2793
1.24M
                    for (size_t j = 0; j < 512; j++) {
2794
1.24M
                        curModifier.push_back(1);
2795
1.24M
                    }
2796
2.42k
                } else {
2797
2.63k
                    for (auto& c : curModifier) {
2798
2.63k
                        c++;
2799
2.63k
                    }
2800
532
                }
2801
2.96k
            }
2802
3.82k
        }
2803
2804
4.63k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.63k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.63k
        const auto& result = results.back();
2811
2812
4.63k
        if ( result.second != std::nullopt ) {
2813
2.25k
            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.25k
        }
2820
2821
4.63k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.63k
        if ( options.disableTests == false ) {
2830
4.63k
            tests::test(op, result.second);
2831
4.63k
        }
2832
2833
4.63k
        postprocess(module, op, result);
2834
4.63k
    }
2835
2836
890
    if ( options.noCompare == false ) {
2837
814
        compare(operations, results, data, size);
2838
814
    }
2839
890
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
895
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
895
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
895
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.85k
    do {
2725
7.85k
        auto op = getOp(&parentDs, data, size);
2726
7.85k
        auto module = getModule(parentDs);
2727
7.85k
        if ( module == nullptr ) {
2728
5.04k
            continue;
2729
5.04k
        }
2730
2731
2.81k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.81k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
7.85k
    } while ( parentDs.Get<bool>() == true );
2738
2739
895
    if ( operations.empty() == true ) {
2740
29
        return;
2741
29
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
866
#if 1
2745
866
    {
2746
866
        std::set<uint64_t> moduleIDs;
2747
1.52k
        for (const auto& m : modules ) {
2748
1.52k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.52k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.52k
            moduleIDs.insert(moduleID);
2756
1.52k
        }
2757
2758
866
        std::set<uint64_t> operationModuleIDs;
2759
2.64k
        for (const auto& op : operations) {
2760
2.64k
            operationModuleIDs.insert(op.first->ID);
2761
2.64k
        }
2762
2763
866
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
866
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
866
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
866
        for (const auto& id : addModuleIDs) {
2768
691
            operations.push_back({ modules.at(id), operations[0].second});
2769
691
        }
2770
866
    }
2771
866
#endif
2772
2773
866
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
866
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.20k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.33k
        auto& operation = operations[i];
2782
2783
3.33k
        auto& module = operation.first;
2784
3.33k
        auto& op = operation.second;
2785
2786
3.33k
        if ( i > 0 ) {
2787
2.57k
            auto& prevModule = operations[i-1].first;
2788
2.57k
            auto& prevOp = operations[i].second;
2789
2790
2.57k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.69k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.69k
                if ( curModifier.size() == 0 ) {
2793
620k
                    for (size_t j = 0; j < 512; j++) {
2794
619k
                        curModifier.push_back(1);
2795
619k
                    }
2796
1.21k
                } else {
2797
18.2k
                    for (auto& c : curModifier) {
2798
18.2k
                        c++;
2799
18.2k
                    }
2800
484
                }
2801
1.69k
            }
2802
2.57k
        }
2803
2804
3.33k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.33k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.33k
        const auto& result = results.back();
2811
2812
3.33k
        if ( result.second != std::nullopt ) {
2813
1.67k
            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.67k
        }
2820
2821
3.33k
        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.33k
        if ( options.disableTests == false ) {
2830
3.33k
            tests::test(op, result.second);
2831
3.33k
        }
2832
2833
3.33k
        postprocess(module, op, result);
2834
3.33k
    }
2835
2836
866
    if ( options.noCompare == false ) {
2837
764
        compare(operations, results, data, size);
2838
764
    }
2839
866
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.00k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.00k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.00k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
25.0k
    do {
2725
25.0k
        auto op = getOp(&parentDs, data, size);
2726
25.0k
        auto module = getModule(parentDs);
2727
25.0k
        if ( module == nullptr ) {
2728
12.0k
            continue;
2729
12.0k
        }
2730
2731
13.0k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
13.0k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
25
            break;
2736
25
        }
2737
25.0k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.00k
    if ( operations.empty() == true ) {
2740
39
        return;
2741
39
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.96k
#if 1
2745
3.96k
    {
2746
3.96k
        std::set<uint64_t> moduleIDs;
2747
7.69k
        for (const auto& m : modules ) {
2748
7.69k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7.69k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7.69k
            moduleIDs.insert(moduleID);
2756
7.69k
        }
2757
2758
3.96k
        std::set<uint64_t> operationModuleIDs;
2759
12.7k
        for (const auto& op : operations) {
2760
12.7k
            operationModuleIDs.insert(op.first->ID);
2761
12.7k
        }
2762
2763
3.96k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.96k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.96k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.96k
        for (const auto& id : addModuleIDs) {
2768
3.61k
            operations.push_back({ modules.at(id), operations[0].second});
2769
3.61k
        }
2770
3.96k
    }
2771
3.96k
#endif
2772
2773
3.96k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.96k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
20.3k
    for (size_t i = 0; i < operations.size(); i++) {
2781
16.3k
        auto& operation = operations[i];
2782
2783
16.3k
        auto& module = operation.first;
2784
16.3k
        auto& op = operation.second;
2785
2786
16.3k
        if ( i > 0 ) {
2787
12.5k
            auto& prevModule = operations[i-1].first;
2788
12.5k
            auto& prevOp = operations[i].second;
2789
2790
12.5k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
8.32k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
8.32k
                if ( curModifier.size() == 0 ) {
2793
3.04M
                    for (size_t j = 0; j < 512; j++) {
2794
3.03M
                        curModifier.push_back(1);
2795
3.03M
                    }
2796
5.93k
                } else {
2797
45.7k
                    for (auto& c : curModifier) {
2798
45.7k
                        c++;
2799
45.7k
                    }
2800
2.39k
                }
2801
8.32k
            }
2802
12.5k
        }
2803
2804
16.3k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
16.3k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
16.3k
        const auto& result = results.back();
2811
2812
16.3k
        if ( result.second != std::nullopt ) {
2813
4.83k
            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.83k
        }
2820
2821
16.3k
        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
16.3k
        if ( options.disableTests == false ) {
2830
16.3k
            tests::test(op, result.second);
2831
16.3k
        }
2832
2833
16.3k
        postprocess(module, op, result);
2834
16.3k
    }
2835
2836
3.96k
    if ( options.noCompare == false ) {
2837
3.84k
        compare(operations, results, data, size);
2838
3.84k
    }
2839
3.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.14k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.14k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.14k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
17.8k
    do {
2725
17.8k
        auto op = getOp(&parentDs, data, size);
2726
17.8k
        auto module = getModule(parentDs);
2727
17.8k
        if ( module == nullptr ) {
2728
8.36k
            continue;
2729
8.36k
        }
2730
2731
9.44k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9.44k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
17.8k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.14k
    if ( operations.empty() == true ) {
2740
64
        return;
2741
64
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.08k
#if 1
2745
3.08k
    {
2746
3.08k
        std::set<uint64_t> moduleIDs;
2747
5.94k
        for (const auto& m : modules ) {
2748
5.94k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5.94k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5.94k
            moduleIDs.insert(moduleID);
2756
5.94k
        }
2757
2758
3.08k
        std::set<uint64_t> operationModuleIDs;
2759
9.17k
        for (const auto& op : operations) {
2760
9.17k
            operationModuleIDs.insert(op.first->ID);
2761
9.17k
        }
2762
2763
3.08k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.08k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.08k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.08k
        for (const auto& id : addModuleIDs) {
2768
2.76k
            operations.push_back({ modules.at(id), operations[0].second});
2769
2.76k
        }
2770
3.08k
    }
2771
3.08k
#endif
2772
2773
3.08k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.08k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
15.0k
    for (size_t i = 0; i < operations.size(); i++) {
2781
11.9k
        auto& operation = operations[i];
2782
2783
11.9k
        auto& module = operation.first;
2784
11.9k
        auto& op = operation.second;
2785
2786
11.9k
        if ( i > 0 ) {
2787
8.96k
            auto& prevModule = operations[i-1].first;
2788
8.96k
            auto& prevOp = operations[i].second;
2789
2790
8.96k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
5.71k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5.71k
                if ( curModifier.size() == 0 ) {
2793
2.00M
                    for (size_t j = 0; j < 512; j++) {
2794
1.99M
                        curModifier.push_back(1);
2795
1.99M
                    }
2796
3.90k
                } else {
2797
14.0k
                    for (auto& c : curModifier) {
2798
14.0k
                        c++;
2799
14.0k
                    }
2800
1.81k
                }
2801
5.71k
            }
2802
8.96k
        }
2803
2804
11.9k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
11.9k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
11.9k
        const auto& result = results.back();
2811
2812
11.9k
        if ( result.second != std::nullopt ) {
2813
887
            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
887
        }
2820
2821
11.9k
        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
11.9k
        if ( options.disableTests == false ) {
2830
11.9k
            tests::test(op, result.second);
2831
11.9k
        }
2832
2833
11.9k
        postprocess(module, op, result);
2834
11.9k
    }
2835
2836
3.08k
    if ( options.noCompare == false ) {
2837
2.97k
        compare(operations, results, data, size);
2838
2.97k
    }
2839
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
334
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
334
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
334
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.62k
    do {
2725
4.62k
        auto op = getOp(&parentDs, data, size);
2726
4.62k
        auto module = getModule(parentDs);
2727
4.62k
        if ( module == nullptr ) {
2728
3.38k
            continue;
2729
3.38k
        }
2730
2731
1.23k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.23k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
4.62k
    } while ( parentDs.Get<bool>() == true );
2738
2739
334
    if ( operations.empty() == true ) {
2740
36
        return;
2741
36
    }
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
424
        for (const auto& m : modules ) {
2748
424
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
424
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
424
            moduleIDs.insert(moduleID);
2756
424
        }
2757
2758
298
        std::set<uint64_t> operationModuleIDs;
2759
1.06k
        for (const auto& op : operations) {
2760
1.06k
            operationModuleIDs.insert(op.first->ID);
2761
1.06k
        }
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
168
            operations.push_back({ modules.at(id), operations[0].second});
2769
168
        }
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.52k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.23k
        auto& operation = operations[i];
2782
2783
1.23k
        auto& module = operation.first;
2784
1.23k
        auto& op = operation.second;
2785
2786
1.23k
        if ( i > 0 ) {
2787
1.01k
            auto& prevModule = operations[i-1].first;
2788
1.01k
            auto& prevOp = operations[i].second;
2789
2790
1.01k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
733
                auto& curModifier = op.modifier.GetVectorPtr();
2792
733
                if ( curModifier.size() == 0 ) {
2793
278k
                    for (size_t j = 0; j < 512; j++) {
2794
277k
                        curModifier.push_back(1);
2795
277k
                    }
2796
542
                } else {
2797
867
                    for (auto& c : curModifier) {
2798
867
                        c++;
2799
867
                    }
2800
191
                }
2801
733
            }
2802
1.01k
        }
2803
2804
1.23k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.23k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.23k
        const auto& result = results.back();
2811
2812
1.23k
        if ( result.second != std::nullopt ) {
2813
341
            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
341
        }
2820
2821
1.23k
        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.23k
        if ( options.disableTests == false ) {
2830
1.23k
            tests::test(op, result.second);
2831
1.23k
        }
2832
2833
1.23k
        postprocess(module, op, result);
2834
1.23k
    }
2835
2836
298
    if ( options.noCompare == false ) {
2837
212
        compare(operations, results, data, size);
2838
212
    }
2839
298
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.17k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.17k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.17k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
10.6k
    do {
2725
10.6k
        auto op = getOp(&parentDs, data, size);
2726
10.6k
        auto module = getModule(parentDs);
2727
10.6k
        if ( module == nullptr ) {
2728
5.40k
            continue;
2729
5.40k
        }
2730
2731
5.25k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.25k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
10.6k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.17k
    if ( operations.empty() == true ) {
2740
85
        return;
2741
85
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.08k
#if 1
2745
2.08k
    {
2746
2.08k
        std::set<uint64_t> moduleIDs;
2747
3.92k
        for (const auto& m : modules ) {
2748
3.92k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.92k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.92k
            moduleIDs.insert(moduleID);
2756
3.92k
        }
2757
2758
2.08k
        std::set<uint64_t> operationModuleIDs;
2759
4.94k
        for (const auto& op : operations) {
2760
4.94k
            operationModuleIDs.insert(op.first->ID);
2761
4.94k
        }
2762
2763
2.08k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.08k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.08k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.08k
        for (const auto& id : addModuleIDs) {
2768
1.86k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.86k
        }
2770
2.08k
    }
2771
2.08k
#endif
2772
2773
2.08k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.08k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8.89k
    for (size_t i = 0; i < operations.size(); i++) {
2781
6.81k
        auto& operation = operations[i];
2782
2783
6.81k
        auto& module = operation.first;
2784
6.81k
        auto& op = operation.second;
2785
2786
6.81k
        if ( i > 0 ) {
2787
4.84k
            auto& prevModule = operations[i-1].first;
2788
4.84k
            auto& prevOp = operations[i].second;
2789
2790
4.84k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.79k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.79k
                if ( curModifier.size() == 0 ) {
2793
1.06M
                    for (size_t j = 0; j < 512; j++) {
2794
1.06M
                        curModifier.push_back(1);
2795
1.06M
                    }
2796
2.08k
                } else {
2797
5.03k
                    for (auto& c : curModifier) {
2798
5.03k
                        c++;
2799
5.03k
                    }
2800
709
                }
2801
2.79k
            }
2802
4.84k
        }
2803
2804
6.81k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6.81k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6.81k
        const auto& result = results.back();
2811
2812
6.81k
        if ( result.second != std::nullopt ) {
2813
3.56k
            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.56k
        }
2820
2821
6.81k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
6.81k
        if ( options.disableTests == false ) {
2830
6.81k
            tests::test(op, result.second);
2831
6.81k
        }
2832
2833
6.81k
        postprocess(module, op, result);
2834
6.81k
    }
2835
2836
2.08k
    if ( options.noCompare == false ) {
2837
1.96k
        compare(operations, results, data, size);
2838
1.96k
    }
2839
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
255
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
255
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
255
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.56k
    do {
2725
3.56k
        auto op = getOp(&parentDs, data, size);
2726
3.56k
        auto module = getModule(parentDs);
2727
3.56k
        if ( module == nullptr ) {
2728
2.68k
            continue;
2729
2.68k
        }
2730
2731
882
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
882
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
3.56k
    } while ( parentDs.Get<bool>() == true );
2738
2739
255
    if ( operations.empty() == true ) {
2740
38
        return;
2741
38
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
217
#if 1
2745
217
    {
2746
217
        std::set<uint64_t> moduleIDs;
2747
264
        for (const auto& m : modules ) {
2748
264
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
264
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
264
            moduleIDs.insert(moduleID);
2756
264
        }
2757
2758
217
        std::set<uint64_t> operationModuleIDs;
2759
680
        for (const auto& op : operations) {
2760
680
            operationModuleIDs.insert(op.first->ID);
2761
680
        }
2762
2763
217
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
217
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
217
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
217
        for (const auto& id : addModuleIDs) {
2768
100
            operations.push_back({ modules.at(id), operations[0].second});
2769
100
        }
2770
217
    }
2771
217
#endif
2772
2773
217
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
217
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
997
    for (size_t i = 0; i < operations.size(); i++) {
2781
780
        auto& operation = operations[i];
2782
2783
780
        auto& module = operation.first;
2784
780
        auto& op = operation.second;
2785
2786
780
        if ( i > 0 ) {
2787
648
            auto& prevModule = operations[i-1].first;
2788
648
            auto& prevOp = operations[i].second;
2789
2790
648
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
420
                auto& curModifier = op.modifier.GetVectorPtr();
2792
420
                if ( curModifier.size() == 0 ) {
2793
76.9k
                    for (size_t j = 0; j < 512; j++) {
2794
76.8k
                        curModifier.push_back(1);
2795
76.8k
                    }
2796
270
                } else {
2797
1.74k
                    for (auto& c : curModifier) {
2798
1.74k
                        c++;
2799
1.74k
                    }
2800
270
                }
2801
420
            }
2802
648
        }
2803
2804
780
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
780
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
780
        const auto& result = results.back();
2811
2812
780
        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
780
        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
780
        if ( options.disableTests == false ) {
2830
780
            tests::test(op, result.second);
2831
780
        }
2832
2833
780
        postprocess(module, op, result);
2834
780
    }
2835
2836
217
    if ( options.noCompare == false ) {
2837
132
        compare(operations, results, data, size);
2838
132
    }
2839
217
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
191
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
191
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
191
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.48k
    do {
2725
3.48k
        auto op = getOp(&parentDs, data, size);
2726
3.48k
        auto module = getModule(parentDs);
2727
3.48k
        if ( module == nullptr ) {
2728
2.74k
            continue;
2729
2.74k
        }
2730
2731
741
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
741
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
3.47k
    } while ( parentDs.Get<bool>() == true );
2738
2739
191
    if ( operations.empty() == true ) {
2740
35
        return;
2741
35
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
156
#if 1
2745
156
    {
2746
156
        std::set<uint64_t> moduleIDs;
2747
156
        for (const auto& m : modules ) {
2748
150
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
150
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
150
            moduleIDs.insert(moduleID);
2756
150
        }
2757
2758
156
        std::set<uint64_t> operationModuleIDs;
2759
510
        for (const auto& op : operations) {
2760
510
            operationModuleIDs.insert(op.first->ID);
2761
510
        }
2762
2763
156
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
156
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
156
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
156
        for (const auto& id : addModuleIDs) {
2768
43
            operations.push_back({ modules.at(id), operations[0].second});
2769
43
        }
2770
156
    }
2771
156
#endif
2772
2773
156
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
156
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
709
    for (size_t i = 0; i < operations.size(); i++) {
2781
553
        auto& operation = operations[i];
2782
2783
553
        auto& module = operation.first;
2784
553
        auto& op = operation.second;
2785
2786
553
        if ( i > 0 ) {
2787
478
            auto& prevModule = operations[i-1].first;
2788
478
            auto& prevOp = operations[i].second;
2789
2790
478
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
349
                auto& curModifier = op.modifier.GetVectorPtr();
2792
349
                if ( curModifier.size() == 0 ) {
2793
85.6k
                    for (size_t j = 0; j < 512; j++) {
2794
85.5k
                        curModifier.push_back(1);
2795
85.5k
                    }
2796
182
                } else {
2797
2.15k
                    for (auto& c : curModifier) {
2798
2.15k
                        c++;
2799
2.15k
                    }
2800
182
                }
2801
349
            }
2802
478
        }
2803
2804
553
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
553
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
553
        const auto& result = results.back();
2811
2812
553
        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
553
        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
553
        if ( options.disableTests == false ) {
2830
553
            tests::test(op, result.second);
2831
553
        }
2832
2833
553
        postprocess(module, op, result);
2834
553
    }
2835
2836
156
    if ( options.noCompare == false ) {
2837
75
        compare(operations, results, data, size);
2838
75
    }
2839
156
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
226
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
226
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
226
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.02k
    do {
2725
4.02k
        auto op = getOp(&parentDs, data, size);
2726
4.02k
        auto module = getModule(parentDs);
2727
4.02k
        if ( module == nullptr ) {
2728
3.16k
            continue;
2729
3.16k
        }
2730
2731
863
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
863
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
4.02k
    } while ( parentDs.Get<bool>() == true );
2738
2739
226
    if ( operations.empty() == true ) {
2740
43
        return;
2741
43
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
183
#if 1
2745
183
    {
2746
183
        std::set<uint64_t> moduleIDs;
2747
183
        for (const auto& m : modules ) {
2748
164
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
164
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
164
            moduleIDs.insert(moduleID);
2756
164
        }
2757
2758
183
        std::set<uint64_t> operationModuleIDs;
2759
602
        for (const auto& op : operations) {
2760
602
            operationModuleIDs.insert(op.first->ID);
2761
602
        }
2762
2763
183
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
183
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
183
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
183
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
183
    }
2771
183
#endif
2772
2773
183
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
183
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
830
    for (size_t i = 0; i < operations.size(); i++) {
2781
647
        auto& operation = operations[i];
2782
2783
647
        auto& module = operation.first;
2784
647
        auto& op = operation.second;
2785
2786
647
        if ( i > 0 ) {
2787
565
            auto& prevModule = operations[i-1].first;
2788
565
            auto& prevOp = operations[i].second;
2789
2790
565
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
419
                auto& curModifier = op.modifier.GetVectorPtr();
2792
419
                if ( curModifier.size() == 0 ) {
2793
104k
                    for (size_t j = 0; j < 512; j++) {
2794
104k
                        curModifier.push_back(1);
2795
104k
                    }
2796
215
                } else {
2797
26.2k
                    for (auto& c : curModifier) {
2798
26.2k
                        c++;
2799
26.2k
                    }
2800
215
                }
2801
419
            }
2802
565
        }
2803
2804
647
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
647
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
647
        const auto& result = results.back();
2811
2812
647
        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
647
        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
647
        if ( options.disableTests == false ) {
2830
647
            tests::test(op, result.second);
2831
647
        }
2832
2833
647
        postprocess(module, op, result);
2834
647
    }
2835
2836
183
    if ( options.noCompare == false ) {
2837
82
        compare(operations, results, data, size);
2838
82
    }
2839
183
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.02k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.02k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.02k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.66k
    do {
2725
5.66k
        auto op = getOp(&parentDs, data, size);
2726
5.66k
        auto module = getModule(parentDs);
2727
5.66k
        if ( module == nullptr ) {
2728
3.34k
            continue;
2729
3.34k
        }
2730
2731
2.31k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.31k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
5.65k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.02k
    if ( operations.empty() == true ) {
2740
54
        return;
2741
54
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
973
#if 1
2745
973
    {
2746
973
        std::set<uint64_t> moduleIDs;
2747
1.75k
        for (const auto& m : modules ) {
2748
1.75k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.75k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.75k
            moduleIDs.insert(moduleID);
2756
1.75k
        }
2757
2758
973
        std::set<uint64_t> operationModuleIDs;
2759
2.03k
        for (const auto& op : operations) {
2760
2.03k
            operationModuleIDs.insert(op.first->ID);
2761
2.03k
        }
2762
2763
973
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
973
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
973
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
973
        for (const auto& id : addModuleIDs) {
2768
828
            operations.push_back({ modules.at(id), operations[0].second});
2769
828
        }
2770
973
    }
2771
973
#endif
2772
2773
973
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
973
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.83k
    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.98k
            auto& prevModule = operations[i-1].first;
2788
1.98k
            auto& prevOp = operations[i].second;
2789
2790
1.98k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.06k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.06k
                if ( curModifier.size() == 0 ) {
2793
378k
                    for (size_t j = 0; j < 512; j++) {
2794
377k
                        curModifier.push_back(1);
2795
377k
                    }
2796
737
                } else {
2797
39.7k
                    for (auto& c : curModifier) {
2798
39.7k
                        c++;
2799
39.7k
                    }
2800
323
                }
2801
1.06k
            }
2802
1.98k
        }
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
1.23k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.23k
        }
2820
2821
2.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
973
    if ( options.noCompare == false ) {
2837
879
        compare(operations, results, data, size);
2838
879
    }
2839
973
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
583
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
583
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
583
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.95k
    do {
2725
3.95k
        auto op = getOp(&parentDs, data, size);
2726
3.95k
        auto module = getModule(parentDs);
2727
3.95k
        if ( module == nullptr ) {
2728
3.14k
            continue;
2729
3.14k
        }
2730
2731
805
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
805
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
85
            break;
2736
85
        }
2737
3.86k
    } while ( parentDs.Get<bool>() == true );
2738
2739
583
    if ( operations.empty() == true ) {
2740
52
        return;
2741
52
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
531
#if 1
2745
531
    {
2746
531
        std::set<uint64_t> moduleIDs;
2747
878
        for (const auto& m : modules ) {
2748
878
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
878
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
878
            moduleIDs.insert(moduleID);
2756
878
        }
2757
2758
531
        std::set<uint64_t> operationModuleIDs;
2759
678
        for (const auto& op : operations) {
2760
678
            operationModuleIDs.insert(op.first->ID);
2761
678
        }
2762
2763
531
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
531
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
531
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
531
        for (const auto& id : addModuleIDs) {
2768
431
            operations.push_back({ modules.at(id), operations[0].second});
2769
431
        }
2770
531
    }
2771
531
#endif
2772
2773
531
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
531
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.64k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.10k
        auto& operation = operations[i];
2782
2783
1.10k
        auto& module = operation.first;
2784
1.10k
        auto& op = operation.second;
2785
2786
1.10k
        if ( i > 0 ) {
2787
670
            auto& prevModule = operations[i-1].first;
2788
670
            auto& prevOp = operations[i].second;
2789
2790
670
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
228
                auto& curModifier = op.modifier.GetVectorPtr();
2792
228
                if ( curModifier.size() == 0 ) {
2793
100k
                    for (size_t j = 0; j < 512; j++) {
2794
100k
                        curModifier.push_back(1);
2795
100k
                    }
2796
196
                } else {
2797
4.09k
                    for (auto& c : curModifier) {
2798
4.09k
                        c++;
2799
4.09k
                    }
2800
32
                }
2801
228
            }
2802
670
        }
2803
2804
1.10k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.10k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.10k
        const auto& result = results.back();
2811
2812
1.10k
        if ( result.second != std::nullopt ) {
2813
539
            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
539
        }
2820
2821
1.10k
        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.10k
        if ( options.disableTests == false ) {
2830
1.10k
            tests::test(op, result.second);
2831
1.10k
        }
2832
2833
1.10k
        postprocess(module, op, result);
2834
1.10k
    }
2835
2836
531
    if ( options.noCompare == false ) {
2837
439
        compare(operations, results, data, size);
2838
439
    }
2839
531
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
184
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
184
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
184
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.49k
    do {
2725
3.49k
        auto op = getOp(&parentDs, data, size);
2726
3.49k
        auto module = getModule(parentDs);
2727
3.49k
        if ( module == nullptr ) {
2728
2.78k
            continue;
2729
2.78k
        }
2730
2731
715
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
715
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
3.49k
    } while ( parentDs.Get<bool>() == true );
2738
2739
184
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
165
#if 1
2745
165
    {
2746
165
        std::set<uint64_t> moduleIDs;
2747
165
        for (const auto& m : modules ) {
2748
160
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
160
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
160
            moduleIDs.insert(moduleID);
2756
160
        }
2757
2758
165
        std::set<uint64_t> operationModuleIDs;
2759
506
        for (const auto& op : operations) {
2760
506
            operationModuleIDs.insert(op.first->ID);
2761
506
        }
2762
2763
165
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
165
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
165
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
165
        for (const auto& id : addModuleIDs) {
2768
41
            operations.push_back({ modules.at(id), operations[0].second});
2769
41
        }
2770
165
    }
2771
165
#endif
2772
2773
165
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
165
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
712
    for (size_t i = 0; i < operations.size(); i++) {
2781
547
        auto& operation = operations[i];
2782
2783
547
        auto& module = operation.first;
2784
547
        auto& op = operation.second;
2785
2786
547
        if ( i > 0 ) {
2787
467
            auto& prevModule = operations[i-1].first;
2788
467
            auto& prevOp = operations[i].second;
2789
2790
467
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
331
                auto& curModifier = op.modifier.GetVectorPtr();
2792
331
                if ( curModifier.size() == 0 ) {
2793
113k
                    for (size_t j = 0; j < 512; j++) {
2794
113k
                        curModifier.push_back(1);
2795
113k
                    }
2796
221
                } else {
2797
5.34k
                    for (auto& c : curModifier) {
2798
5.34k
                        c++;
2799
5.34k
                    }
2800
110
                }
2801
331
            }
2802
467
        }
2803
2804
547
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
547
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
547
        const auto& result = results.back();
2811
2812
547
        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
547
        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
547
        if ( options.disableTests == false ) {
2830
547
            tests::test(op, result.second);
2831
547
        }
2832
2833
547
        postprocess(module, op, result);
2834
547
    }
2835
2836
165
    if ( options.noCompare == false ) {
2837
80
        compare(operations, results, data, size);
2838
80
    }
2839
165
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
191
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
191
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
191
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.64k
    do {
2725
3.64k
        auto op = getOp(&parentDs, data, size);
2726
3.64k
        auto module = getModule(parentDs);
2727
3.64k
        if ( module == nullptr ) {
2728
3.02k
            continue;
2729
3.02k
        }
2730
2731
626
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
626
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
3.64k
    } while ( parentDs.Get<bool>() == true );
2738
2739
191
    if ( operations.empty() == true ) {
2740
33
        return;
2741
33
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
158
#if 1
2745
158
    {
2746
158
        std::set<uint64_t> moduleIDs;
2747
158
        for (const auto& m : modules ) {
2748
150
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
150
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
150
            moduleIDs.insert(moduleID);
2756
150
        }
2757
2758
158
        std::set<uint64_t> operationModuleIDs;
2759
462
        for (const auto& op : operations) {
2760
462
            operationModuleIDs.insert(op.first->ID);
2761
462
        }
2762
2763
158
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
158
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
158
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
158
        for (const auto& id : addModuleIDs) {
2768
46
            operations.push_back({ modules.at(id), operations[0].second});
2769
46
        }
2770
158
    }
2771
158
#endif
2772
2773
158
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
158
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
666
    for (size_t i = 0; i < operations.size(); i++) {
2781
508
        auto& operation = operations[i];
2782
2783
508
        auto& module = operation.first;
2784
508
        auto& op = operation.second;
2785
2786
508
        if ( i > 0 ) {
2787
433
            auto& prevModule = operations[i-1].first;
2788
433
            auto& prevOp = operations[i].second;
2789
2790
433
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
314
                auto& curModifier = op.modifier.GetVectorPtr();
2792
314
                if ( curModifier.size() == 0 ) {
2793
95.4k
                    for (size_t j = 0; j < 512; j++) {
2794
95.2k
                        curModifier.push_back(1);
2795
95.2k
                    }
2796
186
                } else {
2797
1.00k
                    for (auto& c : curModifier) {
2798
1.00k
                        c++;
2799
1.00k
                    }
2800
128
                }
2801
314
            }
2802
433
        }
2803
2804
508
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
508
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
508
        const auto& result = results.back();
2811
2812
508
        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
508
        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
508
        if ( options.disableTests == false ) {
2830
508
            tests::test(op, result.second);
2831
508
        }
2832
2833
508
        postprocess(module, op, result);
2834
508
    }
2835
2836
158
    if ( options.noCompare == false ) {
2837
75
        compare(operations, results, data, size);
2838
75
    }
2839
158
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
226
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
226
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
226
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.38k
    do {
2725
3.38k
        auto op = getOp(&parentDs, data, size);
2726
3.38k
        auto module = getModule(parentDs);
2727
3.38k
        if ( module == nullptr ) {
2728
3.16k
            continue;
2729
3.16k
        }
2730
2731
222
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
222
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
31
            break;
2736
31
        }
2737
3.35k
    } while ( parentDs.Get<bool>() == true );
2738
2739
226
    if ( operations.empty() == true ) {
2740
36
        return;
2741
36
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
190
#if 1
2745
190
    {
2746
190
        std::set<uint64_t> moduleIDs;
2747
222
        for (const auto& m : modules ) {
2748
222
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
222
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
222
            moduleIDs.insert(moduleID);
2756
222
        }
2757
2758
190
        std::set<uint64_t> operationModuleIDs;
2759
190
        for (const auto& op : operations) {
2760
142
            operationModuleIDs.insert(op.first->ID);
2761
142
        }
2762
2763
190
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
190
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
190
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
190
        for (const auto& id : addModuleIDs) {
2768
106
            operations.push_back({ modules.at(id), operations[0].second});
2769
106
        }
2770
190
    }
2771
190
#endif
2772
2773
190
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
190
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
438
    for (size_t i = 0; i < operations.size(); i++) {
2781
248
        auto& operation = operations[i];
2782
2783
248
        auto& module = operation.first;
2784
248
        auto& op = operation.second;
2785
2786
248
        if ( i > 0 ) {
2787
137
            auto& prevModule = operations[i-1].first;
2788
137
            auto& prevOp = operations[i].second;
2789
2790
137
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
26
                auto& curModifier = op.modifier.GetVectorPtr();
2792
26
                if ( curModifier.size() == 0 ) {
2793
4.10k
                    for (size_t j = 0; j < 512; j++) {
2794
4.09k
                        curModifier.push_back(1);
2795
4.09k
                    }
2796
18
                } else {
2797
922
                    for (auto& c : curModifier) {
2798
922
                        c++;
2799
922
                    }
2800
18
                }
2801
26
            }
2802
137
        }
2803
2804
248
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
248
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
248
        const auto& result = results.back();
2811
2812
248
        if ( result.second != std::nullopt ) {
2813
61
            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
61
        }
2820
2821
248
        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
248
        if ( options.disableTests == false ) {
2830
248
            tests::test(op, result.second);
2831
248
        }
2832
2833
248
        postprocess(module, op, result);
2834
248
    }
2835
2836
190
    if ( options.noCompare == false ) {
2837
111
        compare(operations, results, data, size);
2838
111
    }
2839
190
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
607
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
607
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
607
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.67k
    do {
2725
5.67k
        auto op = getOp(&parentDs, data, size);
2726
5.67k
        auto module = getModule(parentDs);
2727
5.67k
        if ( module == nullptr ) {
2728
3.82k
            continue;
2729
3.82k
        }
2730
2731
1.85k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.85k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
5.67k
    } while ( parentDs.Get<bool>() == true );
2738
2739
607
    if ( operations.empty() == true ) {
2740
31
        return;
2741
31
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
576
#if 1
2745
576
    {
2746
576
        std::set<uint64_t> moduleIDs;
2747
960
        for (const auto& m : modules ) {
2748
960
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
960
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
960
            moduleIDs.insert(moduleID);
2756
960
        }
2757
2758
576
        std::set<uint64_t> operationModuleIDs;
2759
1.62k
        for (const auto& op : operations) {
2760
1.62k
            operationModuleIDs.insert(op.first->ID);
2761
1.62k
        }
2762
2763
576
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
576
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
576
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
576
        for (const auto& id : addModuleIDs) {
2768
435
            operations.push_back({ modules.at(id), operations[0].second});
2769
435
        }
2770
576
    }
2771
576
#endif
2772
2773
576
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
576
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.64k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.06k
        auto& operation = operations[i];
2782
2783
2.06k
        auto& module = operation.first;
2784
2.06k
        auto& op = operation.second;
2785
2786
2.06k
        if ( i > 0 ) {
2787
1.58k
            auto& prevModule = operations[i-1].first;
2788
1.58k
            auto& prevOp = operations[i].second;
2789
2790
1.58k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
979
                auto& curModifier = op.modifier.GetVectorPtr();
2792
979
                if ( curModifier.size() == 0 ) {
2793
283k
                    for (size_t j = 0; j < 512; j++) {
2794
282k
                        curModifier.push_back(1);
2795
282k
                    }
2796
552
                } else {
2797
8.98k
                    for (auto& c : curModifier) {
2798
8.98k
                        c++;
2799
8.98k
                    }
2800
427
                }
2801
979
            }
2802
1.58k
        }
2803
2804
2.06k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.06k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.06k
        const auto& result = results.back();
2811
2812
2.06k
        if ( result.second != std::nullopt ) {
2813
866
            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
866
        }
2820
2821
2.06k
        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.06k
        if ( options.disableTests == false ) {
2830
2.06k
            tests::test(op, result.second);
2831
2.06k
        }
2832
2833
2.06k
        postprocess(module, op, result);
2834
2.06k
    }
2835
2836
576
    if ( options.noCompare == false ) {
2837
480
        compare(operations, results, data, size);
2838
480
    }
2839
576
}
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
213
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
213
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
213
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.24k
    do {
2725
4.24k
        auto op = getOp(&parentDs, data, size);
2726
4.24k
        auto module = getModule(parentDs);
2727
4.24k
        if ( module == nullptr ) {
2728
3.30k
            continue;
2729
3.30k
        }
2730
2731
936
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
936
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
4.23k
    } while ( parentDs.Get<bool>() == true );
2738
2739
213
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
200
#if 1
2745
200
    {
2746
200
        std::set<uint64_t> moduleIDs;
2747
200
        for (const auto& m : modules ) {
2748
190
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
190
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
190
            moduleIDs.insert(moduleID);
2756
190
        }
2757
2758
200
        std::set<uint64_t> operationModuleIDs;
2759
607
        for (const auto& op : operations) {
2760
607
            operationModuleIDs.insert(op.first->ID);
2761
607
        }
2762
2763
200
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
200
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
200
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
200
        for (const auto& id : addModuleIDs) {
2768
66
            operations.push_back({ modules.at(id), operations[0].second});
2769
66
        }
2770
200
    }
2771
200
#endif
2772
2773
200
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
200
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
873
    for (size_t i = 0; i < operations.size(); i++) {
2781
673
        auto& operation = operations[i];
2782
2783
673
        auto& module = operation.first;
2784
673
        auto& op = operation.second;
2785
2786
673
        if ( i > 0 ) {
2787
578
            auto& prevModule = operations[i-1].first;
2788
578
            auto& prevOp = operations[i].second;
2789
2790
578
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
410
                auto& curModifier = op.modifier.GetVectorPtr();
2792
410
                if ( curModifier.size() == 0 ) {
2793
132k
                    for (size_t j = 0; j < 512; j++) {
2794
132k
                        curModifier.push_back(1);
2795
132k
                    }
2796
259
                } else {
2797
874
                    for (auto& c : curModifier) {
2798
874
                        c++;
2799
874
                    }
2800
151
                }
2801
410
            }
2802
578
        }
2803
2804
673
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
673
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
673
        const auto& result = results.back();
2811
2812
673
        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
673
        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
673
        if ( options.disableTests == false ) {
2830
673
            tests::test(op, result.second);
2831
673
        }
2832
2833
673
        postprocess(module, op, result);
2834
673
    }
2835
2836
200
    if ( options.noCompare == false ) {
2837
95
        compare(operations, results, data, size);
2838
95
    }
2839
200
}
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
170
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
170
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
170
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.65k
    do {
2725
3.65k
        auto op = getOp(&parentDs, data, size);
2726
3.65k
        auto module = getModule(parentDs);
2727
3.65k
        if ( module == nullptr ) {
2728
2.96k
            continue;
2729
2.96k
        }
2730
2731
690
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
690
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
3.65k
    } while ( parentDs.Get<bool>() == true );
2738
2739
170
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
154
#if 1
2745
154
    {
2746
154
        std::set<uint64_t> moduleIDs;
2747
154
        for (const auto& m : modules ) {
2748
144
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
144
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
144
            moduleIDs.insert(moduleID);
2756
144
        }
2757
2758
154
        std::set<uint64_t> operationModuleIDs;
2759
486
        for (const auto& op : operations) {
2760
486
            operationModuleIDs.insert(op.first->ID);
2761
486
        }
2762
2763
154
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
154
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
154
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
154
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
154
    }
2771
154
#endif
2772
2773
154
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
154
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
685
    for (size_t i = 0; i < operations.size(); i++) {
2781
531
        auto& operation = operations[i];
2782
2783
531
        auto& module = operation.first;
2784
531
        auto& op = operation.second;
2785
2786
531
        if ( i > 0 ) {
2787
459
            auto& prevModule = operations[i-1].first;
2788
459
            auto& prevOp = operations[i].second;
2789
2790
459
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
346
                auto& curModifier = op.modifier.GetVectorPtr();
2792
346
                if ( curModifier.size() == 0 ) {
2793
106k
                    for (size_t j = 0; j < 512; j++) {
2794
105k
                        curModifier.push_back(1);
2795
105k
                    }
2796
207
                } else {
2797
1.03k
                    for (auto& c : curModifier) {
2798
1.03k
                        c++;
2799
1.03k
                    }
2800
139
                }
2801
346
            }
2802
459
        }
2803
2804
531
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
531
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
531
        const auto& result = results.back();
2811
2812
531
        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
531
        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
531
        if ( options.disableTests == false ) {
2830
531
            tests::test(op, result.second);
2831
531
        }
2832
2833
531
        postprocess(module, op, result);
2834
531
    }
2835
2836
154
    if ( options.noCompare == false ) {
2837
72
        compare(operations, results, data, size);
2838
72
    }
2839
154
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
905
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
905
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
905
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.42k
    do {
2725
4.42k
        auto op = getOp(&parentDs, data, size);
2726
4.42k
        auto module = getModule(parentDs);
2727
4.42k
        if ( module == nullptr ) {
2728
3.03k
            continue;
2729
3.03k
        }
2730
2731
1.39k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.39k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
58
            break;
2736
58
        }
2737
4.36k
    } while ( parentDs.Get<bool>() == true );
2738
2739
905
    if ( operations.empty() == true ) {
2740
60
        return;
2741
60
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
845
#if 1
2745
845
    {
2746
845
        std::set<uint64_t> moduleIDs;
2747
1.47k
        for (const auto& m : modules ) {
2748
1.47k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.47k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.47k
            moduleIDs.insert(moduleID);
2756
1.47k
        }
2757
2758
845
        std::set<uint64_t> operationModuleIDs;
2759
1.30k
        for (const auto& op : operations) {
2760
1.30k
            operationModuleIDs.insert(op.first->ID);
2761
1.30k
        }
2762
2763
845
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
845
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
845
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
845
        for (const auto& id : addModuleIDs) {
2768
715
            operations.push_back({ modules.at(id), operations[0].second});
2769
715
        }
2770
845
    }
2771
845
#endif
2772
2773
845
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
845
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.86k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.01k
        auto& operation = operations[i];
2782
2783
2.01k
        auto& module = operation.first;
2784
2.01k
        auto& op = operation.second;
2785
2786
2.01k
        if ( i > 0 ) {
2787
1.27k
            auto& prevModule = operations[i-1].first;
2788
1.27k
            auto& prevOp = operations[i].second;
2789
2790
1.27k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
525
                auto& curModifier = op.modifier.GetVectorPtr();
2792
525
                if ( curModifier.size() == 0 ) {
2793
171k
                    for (size_t j = 0; j < 512; j++) {
2794
171k
                        curModifier.push_back(1);
2795
171k
                    }
2796
334
                } else {
2797
37.5k
                    for (auto& c : curModifier) {
2798
37.5k
                        c++;
2799
37.5k
                    }
2800
191
                }
2801
525
            }
2802
1.27k
        }
2803
2804
2.01k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.01k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.01k
        const auto& result = results.back();
2811
2812
2.01k
        if ( result.second != std::nullopt ) {
2813
688
            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
688
        }
2820
2821
2.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
2.01k
        if ( options.disableTests == false ) {
2830
2.01k
            tests::test(op, result.second);
2831
2.01k
        }
2832
2833
2.01k
        postprocess(module, op, result);
2834
2.01k
    }
2835
2836
845
    if ( options.noCompare == false ) {
2837
739
        compare(operations, results, data, size);
2838
739
    }
2839
845
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
871
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
871
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
871
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.79k
    do {
2725
3.79k
        auto op = getOp(&parentDs, data, size);
2726
3.79k
        auto module = getModule(parentDs);
2727
3.79k
        if ( module == nullptr ) {
2728
2.62k
            continue;
2729
2.62k
        }
2730
2731
1.17k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.17k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
20
            break;
2736
20
        }
2737
3.77k
    } while ( parentDs.Get<bool>() == true );
2738
2739
871
    if ( operations.empty() == true ) {
2740
27
        return;
2741
27
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
844
#if 1
2745
844
    {
2746
844
        std::set<uint64_t> moduleIDs;
2747
1.54k
        for (const auto& m : modules ) {
2748
1.54k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.54k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.54k
            moduleIDs.insert(moduleID);
2756
1.54k
        }
2757
2758
844
        std::set<uint64_t> operationModuleIDs;
2759
1.07k
        for (const auto& op : operations) {
2760
1.07k
            operationModuleIDs.insert(op.first->ID);
2761
1.07k
        }
2762
2763
844
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
844
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
844
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
844
        for (const auto& id : addModuleIDs) {
2768
738
            operations.push_back({ modules.at(id), operations[0].second});
2769
738
        }
2770
844
    }
2771
844
#endif
2772
2773
844
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
844
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.65k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.81k
        auto& operation = operations[i];
2782
2783
1.81k
        auto& module = operation.first;
2784
1.81k
        auto& op = operation.second;
2785
2786
1.81k
        if ( i > 0 ) {
2787
1.04k
            auto& prevModule = operations[i-1].first;
2788
1.04k
            auto& prevOp = operations[i].second;
2789
2790
1.04k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
256
                auto& curModifier = op.modifier.GetVectorPtr();
2792
256
                if ( curModifier.size() == 0 ) {
2793
69.7k
                    for (size_t j = 0; j < 512; j++) {
2794
69.6k
                        curModifier.push_back(1);
2795
69.6k
                    }
2796
136
                } else {
2797
12.3k
                    for (auto& c : curModifier) {
2798
12.3k
                        c++;
2799
12.3k
                    }
2800
120
                }
2801
256
            }
2802
1.04k
        }
2803
2804
1.81k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.81k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.81k
        const auto& result = results.back();
2811
2812
1.81k
        if ( result.second != std::nullopt ) {
2813
775
            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
775
        }
2820
2821
1.81k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.81k
        if ( options.disableTests == false ) {
2830
1.81k
            tests::test(op, result.second);
2831
1.81k
        }
2832
2833
1.81k
        postprocess(module, op, result);
2834
1.81k
    }
2835
2836
844
    if ( options.noCompare == false ) {
2837
770
        compare(operations, results, data, size);
2838
770
    }
2839
844
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.54k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.54k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.54k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.62k
    do {
2725
4.62k
        auto op = getOp(&parentDs, data, size);
2726
4.62k
        auto module = getModule(parentDs);
2727
4.62k
        if ( module == nullptr ) {
2728
2.63k
            continue;
2729
2.63k
        }
2730
2731
1.98k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.98k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
61
            break;
2736
61
        }
2737
4.55k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.54k
    if ( operations.empty() == true ) {
2740
83
        return;
2741
83
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.45k
#if 1
2745
1.45k
    {
2746
1.45k
        std::set<uint64_t> moduleIDs;
2747
2.67k
        for (const auto& m : modules ) {
2748
2.67k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.67k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.67k
            moduleIDs.insert(moduleID);
2756
2.67k
        }
2757
2758
1.45k
        std::set<uint64_t> operationModuleIDs;
2759
1.89k
        for (const auto& op : operations) {
2760
1.89k
            operationModuleIDs.insert(op.first->ID);
2761
1.89k
        }
2762
2763
1.45k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.45k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.45k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.45k
        for (const auto& id : addModuleIDs) {
2768
1.31k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.31k
        }
2770
1.45k
    }
2771
1.45k
#endif
2772
2773
1.45k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.45k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.66k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.20k
        auto& operation = operations[i];
2782
2783
3.20k
        auto& module = operation.first;
2784
3.20k
        auto& op = operation.second;
2785
2786
3.20k
        if ( i > 0 ) {
2787
1.86k
            auto& prevModule = operations[i-1].first;
2788
1.86k
            auto& prevOp = operations[i].second;
2789
2790
1.86k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
513
                auto& curModifier = op.modifier.GetVectorPtr();
2792
513
                if ( curModifier.size() == 0 ) {
2793
188k
                    for (size_t j = 0; j < 512; j++) {
2794
187k
                        curModifier.push_back(1);
2795
187k
                    }
2796
367
                } else {
2797
10.4k
                    for (auto& c : curModifier) {
2798
10.4k
                        c++;
2799
10.4k
                    }
2800
146
                }
2801
513
            }
2802
1.86k
        }
2803
2804
3.20k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.20k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.20k
        const auto& result = results.back();
2811
2812
3.20k
        if ( result.second != std::nullopt ) {
2813
1.13k
            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.13k
        }
2820
2821
3.20k
        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.20k
        if ( options.disableTests == false ) {
2830
3.20k
            tests::test(op, result.second);
2831
3.20k
        }
2832
2833
3.20k
        postprocess(module, op, result);
2834
3.20k
    }
2835
2836
1.45k
    if ( options.noCompare == false ) {
2837
1.33k
        compare(operations, results, data, size);
2838
1.33k
    }
2839
1.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
150
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
150
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
150
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
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
2.54k
            continue;
2729
2.54k
        }
2730
2731
281
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
281
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
2.81k
    } while ( parentDs.Get<bool>() == true );
2738
2739
150
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
131
#if 1
2745
131
    {
2746
131
        std::set<uint64_t> moduleIDs;
2747
131
        for (const auto& m : modules ) {
2748
122
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
122
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
122
            moduleIDs.insert(moduleID);
2756
122
        }
2757
2758
131
        std::set<uint64_t> operationModuleIDs;
2759
189
        for (const auto& op : operations) {
2760
189
            operationModuleIDs.insert(op.first->ID);
2761
189
        }
2762
2763
131
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
131
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
131
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
131
        for (const auto& id : addModuleIDs) {
2768
42
            operations.push_back({ modules.at(id), operations[0].second});
2769
42
        }
2770
131
    }
2771
131
#endif
2772
2773
131
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
131
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
362
    for (size_t i = 0; i < operations.size(); i++) {
2781
231
        auto& operation = operations[i];
2782
2783
231
        auto& module = operation.first;
2784
231
        auto& op = operation.second;
2785
2786
231
        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
96
                auto& curModifier = op.modifier.GetVectorPtr();
2792
96
                if ( curModifier.size() == 0 ) {
2793
29.2k
                    for (size_t j = 0; j < 512; j++) {
2794
29.1k
                        curModifier.push_back(1);
2795
29.1k
                    }
2796
57
                } else {
2797
2.70k
                    for (auto& c : curModifier) {
2798
2.70k
                        c++;
2799
2.70k
                    }
2800
39
                }
2801
96
            }
2802
170
        }
2803
2804
231
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
231
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
231
        const auto& result = results.back();
2811
2812
231
        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
231
        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
231
        if ( options.disableTests == false ) {
2830
231
            tests::test(op, result.second);
2831
231
        }
2832
2833
231
        postprocess(module, op, result);
2834
231
    }
2835
2836
131
    if ( options.noCompare == false ) {
2837
61
        compare(operations, results, data, size);
2838
61
    }
2839
131
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
905
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
905
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
905
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.32k
    do {
2725
4.32k
        auto op = getOp(&parentDs, data, size);
2726
4.32k
        auto module = getModule(parentDs);
2727
4.32k
        if ( module == nullptr ) {
2728
2.59k
            continue;
2729
2.59k
        }
2730
2731
1.73k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.73k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
91
            break;
2736
91
        }
2737
4.23k
    } while ( parentDs.Get<bool>() == true );
2738
2739
905
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
883
#if 1
2745
883
    {
2746
883
        std::set<uint64_t> moduleIDs;
2747
1.62k
        for (const auto& m : modules ) {
2748
1.62k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.62k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.62k
            moduleIDs.insert(moduleID);
2756
1.62k
        }
2757
2758
883
        std::set<uint64_t> operationModuleIDs;
2759
1.63k
        for (const auto& op : operations) {
2760
1.63k
            operationModuleIDs.insert(op.first->ID);
2761
1.63k
        }
2762
2763
883
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
883
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
883
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
883
        for (const auto& id : addModuleIDs) {
2768
790
            operations.push_back({ modules.at(id), operations[0].second});
2769
790
        }
2770
883
    }
2771
883
#endif
2772
2773
883
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
883
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.30k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.42k
        auto& operation = operations[i];
2782
2783
2.42k
        auto& module = operation.first;
2784
2.42k
        auto& op = operation.second;
2785
2786
2.42k
        if ( i > 0 ) {
2787
1.60k
            auto& prevModule = operations[i-1].first;
2788
1.60k
            auto& prevOp = operations[i].second;
2789
2790
1.60k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
771
                auto& curModifier = op.modifier.GetVectorPtr();
2792
771
                if ( curModifier.size() == 0 ) {
2793
253k
                    for (size_t j = 0; j < 512; j++) {
2794
252k
                        curModifier.push_back(1);
2795
252k
                    }
2796
494
                } else {
2797
21.6k
                    for (auto& c : curModifier) {
2798
21.6k
                        c++;
2799
21.6k
                    }
2800
277
                }
2801
771
            }
2802
1.60k
        }
2803
2804
2.42k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.42k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.42k
        const auto& result = results.back();
2811
2812
2.42k
        if ( result.second != std::nullopt ) {
2813
1.02k
            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.02k
        }
2820
2821
2.42k
        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.42k
        if ( options.disableTests == false ) {
2830
2.42k
            tests::test(op, result.second);
2831
2.42k
        }
2832
2833
2.42k
        postprocess(module, op, result);
2834
2.42k
    }
2835
2836
883
    if ( options.noCompare == false ) {
2837
812
        compare(operations, results, data, size);
2838
812
    }
2839
883
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
356
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
356
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
356
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.17k
    do {
2725
4.17k
        auto op = getOp(&parentDs, data, size);
2726
4.17k
        auto module = getModule(parentDs);
2727
4.17k
        if ( module == nullptr ) {
2728
3.59k
            continue;
2729
3.59k
        }
2730
2731
586
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
586
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
21
            break;
2736
21
        }
2737
4.15k
    } while ( parentDs.Get<bool>() == true );
2738
2739
356
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
334
#if 1
2745
334
    {
2746
334
        std::set<uint64_t> moduleIDs;
2747
490
        for (const auto& m : modules ) {
2748
490
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
490
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
490
            moduleIDs.insert(moduleID);
2756
490
        }
2757
2758
334
        std::set<uint64_t> operationModuleIDs;
2759
465
        for (const auto& op : operations) {
2760
465
            operationModuleIDs.insert(op.first->ID);
2761
465
        }
2762
2763
334
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
334
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
334
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
334
        for (const auto& id : addModuleIDs) {
2768
220
            operations.push_back({ modules.at(id), operations[0].second});
2769
220
        }
2770
334
    }
2771
334
#endif
2772
2773
334
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
334
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.01k
    for (size_t i = 0; i < operations.size(); i++) {
2781
685
        auto& operation = operations[i];
2782
2783
685
        auto& module = operation.first;
2784
685
        auto& op = operation.second;
2785
2786
685
        if ( i > 0 ) {
2787
440
            auto& prevModule = operations[i-1].first;
2788
440
            auto& prevOp = operations[i].second;
2789
2790
440
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
173
                auto& curModifier = op.modifier.GetVectorPtr();
2792
173
                if ( curModifier.size() == 0 ) {
2793
47.1k
                    for (size_t j = 0; j < 512; j++) {
2794
47.1k
                        curModifier.push_back(1);
2795
47.1k
                    }
2796
92
                } else {
2797
5.02k
                    for (auto& c : curModifier) {
2798
5.02k
                        c++;
2799
5.02k
                    }
2800
81
                }
2801
173
            }
2802
440
        }
2803
2804
685
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
685
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
685
        const auto& result = results.back();
2811
2812
685
        if ( result.second != std::nullopt ) {
2813
83
            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
83
        }
2820
2821
685
        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
685
        if ( options.disableTests == false ) {
2830
685
            tests::test(op, result.second);
2831
685
        }
2832
2833
685
        postprocess(module, op, result);
2834
685
    }
2835
2836
334
    if ( options.noCompare == false ) {
2837
245
        compare(operations, results, data, size);
2838
245
    }
2839
334
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
155
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
155
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
155
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.95k
    do {
2725
2.95k
        auto op = getOp(&parentDs, data, size);
2726
2.95k
        auto module = getModule(parentDs);
2727
2.95k
        if ( module == nullptr ) {
2728
2.70k
            continue;
2729
2.70k
        }
2730
2731
248
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
248
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
2.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
155
    if ( operations.empty() == true ) {
2740
34
        return;
2741
34
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
121
#if 1
2745
121
    {
2746
121
        std::set<uint64_t> moduleIDs;
2747
121
        for (const auto& m : modules ) {
2748
104
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
104
            moduleIDs.insert(moduleID);
2756
104
        }
2757
2758
121
        std::set<uint64_t> operationModuleIDs;
2759
157
        for (const auto& op : operations) {
2760
157
            operationModuleIDs.insert(op.first->ID);
2761
157
        }
2762
2763
121
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
121
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
121
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
121
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
121
    }
2771
121
#endif
2772
2773
121
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
121
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
309
    for (size_t i = 0; i < operations.size(); i++) {
2781
188
        auto& operation = operations[i];
2782
2783
188
        auto& module = operation.first;
2784
188
        auto& op = operation.second;
2785
2786
188
        if ( i > 0 ) {
2787
136
            auto& prevModule = operations[i-1].first;
2788
136
            auto& prevOp = operations[i].second;
2789
2790
136
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
67
                auto& curModifier = op.modifier.GetVectorPtr();
2792
67
                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
34
                } else {
2797
9.63k
                    for (auto& c : curModifier) {
2798
9.63k
                        c++;
2799
9.63k
                    }
2800
33
                }
2801
67
            }
2802
136
        }
2803
2804
188
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
188
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
188
        const auto& result = results.back();
2811
2812
188
        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
188
        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
188
        if ( options.disableTests == false ) {
2830
188
            tests::test(op, result.second);
2831
188
        }
2832
2833
188
        postprocess(module, op, result);
2834
188
    }
2835
2836
121
    if ( options.noCompare == false ) {
2837
52
        compare(operations, results, data, size);
2838
52
    }
2839
121
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
150
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
150
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
150
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.53k
    do {
2725
3.53k
        auto op = getOp(&parentDs, data, size);
2726
3.53k
        auto module = getModule(parentDs);
2727
3.53k
        if ( module == nullptr ) {
2728
3.25k
            continue;
2729
3.25k
        }
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
16
            break;
2736
16
        }
2737
3.51k
    } while ( parentDs.Get<bool>() == true );
2738
2739
150
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
133
#if 1
2745
133
    {
2746
133
        std::set<uint64_t> moduleIDs;
2747
133
        for (const auto& m : modules ) {
2748
118
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
118
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
118
            moduleIDs.insert(moduleID);
2756
118
        }
2757
2758
133
        std::set<uint64_t> operationModuleIDs;
2759
184
        for (const auto& op : operations) {
2760
184
            operationModuleIDs.insert(op.first->ID);
2761
184
        }
2762
2763
133
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
133
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
133
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
133
        for (const auto& id : addModuleIDs) {
2768
39
            operations.push_back({ modules.at(id), operations[0].second});
2769
39
        }
2770
133
    }
2771
133
#endif
2772
2773
133
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
133
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
356
    for (size_t i = 0; i < operations.size(); i++) {
2781
223
        auto& operation = operations[i];
2782
2783
223
        auto& module = operation.first;
2784
223
        auto& op = operation.second;
2785
2786
223
        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
90
                auto& curModifier = op.modifier.GetVectorPtr();
2792
90
                if ( curModifier.size() == 0 ) {
2793
21.5k
                    for (size_t j = 0; j < 512; j++) {
2794
21.5k
                        curModifier.push_back(1);
2795
21.5k
                    }
2796
48
                } else {
2797
417
                    for (auto& c : curModifier) {
2798
417
                        c++;
2799
417
                    }
2800
48
                }
2801
90
            }
2802
164
        }
2803
2804
223
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
223
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
223
        const auto& result = results.back();
2811
2812
223
        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
223
        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
223
        if ( options.disableTests == false ) {
2830
223
            tests::test(op, result.second);
2831
223
        }
2832
2833
223
        postprocess(module, op, result);
2834
223
    }
2835
2836
133
    if ( options.noCompare == false ) {
2837
59
        compare(operations, results, data, size);
2838
59
    }
2839
133
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
151
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
151
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
151
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.26k
    do {
2725
3.26k
        auto op = getOp(&parentDs, data, size);
2726
3.26k
        auto module = getModule(parentDs);
2727
3.26k
        if ( module == nullptr ) {
2728
2.92k
            continue;
2729
2.92k
        }
2730
2731
336
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
336
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
3.25k
    } while ( parentDs.Get<bool>() == true );
2738
2739
151
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
142
#if 1
2745
142
    {
2746
142
        std::set<uint64_t> moduleIDs;
2747
142
        for (const auto& m : modules ) {
2748
118
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
118
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
118
            moduleIDs.insert(moduleID);
2756
118
        }
2757
2758
142
        std::set<uint64_t> operationModuleIDs;
2759
181
        for (const auto& op : operations) {
2760
181
            operationModuleIDs.insert(op.first->ID);
2761
181
        }
2762
2763
142
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
142
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
142
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
142
        for (const auto& id : addModuleIDs) {
2768
32
            operations.push_back({ modules.at(id), operations[0].second});
2769
32
        }
2770
142
    }
2771
142
#endif
2772
2773
142
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
142
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
355
    for (size_t i = 0; i < operations.size(); i++) {
2781
213
        auto& operation = operations[i];
2782
2783
213
        auto& module = operation.first;
2784
213
        auto& op = operation.second;
2785
2786
213
        if ( i > 0 ) {
2787
154
            auto& prevModule = operations[i-1].first;
2788
154
            auto& prevOp = operations[i].second;
2789
2790
154
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
78
                auto& curModifier = op.modifier.GetVectorPtr();
2792
78
                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
43
                } else {
2797
11.1k
                    for (auto& c : curModifier) {
2798
11.1k
                        c++;
2799
11.1k
                    }
2800
43
                }
2801
78
            }
2802
154
        }
2803
2804
213
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
213
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
213
        const auto& result = results.back();
2811
2812
213
        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
213
        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
213
        if ( options.disableTests == false ) {
2830
213
            tests::test(op, result.second);
2831
213
        }
2832
2833
213
        postprocess(module, op, result);
2834
213
    }
2835
2836
142
    if ( options.noCompare == false ) {
2837
59
        compare(operations, results, data, size);
2838
59
    }
2839
142
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
471
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
471
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
471
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.23k
    do {
2725
4.23k
        auto op = getOp(&parentDs, data, size);
2726
4.23k
        auto module = getModule(parentDs);
2727
4.23k
        if ( module == nullptr ) {
2728
3.30k
            continue;
2729
3.30k
        }
2730
2731
925
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
925
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
35
            break;
2736
35
        }
2737
4.19k
    } while ( parentDs.Get<bool>() == true );
2738
2739
471
    if ( operations.empty() == true ) {
2740
31
        return;
2741
31
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
440
#if 1
2745
440
    {
2746
440
        std::set<uint64_t> moduleIDs;
2747
746
        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
440
        std::set<uint64_t> operationModuleIDs;
2759
832
        for (const auto& op : operations) {
2760
832
            operationModuleIDs.insert(op.first->ID);
2761
832
        }
2762
2763
440
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
440
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
440
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
440
        for (const auto& id : addModuleIDs) {
2768
333
            operations.push_back({ modules.at(id), operations[0].second});
2769
333
        }
2770
440
    }
2771
440
#endif
2772
2773
440
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
440
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.60k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.16k
        auto& operation = operations[i];
2782
2783
1.16k
        auto& module = operation.first;
2784
1.16k
        auto& op = operation.second;
2785
2786
1.16k
        if ( i > 0 ) {
2787
792
            auto& prevModule = operations[i-1].first;
2788
792
            auto& prevOp = operations[i].second;
2789
2790
792
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
408
                auto& curModifier = op.modifier.GetVectorPtr();
2792
408
                if ( curModifier.size() == 0 ) {
2793
126k
                    for (size_t j = 0; j < 512; j++) {
2794
126k
                        curModifier.push_back(1);
2795
126k
                    }
2796
247
                } else {
2797
1.81k
                    for (auto& c : curModifier) {
2798
1.81k
                        c++;
2799
1.81k
                    }
2800
161
                }
2801
408
            }
2802
792
        }
2803
2804
1.16k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.16k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.16k
        const auto& result = results.back();
2811
2812
1.16k
        if ( result.second != std::nullopt ) {
2813
650
            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
650
        }
2820
2821
1.16k
        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.16k
        if ( options.disableTests == false ) {
2830
1.16k
            tests::test(op, result.second);
2831
1.16k
        }
2832
2833
1.16k
        postprocess(module, op, result);
2834
1.16k
    }
2835
2836
440
    if ( options.noCompare == false ) {
2837
373
        compare(operations, results, data, size);
2838
373
    }
2839
440
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
285
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
285
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
285
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.42k
    do {
2725
3.42k
        auto op = getOp(&parentDs, data, size);
2726
3.42k
        auto module = getModule(parentDs);
2727
3.42k
        if ( module == nullptr ) {
2728
2.85k
            continue;
2729
2.85k
        }
2730
2731
568
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
568
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
22
            break;
2736
22
        }
2737
3.40k
    } while ( parentDs.Get<bool>() == true );
2738
2739
285
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
273
#if 1
2745
273
    {
2746
273
        std::set<uint64_t> moduleIDs;
2747
414
        for (const auto& m : modules ) {
2748
414
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
414
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
414
            moduleIDs.insert(moduleID);
2756
414
        }
2757
2758
273
        std::set<uint64_t> operationModuleIDs;
2759
467
        for (const auto& op : operations) {
2760
467
            operationModuleIDs.insert(op.first->ID);
2761
467
        }
2762
2763
273
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
273
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
273
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
273
        for (const auto& id : addModuleIDs) {
2768
172
            operations.push_back({ modules.at(id), operations[0].second});
2769
172
        }
2770
273
    }
2771
273
#endif
2772
2773
273
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
273
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
912
    for (size_t i = 0; i < operations.size(); i++) {
2781
639
        auto& operation = operations[i];
2782
2783
639
        auto& module = operation.first;
2784
639
        auto& op = operation.second;
2785
2786
639
        if ( i > 0 ) {
2787
432
            auto& prevModule = operations[i-1].first;
2788
432
            auto& prevOp = operations[i].second;
2789
2790
432
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
199
                auto& curModifier = op.modifier.GetVectorPtr();
2792
199
                if ( curModifier.size() == 0 ) {
2793
52.3k
                    for (size_t j = 0; j < 512; j++) {
2794
52.2k
                        curModifier.push_back(1);
2795
52.2k
                    }
2796
102
                } else {
2797
8.45k
                    for (auto& c : curModifier) {
2798
8.45k
                        c++;
2799
8.45k
                    }
2800
97
                }
2801
199
            }
2802
432
        }
2803
2804
639
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
639
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
639
        const auto& result = results.back();
2811
2812
639
        if ( result.second != std::nullopt ) {
2813
259
            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
259
        }
2820
2821
639
        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
639
        if ( options.disableTests == false ) {
2830
639
            tests::test(op, result.second);
2831
639
        }
2832
2833
639
        postprocess(module, op, result);
2834
639
    }
2835
2836
273
    if ( options.noCompare == false ) {
2837
207
        compare(operations, results, data, size);
2838
207
    }
2839
273
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
133
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
133
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
133
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.18k
    do {
2725
3.18k
        auto op = getOp(&parentDs, data, size);
2726
3.18k
        auto module = getModule(parentDs);
2727
3.18k
        if ( module == nullptr ) {
2728
2.87k
            continue;
2729
2.87k
        }
2730
2731
308
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
308
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
3.17k
    } while ( parentDs.Get<bool>() == true );
2738
2739
133
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
120
#if 1
2745
120
    {
2746
120
        std::set<uint64_t> moduleIDs;
2747
120
        for (const auto& m : modules ) {
2748
120
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
120
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
120
            moduleIDs.insert(moduleID);
2756
120
        }
2757
2758
120
        std::set<uint64_t> operationModuleIDs;
2759
188
        for (const auto& op : operations) {
2760
188
            operationModuleIDs.insert(op.first->ID);
2761
188
        }
2762
2763
120
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
120
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
120
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
120
        for (const auto& id : addModuleIDs) {
2768
39
            operations.push_back({ modules.at(id), operations[0].second});
2769
39
        }
2770
120
    }
2771
120
#endif
2772
2773
120
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
120
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
347
    for (size_t i = 0; i < operations.size(); i++) {
2781
227
        auto& operation = operations[i];
2782
2783
227
        auto& module = operation.first;
2784
227
        auto& op = operation.second;
2785
2786
227
        if ( i > 0 ) {
2787
167
            auto& prevModule = operations[i-1].first;
2788
167
            auto& prevOp = operations[i].second;
2789
2790
167
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
87
                auto& curModifier = op.modifier.GetVectorPtr();
2792
87
                if ( curModifier.size() == 0 ) {
2793
12.3k
                    for (size_t j = 0; j < 512; j++) {
2794
12.2k
                        curModifier.push_back(1);
2795
12.2k
                    }
2796
63
                } else {
2797
743
                    for (auto& c : curModifier) {
2798
743
                        c++;
2799
743
                    }
2800
63
                }
2801
87
            }
2802
167
        }
2803
2804
227
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
227
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
227
        const auto& result = results.back();
2811
2812
227
        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
227
        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
227
        if ( options.disableTests == false ) {
2830
227
            tests::test(op, result.second);
2831
227
        }
2832
2833
227
        postprocess(module, op, result);
2834
227
    }
2835
2836
120
    if ( options.noCompare == false ) {
2837
60
        compare(operations, results, data, size);
2838
60
    }
2839
120
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
129
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
129
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
129
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.69k
    do {
2725
2.69k
        auto op = getOp(&parentDs, data, size);
2726
2.69k
        auto module = getModule(parentDs);
2727
2.69k
        if ( module == nullptr ) {
2728
2.43k
            continue;
2729
2.43k
        }
2730
2731
260
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
260
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
2.68k
    } while ( parentDs.Get<bool>() == true );
2738
2739
129
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
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
104
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
104
            moduleIDs.insert(moduleID);
2756
104
        }
2757
2758
113
        std::set<uint64_t> operationModuleIDs;
2759
158
        for (const auto& op : operations) {
2760
158
            operationModuleIDs.insert(op.first->ID);
2761
158
        }
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
36
            operations.push_back({ modules.at(id), operations[0].second});
2769
36
        }
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
307
    for (size_t i = 0; i < operations.size(); i++) {
2781
194
        auto& operation = operations[i];
2782
2783
194
        auto& module = operation.first;
2784
194
        auto& op = operation.second;
2785
2786
194
        if ( i > 0 ) {
2787
142
            auto& prevModule = operations[i-1].first;
2788
142
            auto& prevOp = operations[i].second;
2789
2790
142
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
77
                auto& curModifier = op.modifier.GetVectorPtr();
2792
77
                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
46
                } else {
2797
2.88k
                    for (auto& c : curModifier) {
2798
2.88k
                        c++;
2799
2.88k
                    }
2800
46
                }
2801
77
            }
2802
142
        }
2803
2804
194
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
194
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
194
        const auto& result = results.back();
2811
2812
194
        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
194
        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
194
        if ( options.disableTests == false ) {
2830
194
            tests::test(op, result.second);
2831
194
        }
2832
2833
194
        postprocess(module, op, result);
2834
194
    }
2835
2836
113
    if ( options.noCompare == false ) {
2837
52
        compare(operations, results, data, size);
2838
52
    }
2839
113
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
878
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
878
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
878
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.17k
    do {
2725
5.17k
        auto op = getOp(&parentDs, data, size);
2726
5.17k
        auto module = getModule(parentDs);
2727
5.17k
        if ( module == nullptr ) {
2728
3.45k
            continue;
2729
3.45k
        }
2730
2731
1.72k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.72k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
48
            break;
2736
48
        }
2737
5.12k
    } while ( parentDs.Get<bool>() == true );
2738
2739
878
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
861
#if 1
2745
861
    {
2746
861
        std::set<uint64_t> moduleIDs;
2747
1.59k
        for (const auto& m : modules ) {
2748
1.59k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.59k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.59k
            moduleIDs.insert(moduleID);
2756
1.59k
        }
2757
2758
861
        std::set<uint64_t> operationModuleIDs;
2759
1.62k
        for (const auto& op : operations) {
2760
1.62k
            operationModuleIDs.insert(op.first->ID);
2761
1.62k
        }
2762
2763
861
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
861
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
861
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
861
        for (const auto& id : addModuleIDs) {
2768
760
            operations.push_back({ modules.at(id), operations[0].second});
2769
760
        }
2770
861
    }
2771
861
#endif
2772
2773
861
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
861
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.24k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.38k
        auto& operation = operations[i];
2782
2783
2.38k
        auto& module = operation.first;
2784
2.38k
        auto& op = operation.second;
2785
2786
2.38k
        if ( i > 0 ) {
2787
1.58k
            auto& prevModule = operations[i-1].first;
2788
1.58k
            auto& prevOp = operations[i].second;
2789
2790
1.58k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
749
                auto& curModifier = op.modifier.GetVectorPtr();
2792
749
                if ( curModifier.size() == 0 ) {
2793
244k
                    for (size_t j = 0; j < 512; j++) {
2794
243k
                        curModifier.push_back(1);
2795
243k
                    }
2796
476
                } else {
2797
36.3k
                    for (auto& c : curModifier) {
2798
36.3k
                        c++;
2799
36.3k
                    }
2800
273
                }
2801
749
            }
2802
1.58k
        }
2803
2804
2.38k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.38k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.38k
        const auto& result = results.back();
2811
2812
2.38k
        if ( result.second != std::nullopt ) {
2813
993
            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
993
        }
2820
2821
2.38k
        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.38k
        if ( options.disableTests == false ) {
2830
2.38k
            tests::test(op, result.second);
2831
2.38k
        }
2832
2833
2.38k
        postprocess(module, op, result);
2834
2.38k
    }
2835
2836
861
    if ( options.noCompare == false ) {
2837
799
        compare(operations, results, data, size);
2838
799
    }
2839
861
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
342
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
342
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
342
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.11k
    do {
2725
4.11k
        auto op = getOp(&parentDs, data, size);
2726
4.11k
        auto module = getModule(parentDs);
2727
4.11k
        if ( module == nullptr ) {
2728
3.40k
            continue;
2729
3.40k
        }
2730
2731
710
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
710
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
19
            break;
2736
19
        }
2737
4.10k
    } while ( parentDs.Get<bool>() == true );
2738
2739
342
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
329
#if 1
2745
329
    {
2746
329
        std::set<uint64_t> moduleIDs;
2747
514
        for (const auto& m : modules ) {
2748
514
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
514
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
514
            moduleIDs.insert(moduleID);
2756
514
        }
2757
2758
329
        std::set<uint64_t> operationModuleIDs;
2759
615
        for (const auto& op : operations) {
2760
615
            operationModuleIDs.insert(op.first->ID);
2761
615
        }
2762
2763
329
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
329
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
329
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
329
        for (const auto& id : addModuleIDs) {
2768
240
            operations.push_back({ modules.at(id), operations[0].second});
2769
240
        }
2770
329
    }
2771
329
#endif
2772
2773
329
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
329
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.18k
    for (size_t i = 0; i < operations.size(); i++) {
2781
855
        auto& operation = operations[i];
2782
2783
855
        auto& module = operation.first;
2784
855
        auto& op = operation.second;
2785
2786
855
        if ( i > 0 ) {
2787
598
            auto& prevModule = operations[i-1].first;
2788
598
            auto& prevOp = operations[i].second;
2789
2790
598
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
329
                auto& curModifier = op.modifier.GetVectorPtr();
2792
329
                if ( curModifier.size() == 0 ) {
2793
110k
                    for (size_t j = 0; j < 512; j++) {
2794
110k
                        curModifier.push_back(1);
2795
110k
                    }
2796
216
                } else {
2797
34.0k
                    for (auto& c : curModifier) {
2798
34.0k
                        c++;
2799
34.0k
                    }
2800
113
                }
2801
329
            }
2802
598
        }
2803
2804
855
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
855
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
855
        const auto& result = results.back();
2811
2812
855
        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
855
        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
855
        if ( options.disableTests == false ) {
2830
855
            tests::test(op, result.second);
2831
855
        }
2832
2833
855
        postprocess(module, op, result);
2834
855
    }
2835
2836
329
    if ( options.noCompare == false ) {
2837
257
        compare(operations, results, data, size);
2838
257
    }
2839
329
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
194
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
194
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
194
    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
3.08k
            continue;
2729
3.08k
        }
2730
2731
281
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
281
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
3.35k
    } while ( parentDs.Get<bool>() == true );
2738
2739
194
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
174
#if 1
2745
174
    {
2746
174
        std::set<uint64_t> moduleIDs;
2747
174
        for (const auto& m : modules ) {
2748
154
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
154
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
154
            moduleIDs.insert(moduleID);
2756
154
        }
2757
2758
174
        std::set<uint64_t> operationModuleIDs;
2759
185
        for (const auto& op : operations) {
2760
185
            operationModuleIDs.insert(op.first->ID);
2761
185
        }
2762
2763
174
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
174
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
174
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
174
        for (const auto& id : addModuleIDs) {
2768
58
            operations.push_back({ modules.at(id), operations[0].second});
2769
58
        }
2770
174
    }
2771
174
#endif
2772
2773
174
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
174
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
417
    for (size_t i = 0; i < operations.size(); i++) {
2781
243
        auto& operation = operations[i];
2782
2783
243
        auto& module = operation.first;
2784
243
        auto& op = operation.second;
2785
2786
243
        if ( i > 0 ) {
2787
166
            auto& prevModule = operations[i-1].first;
2788
166
            auto& prevOp = operations[i].second;
2789
2790
166
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
73
                auto& curModifier = op.modifier.GetVectorPtr();
2792
73
                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
42
                } else {
2797
2.65k
                    for (auto& c : curModifier) {
2798
2.65k
                        c++;
2799
2.65k
                    }
2800
42
                }
2801
73
            }
2802
166
        }
2803
2804
243
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
243
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
243
        const auto& result = results.back();
2811
2812
243
        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
243
        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
243
        if ( options.disableTests == false ) {
2830
243
            tests::test(op, result.second);
2831
243
        }
2832
2833
243
        postprocess(module, op, result);
2834
243
    }
2835
2836
174
    if ( options.noCompare == false ) {
2837
77
        compare(operations, results, data, size);
2838
77
    }
2839
174
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
230
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
230
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
230
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.52k
    do {
2725
2.52k
        auto op = getOp(&parentDs, data, size);
2726
2.52k
        auto module = getModule(parentDs);
2727
2.52k
        if ( module == nullptr ) {
2728
2.26k
            continue;
2729
2.26k
        }
2730
2731
261
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
261
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
2.50k
    } while ( parentDs.Get<bool>() == true );
2738
2739
230
    if ( operations.empty() == true ) {
2740
39
        return;
2741
39
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
191
#if 1
2745
191
    {
2746
191
        std::set<uint64_t> moduleIDs;
2747
191
        for (const auto& m : modules ) {
2748
104
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
104
            moduleIDs.insert(moduleID);
2756
104
        }
2757
2758
191
        std::set<uint64_t> operationModuleIDs;
2759
191
        for (const auto& op : operations) {
2760
165
            operationModuleIDs.insert(op.first->ID);
2761
165
        }
2762
2763
191
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
191
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
191
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
191
        for (const auto& id : addModuleIDs) {
2768
33
            operations.push_back({ modules.at(id), operations[0].second});
2769
33
        }
2770
191
    }
2771
191
#endif
2772
2773
191
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
191
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
389
    for (size_t i = 0; i < operations.size(); i++) {
2781
198
        auto& operation = operations[i];
2782
2783
198
        auto& module = operation.first;
2784
198
        auto& op = operation.second;
2785
2786
198
        if ( i > 0 ) {
2787
146
            auto& prevModule = operations[i-1].first;
2788
146
            auto& prevOp = operations[i].second;
2789
2790
146
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
84
                auto& curModifier = op.modifier.GetVectorPtr();
2792
84
                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
289
                    for (auto& c : curModifier) {
2798
289
                        c++;
2799
289
                    }
2800
40
                }
2801
84
            }
2802
146
        }
2803
2804
198
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
198
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
198
        const auto& result = results.back();
2811
2812
198
        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
198
        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
198
        if ( options.disableTests == false ) {
2830
198
            tests::test(op, result.second);
2831
198
        }
2832
2833
198
        postprocess(module, op, result);
2834
198
    }
2835
2836
191
    if ( options.noCompare == false ) {
2837
52
        compare(operations, results, data, size);
2838
52
    }
2839
191
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
182
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
182
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
182
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.57k
    do {
2725
3.57k
        auto op = getOp(&parentDs, data, size);
2726
3.57k
        auto module = getModule(parentDs);
2727
3.57k
        if ( module == nullptr ) {
2728
3.30k
            continue;
2729
3.30k
        }
2730
2731
270
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
270
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
3.56k
    } while ( parentDs.Get<bool>() == true );
2738
2739
182
    if ( operations.empty() == true ) {
2740
24
        return;
2741
24
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
158
#if 1
2745
158
    {
2746
158
        std::set<uint64_t> moduleIDs;
2747
158
        for (const auto& m : modules ) {
2748
104
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
104
            moduleIDs.insert(moduleID);
2756
104
        }
2757
2758
158
        std::set<uint64_t> operationModuleIDs;
2759
164
        for (const auto& op : operations) {
2760
164
            operationModuleIDs.insert(op.first->ID);
2761
164
        }
2762
2763
158
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
158
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
158
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
158
        for (const auto& id : addModuleIDs) {
2768
33
            operations.push_back({ modules.at(id), operations[0].second});
2769
33
        }
2770
158
    }
2771
158
#endif
2772
2773
158
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
158
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
355
    for (size_t i = 0; i < operations.size(); i++) {
2781
197
        auto& operation = operations[i];
2782
2783
197
        auto& module = operation.first;
2784
197
        auto& op = operation.second;
2785
2786
197
        if ( i > 0 ) {
2787
145
            auto& prevModule = operations[i-1].first;
2788
145
            auto& prevOp = operations[i].second;
2789
2790
145
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
85
                auto& curModifier = op.modifier.GetVectorPtr();
2792
85
                if ( curModifier.size() == 0 ) {
2793
21.0k
                    for (size_t j = 0; j < 512; j++) {
2794
20.9k
                        curModifier.push_back(1);
2795
20.9k
                    }
2796
44
                } else {
2797
844
                    for (auto& c : curModifier) {
2798
844
                        c++;
2799
844
                    }
2800
44
                }
2801
85
            }
2802
145
        }
2803
2804
197
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
197
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
197
        const auto& result = results.back();
2811
2812
197
        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
197
        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
197
        if ( options.disableTests == false ) {
2830
197
            tests::test(op, result.second);
2831
197
        }
2832
2833
197
        postprocess(module, op, result);
2834
197
    }
2835
2836
158
    if ( options.noCompare == false ) {
2837
52
        compare(operations, results, data, size);
2838
52
    }
2839
158
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
189
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
189
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
189
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.29k
    do {
2725
3.29k
        auto op = getOp(&parentDs, data, size);
2726
3.29k
        auto module = getModule(parentDs);
2727
3.29k
        if ( module == nullptr ) {
2728
2.99k
            continue;
2729
2.99k
        }
2730
2731
298
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
298
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
3.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
189
    if ( operations.empty() == true ) {
2740
32
        return;
2741
32
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
157
#if 1
2745
157
    {
2746
157
        std::set<uint64_t> moduleIDs;
2747
157
        for (const auto& m : modules ) {
2748
142
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
142
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
142
            moduleIDs.insert(moduleID);
2756
142
        }
2757
2758
157
        std::set<uint64_t> operationModuleIDs;
2759
195
        for (const auto& op : operations) {
2760
195
            operationModuleIDs.insert(op.first->ID);
2761
195
        }
2762
2763
157
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
157
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
157
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
157
        for (const auto& id : addModuleIDs) {
2768
56
            operations.push_back({ modules.at(id), operations[0].second});
2769
56
        }
2770
157
    }
2771
157
#endif
2772
2773
157
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
157
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
408
    for (size_t i = 0; i < operations.size(); i++) {
2781
251
        auto& operation = operations[i];
2782
2783
251
        auto& module = operation.first;
2784
251
        auto& op = operation.second;
2785
2786
251
        if ( i > 0 ) {
2787
180
            auto& prevModule = operations[i-1].first;
2788
180
            auto& prevOp = operations[i].second;
2789
2790
180
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
98
                auto& curModifier = op.modifier.GetVectorPtr();
2792
98
                if ( curModifier.size() == 0 ) {
2793
26.6k
                    for (size_t j = 0; j < 512; j++) {
2794
26.6k
                        curModifier.push_back(1);
2795
26.6k
                    }
2796
52
                } else {
2797
27.1k
                    for (auto& c : curModifier) {
2798
27.1k
                        c++;
2799
27.1k
                    }
2800
46
                }
2801
98
            }
2802
180
        }
2803
2804
251
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
251
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
251
        const auto& result = results.back();
2811
2812
251
        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
251
        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
251
        if ( options.disableTests == false ) {
2830
251
            tests::test(op, result.second);
2831
251
        }
2832
2833
251
        postprocess(module, op, result);
2834
251
    }
2835
2836
157
    if ( options.noCompare == false ) {
2837
71
        compare(operations, results, data, size);
2838
71
    }
2839
157
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
166
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
166
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
166
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.21k
    do {
2725
3.21k
        auto op = getOp(&parentDs, data, size);
2726
3.21k
        auto module = getModule(parentDs);
2727
3.21k
        if ( module == nullptr ) {
2728
2.98k
            continue;
2729
2.98k
        }
2730
2731
228
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
228
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
3.20k
    } while ( parentDs.Get<bool>() == true );
2738
2739
166
    if ( operations.empty() == true ) {
2740
35
        return;
2741
35
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
131
#if 1
2745
131
    {
2746
131
        std::set<uint64_t> moduleIDs;
2747
131
        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
131
        std::set<uint64_t> operationModuleIDs;
2759
131
        for (const auto& op : operations) {
2760
131
            operationModuleIDs.insert(op.first->ID);
2761
131
        }
2762
2763
131
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
131
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
131
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
131
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
131
    }
2771
131
#endif
2772
2773
131
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
131
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
284
    for (size_t i = 0; i < operations.size(); i++) {
2781
153
        auto& operation = operations[i];
2782
2783
153
        auto& module = operation.first;
2784
153
        auto& op = operation.second;
2785
2786
153
        if ( i > 0 ) {
2787
110
            auto& prevModule = operations[i-1].first;
2788
110
            auto& prevOp = operations[i].second;
2789
2790
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
54
                auto& curModifier = op.modifier.GetVectorPtr();
2792
54
                if ( curModifier.size() == 0 ) {
2793
10.7k
                    for (size_t j = 0; j < 512; j++) {
2794
10.7k
                        curModifier.push_back(1);
2795
10.7k
                    }
2796
33
                } else {
2797
635
                    for (auto& c : curModifier) {
2798
635
                        c++;
2799
635
                    }
2800
33
                }
2801
54
            }
2802
110
        }
2803
2804
153
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
153
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
153
        const auto& result = results.back();
2811
2812
153
        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
153
        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
153
        if ( options.disableTests == false ) {
2830
153
            tests::test(op, result.second);
2831
153
        }
2832
2833
153
        postprocess(module, op, result);
2834
153
    }
2835
2836
131
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
131
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
161
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
161
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
161
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.55k
    do {
2725
3.55k
        auto op = getOp(&parentDs, data, size);
2726
3.55k
        auto module = getModule(parentDs);
2727
3.55k
        if ( module == nullptr ) {
2728
3.25k
            continue;
2729
3.25k
        }
2730
2731
293
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
293
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.53k
    } while ( parentDs.Get<bool>() == true );
2738
2739
161
    if ( operations.empty() == true ) {
2740
24
        return;
2741
24
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
137
#if 1
2745
137
    {
2746
137
        std::set<uint64_t> moduleIDs;
2747
137
        for (const auto& m : modules ) {
2748
104
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
104
            moduleIDs.insert(moduleID);
2756
104
        }
2757
2758
137
        std::set<uint64_t> operationModuleIDs;
2759
170
        for (const auto& op : operations) {
2760
170
            operationModuleIDs.insert(op.first->ID);
2761
170
        }
2762
2763
137
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
137
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
137
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
137
        for (const auto& id : addModuleIDs) {
2768
43
            operations.push_back({ modules.at(id), operations[0].second});
2769
43
        }
2770
137
    }
2771
137
#endif
2772
2773
137
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
137
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
350
    for (size_t i = 0; i < operations.size(); i++) {
2781
213
        auto& operation = operations[i];
2782
2783
213
        auto& module = operation.first;
2784
213
        auto& op = operation.second;
2785
2786
213
        if ( i > 0 ) {
2787
161
            auto& prevModule = operations[i-1].first;
2788
161
            auto& prevOp = operations[i].second;
2789
2790
161
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
100
                auto& curModifier = op.modifier.GetVectorPtr();
2792
100
                if ( curModifier.size() == 0 ) {
2793
28.2k
                    for (size_t j = 0; j < 512; j++) {
2794
28.1k
                        curModifier.push_back(1);
2795
28.1k
                    }
2796
55
                } else {
2797
2.51k
                    for (auto& c : curModifier) {
2798
2.51k
                        c++;
2799
2.51k
                    }
2800
45
                }
2801
100
            }
2802
161
        }
2803
2804
213
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
213
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
213
        const auto& result = results.back();
2811
2812
213
        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
213
        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
213
        if ( options.disableTests == false ) {
2830
213
            tests::test(op, result.second);
2831
213
        }
2832
2833
213
        postprocess(module, op, result);
2834
213
    }
2835
2836
137
    if ( options.noCompare == false ) {
2837
52
        compare(operations, results, data, size);
2838
52
    }
2839
137
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
148
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
148
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
148
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.50k
    do {
2725
3.50k
        auto op = getOp(&parentDs, data, size);
2726
3.50k
        auto module = getModule(parentDs);
2727
3.50k
        if ( module == nullptr ) {
2728
3.23k
            continue;
2729
3.23k
        }
2730
2731
264
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
264
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.49k
    } while ( parentDs.Get<bool>() == true );
2738
2739
148
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
130
#if 1
2745
130
    {
2746
130
        std::set<uint64_t> moduleIDs;
2747
130
        for (const auto& m : modules ) {
2748
106
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
106
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
106
            moduleIDs.insert(moduleID);
2756
106
        }
2757
2758
130
        std::set<uint64_t> operationModuleIDs;
2759
161
        for (const auto& op : operations) {
2760
161
            operationModuleIDs.insert(op.first->ID);
2761
161
        }
2762
2763
130
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
130
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
130
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
130
        for (const auto& id : addModuleIDs) {
2768
32
            operations.push_back({ modules.at(id), operations[0].second});
2769
32
        }
2770
130
    }
2771
130
#endif
2772
2773
130
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
130
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
323
    for (size_t i = 0; i < operations.size(); i++) {
2781
193
        auto& operation = operations[i];
2782
2783
193
        auto& module = operation.first;
2784
193
        auto& op = operation.second;
2785
2786
193
        if ( i > 0 ) {
2787
140
            auto& prevModule = operations[i-1].first;
2788
140
            auto& prevOp = operations[i].second;
2789
2790
140
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
75
                auto& curModifier = op.modifier.GetVectorPtr();
2792
75
                if ( curModifier.size() == 0 ) {
2793
23.0k
                    for (size_t j = 0; j < 512; j++) {
2794
23.0k
                        curModifier.push_back(1);
2795
23.0k
                    }
2796
45
                } else {
2797
1.14k
                    for (auto& c : curModifier) {
2798
1.14k
                        c++;
2799
1.14k
                    }
2800
30
                }
2801
75
            }
2802
140
        }
2803
2804
193
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
193
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
193
        const auto& result = results.back();
2811
2812
193
        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
193
        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
193
        if ( options.disableTests == false ) {
2830
193
            tests::test(op, result.second);
2831
193
        }
2832
2833
193
        postprocess(module, op, result);
2834
193
    }
2835
2836
130
    if ( options.noCompare == false ) {
2837
53
        compare(operations, results, data, size);
2838
53
    }
2839
130
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::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
3.04k
    do {
2725
3.04k
        auto op = getOp(&parentDs, data, size);
2726
3.04k
        auto module = getModule(parentDs);
2727
3.04k
        if ( module == nullptr ) {
2728
2.66k
            continue;
2729
2.66k
        }
2730
2731
380
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
380
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
3.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
192
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
180
#if 1
2745
180
    {
2746
180
        std::set<uint64_t> moduleIDs;
2747
206
        for (const auto& m : modules ) {
2748
206
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
206
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
206
            moduleIDs.insert(moduleID);
2756
206
        }
2757
2758
180
        std::set<uint64_t> operationModuleIDs;
2759
267
        for (const auto& op : operations) {
2760
267
            operationModuleIDs.insert(op.first->ID);
2761
267
        }
2762
2763
180
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
180
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
180
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
180
        for (const auto& id : addModuleIDs) {
2768
84
            operations.push_back({ modules.at(id), operations[0].second});
2769
84
        }
2770
180
    }
2771
180
#endif
2772
2773
180
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
180
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
531
    for (size_t i = 0; i < operations.size(); i++) {
2781
351
        auto& operation = operations[i];
2782
2783
351
        auto& module = operation.first;
2784
351
        auto& op = operation.second;
2785
2786
351
        if ( i > 0 ) {
2787
248
            auto& prevModule = operations[i-1].first;
2788
248
            auto& prevOp = operations[i].second;
2789
2790
248
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
132
                auto& curModifier = op.modifier.GetVectorPtr();
2792
132
                if ( curModifier.size() == 0 ) {
2793
33.8k
                    for (size_t j = 0; j < 512; j++) {
2794
33.7k
                        curModifier.push_back(1);
2795
33.7k
                    }
2796
66
                } else {
2797
35.4k
                    for (auto& c : curModifier) {
2798
35.4k
                        c++;
2799
35.4k
                    }
2800
66
                }
2801
132
            }
2802
248
        }
2803
2804
351
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
351
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
351
        const auto& result = results.back();
2811
2812
351
        if ( result.second != std::nullopt ) {
2813
34
            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
34
        }
2820
2821
351
        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
351
        if ( options.disableTests == false ) {
2830
351
            tests::test(op, result.second);
2831
351
        }
2832
2833
351
        postprocess(module, op, result);
2834
351
    }
2835
2836
180
    if ( options.noCompare == false ) {
2837
103
        compare(operations, results, data, size);
2838
103
    }
2839
180
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
213
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
213
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
213
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.77k
    do {
2725
2.77k
        auto op = getOp(&parentDs, data, size);
2726
2.77k
        auto module = getModule(parentDs);
2727
2.77k
        if ( module == nullptr ) {
2728
2.39k
            continue;
2729
2.39k
        }
2730
2731
383
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
383
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
2.76k
    } while ( parentDs.Get<bool>() == true );
2738
2739
213
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
194
#if 1
2745
194
    {
2746
194
        std::set<uint64_t> moduleIDs;
2747
194
        for (const auto& m : modules ) {
2748
188
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
188
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
188
            moduleIDs.insert(moduleID);
2756
188
        }
2757
2758
194
        std::set<uint64_t> operationModuleIDs;
2759
238
        for (const auto& op : operations) {
2760
238
            operationModuleIDs.insert(op.first->ID);
2761
238
        }
2762
2763
194
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
194
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
194
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
194
        for (const auto& id : addModuleIDs) {
2768
81
            operations.push_back({ modules.at(id), operations[0].second});
2769
81
        }
2770
194
    }
2771
194
#endif
2772
2773
194
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
194
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
513
    for (size_t i = 0; i < operations.size(); i++) {
2781
319
        auto& operation = operations[i];
2782
2783
319
        auto& module = operation.first;
2784
319
        auto& op = operation.second;
2785
2786
319
        if ( i > 0 ) {
2787
225
            auto& prevModule = operations[i-1].first;
2788
225
            auto& prevOp = operations[i].second;
2789
2790
225
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
119
                auto& curModifier = op.modifier.GetVectorPtr();
2792
119
                if ( curModifier.size() == 0 ) {
2793
30.2k
                    for (size_t j = 0; j < 512; j++) {
2794
30.2k
                        curModifier.push_back(1);
2795
30.2k
                    }
2796
60
                } else {
2797
7.94k
                    for (auto& c : curModifier) {
2798
7.94k
                        c++;
2799
7.94k
                    }
2800
60
                }
2801
119
            }
2802
225
        }
2803
2804
319
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
319
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
319
        const auto& result = results.back();
2811
2812
319
        if ( result.second != std::nullopt ) {
2813
21
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
21
        }
2820
2821
319
        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
319
        if ( options.disableTests == false ) {
2830
319
            tests::test(op, result.second);
2831
319
        }
2832
2833
319
        postprocess(module, op, result);
2834
319
    }
2835
2836
194
    if ( options.noCompare == false ) {
2837
94
        compare(operations, results, data, size);
2838
94
    }
2839
194
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
639
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
639
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
639
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.33k
    do {
2725
4.33k
        auto op = getOp(&parentDs, data, size);
2726
4.33k
        auto module = getModule(parentDs);
2727
4.33k
        if ( module == nullptr ) {
2728
3.00k
            continue;
2729
3.00k
        }
2730
2731
1.33k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.33k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
95
            break;
2736
95
        }
2737
4.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
639
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
624
#if 1
2745
624
    {
2746
624
        std::set<uint64_t> moduleIDs;
2747
1.10k
        for (const auto& m : modules ) {
2748
1.10k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.10k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.10k
            moduleIDs.insert(moduleID);
2756
1.10k
        }
2757
2758
624
        std::set<uint64_t> operationModuleIDs;
2759
1.24k
        for (const auto& op : operations) {
2760
1.24k
            operationModuleIDs.insert(op.first->ID);
2761
1.24k
        }
2762
2763
624
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
624
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
624
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
624
        for (const auto& id : addModuleIDs) {
2768
532
            operations.push_back({ modules.at(id), operations[0].second});
2769
532
        }
2770
624
    }
2771
624
#endif
2772
2773
624
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
624
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.40k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.77k
        auto& operation = operations[i];
2782
2783
1.77k
        auto& module = operation.first;
2784
1.77k
        auto& op = operation.second;
2785
2786
1.77k
        if ( i > 0 ) {
2787
1.22k
            auto& prevModule = operations[i-1].first;
2788
1.22k
            auto& prevOp = operations[i].second;
2789
2790
1.22k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
657
                auto& curModifier = op.modifier.GetVectorPtr();
2792
657
                if ( curModifier.size() == 0 ) {
2793
284k
                    for (size_t j = 0; j < 512; j++) {
2794
284k
                        curModifier.push_back(1);
2795
284k
                    }
2796
555
                } else {
2797
2.13k
                    for (auto& c : curModifier) {
2798
2.13k
                        c++;
2799
2.13k
                    }
2800
102
                }
2801
657
            }
2802
1.22k
        }
2803
2804
1.77k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.77k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.77k
        const auto& result = results.back();
2811
2812
1.77k
        if ( result.second != std::nullopt ) {
2813
317
            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
317
        }
2820
2821
1.77k
        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.77k
        if ( options.disableTests == false ) {
2830
1.77k
            tests::test(op, result.second);
2831
1.77k
        }
2832
2833
1.77k
        postprocess(module, op, result);
2834
1.77k
    }
2835
2836
624
    if ( options.noCompare == false ) {
2837
554
        compare(operations, results, data, size);
2838
554
    }
2839
624
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
235
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
235
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
235
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.48k
    do {
2725
2.48k
        auto op = getOp(&parentDs, data, size);
2726
2.48k
        auto module = getModule(parentDs);
2727
2.48k
        if ( module == nullptr ) {
2728
2.06k
            continue;
2729
2.06k
        }
2730
2731
418
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
418
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
21
            break;
2736
21
        }
2737
2.46k
    } while ( parentDs.Get<bool>() == true );
2738
2739
235
    if ( operations.empty() == true ) {
2740
33
        return;
2741
33
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
202
#if 1
2745
202
    {
2746
202
        std::set<uint64_t> moduleIDs;
2747
224
        for (const auto& m : modules ) {
2748
224
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
224
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
224
            moduleIDs.insert(moduleID);
2756
224
        }
2757
2758
202
        std::set<uint64_t> operationModuleIDs;
2759
297
        for (const auto& op : operations) {
2760
297
            operationModuleIDs.insert(op.first->ID);
2761
297
        }
2762
2763
202
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
202
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
202
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
202
        for (const auto& id : addModuleIDs) {
2768
91
            operations.push_back({ modules.at(id), operations[0].second});
2769
91
        }
2770
202
    }
2771
202
#endif
2772
2773
202
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
202
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
590
    for (size_t i = 0; i < operations.size(); i++) {
2781
388
        auto& operation = operations[i];
2782
2783
388
        auto& module = operation.first;
2784
388
        auto& op = operation.second;
2785
2786
388
        if ( i > 0 ) {
2787
276
            auto& prevModule = operations[i-1].first;
2788
276
            auto& prevOp = operations[i].second;
2789
2790
276
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
148
                auto& curModifier = op.modifier.GetVectorPtr();
2792
148
                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
95
                } else {
2797
951
                    for (auto& c : curModifier) {
2798
951
                        c++;
2799
951
                    }
2800
95
                }
2801
148
            }
2802
276
        }
2803
2804
388
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
388
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
388
        const auto& result = results.back();
2811
2812
388
        if ( result.second != std::nullopt ) {
2813
76
            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
76
        }
2820
2821
388
        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
388
        if ( options.disableTests == false ) {
2830
388
            tests::test(op, result.second);
2831
388
        }
2832
2833
388
        postprocess(module, op, result);
2834
388
    }
2835
2836
202
    if ( options.noCompare == false ) {
2837
112
        compare(operations, results, data, size);
2838
112
    }
2839
202
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
255
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
255
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
255
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.08k
    do {
2725
2.08k
        auto op = getOp(&parentDs, data, size);
2726
2.08k
        auto module = getModule(parentDs);
2727
2.08k
        if ( module == nullptr ) {
2728
1.64k
            continue;
2729
1.64k
        }
2730
2731
437
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
437
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
24
            break;
2736
24
        }
2737
2.05k
    } while ( parentDs.Get<bool>() == true );
2738
2739
255
    if ( operations.empty() == true ) {
2740
35
        return;
2741
35
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
220
#if 1
2745
220
    {
2746
220
        std::set<uint64_t> moduleIDs;
2747
258
        for (const auto& m : modules ) {
2748
258
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
258
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
258
            moduleIDs.insert(moduleID);
2756
258
        }
2757
2758
220
        std::set<uint64_t> operationModuleIDs;
2759
323
        for (const auto& op : operations) {
2760
323
            operationModuleIDs.insert(op.first->ID);
2761
323
        }
2762
2763
220
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
220
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
220
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
220
        for (const auto& id : addModuleIDs) {
2768
99
            operations.push_back({ modules.at(id), operations[0].second});
2769
99
        }
2770
220
    }
2771
220
#endif
2772
2773
220
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
220
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
642
    for (size_t i = 0; i < operations.size(); i++) {
2781
422
        auto& operation = operations[i];
2782
2783
422
        auto& module = operation.first;
2784
422
        auto& op = operation.second;
2785
2786
422
        if ( i > 0 ) {
2787
293
            auto& prevModule = operations[i-1].first;
2788
293
            auto& prevOp = operations[i].second;
2789
2790
293
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
151
                auto& curModifier = op.modifier.GetVectorPtr();
2792
151
                if ( curModifier.size() == 0 ) {
2793
42.0k
                    for (size_t j = 0; j < 512; j++) {
2794
41.9k
                        curModifier.push_back(1);
2795
41.9k
                    }
2796
82
                } else {
2797
20.9k
                    for (auto& c : curModifier) {
2798
20.9k
                        c++;
2799
20.9k
                    }
2800
69
                }
2801
151
            }
2802
293
        }
2803
2804
422
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
422
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
422
        const auto& result = results.back();
2811
2812
422
        if ( result.second != std::nullopt ) {
2813
60
            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
60
        }
2820
2821
422
        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
422
        if ( options.disableTests == false ) {
2830
422
            tests::test(op, result.second);
2831
422
        }
2832
2833
422
        postprocess(module, op, result);
2834
422
    }
2835
2836
220
    if ( options.noCompare == false ) {
2837
129
        compare(operations, results, data, size);
2838
129
    }
2839
220
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
194
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
194
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
194
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.45k
    do {
2725
3.45k
        auto op = getOp(&parentDs, data, size);
2726
3.45k
        auto module = getModule(parentDs);
2727
3.45k
        if ( module == nullptr ) {
2728
3.04k
            continue;
2729
3.04k
        }
2730
2731
405
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
405
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
3.43k
    } while ( parentDs.Get<bool>() == true );
2738
2739
194
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
182
#if 1
2745
182
    {
2746
182
        std::set<uint64_t> moduleIDs;
2747
206
        for (const auto& m : modules ) {
2748
206
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
206
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
206
            moduleIDs.insert(moduleID);
2756
206
        }
2757
2758
182
        std::set<uint64_t> operationModuleIDs;
2759
297
        for (const auto& op : operations) {
2760
297
            operationModuleIDs.insert(op.first->ID);
2761
297
        }
2762
2763
182
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
182
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
182
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
182
        for (const auto& id : addModuleIDs) {
2768
83
            operations.push_back({ modules.at(id), operations[0].second});
2769
83
        }
2770
182
    }
2771
182
#endif
2772
2773
182
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
182
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
562
    for (size_t i = 0; i < operations.size(); i++) {
2781
380
        auto& operation = operations[i];
2782
2783
380
        auto& module = operation.first;
2784
380
        auto& op = operation.second;
2785
2786
380
        if ( i > 0 ) {
2787
277
            auto& prevModule = operations[i-1].first;
2788
277
            auto& prevOp = operations[i].second;
2789
2790
277
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
161
                auto& curModifier = op.modifier.GetVectorPtr();
2792
161
                if ( curModifier.size() == 0 ) {
2793
38.4k
                    for (size_t j = 0; j < 512; j++) {
2794
38.4k
                        curModifier.push_back(1);
2795
38.4k
                    }
2796
86
                } else {
2797
5.09k
                    for (auto& c : curModifier) {
2798
5.09k
                        c++;
2799
5.09k
                    }
2800
86
                }
2801
161
            }
2802
277
        }
2803
2804
380
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
380
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
380
        const auto& result = results.back();
2811
2812
380
        if ( result.second != std::nullopt ) {
2813
46
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
46
        }
2820
2821
380
        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
380
        if ( options.disableTests == false ) {
2830
380
            tests::test(op, result.second);
2831
380
        }
2832
2833
380
        postprocess(module, op, result);
2834
380
    }
2835
2836
182
    if ( options.noCompare == false ) {
2837
103
        compare(operations, results, data, size);
2838
103
    }
2839
182
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
193
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
193
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
193
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.13k
    do {
2725
3.13k
        auto op = getOp(&parentDs, data, size);
2726
3.13k
        auto module = getModule(parentDs);
2727
3.13k
        if ( module == nullptr ) {
2728
2.87k
            continue;
2729
2.87k
        }
2730
2731
269
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
269
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
3.12k
    } while ( parentDs.Get<bool>() == true );
2738
2739
193
    if ( operations.empty() == true ) {
2740
31
        return;
2741
31
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
162
#if 1
2745
162
    {
2746
162
        std::set<uint64_t> moduleIDs;
2747
162
        for (const auto& m : modules ) {
2748
128
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
128
            moduleIDs.insert(moduleID);
2756
128
        }
2757
2758
162
        std::set<uint64_t> operationModuleIDs;
2759
168
        for (const auto& op : operations) {
2760
168
            operationModuleIDs.insert(op.first->ID);
2761
168
        }
2762
2763
162
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
162
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
162
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
162
        for (const auto& id : addModuleIDs) {
2768
51
            operations.push_back({ modules.at(id), operations[0].second});
2769
51
        }
2770
162
    }
2771
162
#endif
2772
2773
162
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
162
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
381
    for (size_t i = 0; i < operations.size(); i++) {
2781
219
        auto& operation = operations[i];
2782
2783
219
        auto& module = operation.first;
2784
219
        auto& op = operation.second;
2785
2786
219
        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
82
                auto& curModifier = op.modifier.GetVectorPtr();
2792
82
                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
51
                } else {
2797
3.89k
                    for (auto& c : curModifier) {
2798
3.89k
                        c++;
2799
3.89k
                    }
2800
51
                }
2801
82
            }
2802
155
        }
2803
2804
219
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
219
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
219
        const auto& result = results.back();
2811
2812
219
        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
219
        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
219
        if ( options.disableTests == false ) {
2830
219
            tests::test(op, result.second);
2831
219
        }
2832
2833
219
        postprocess(module, op, result);
2834
219
    }
2835
2836
162
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
162
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
431
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
431
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
431
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.45k
    do {
2725
4.45k
        auto op = getOp(&parentDs, data, size);
2726
4.45k
        auto module = getModule(parentDs);
2727
4.45k
        if ( module == nullptr ) {
2728
3.74k
            continue;
2729
3.74k
        }
2730
2731
712
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
712
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
26
            break;
2736
26
        }
2737
4.43k
    } while ( parentDs.Get<bool>() == true );
2738
2739
431
    if ( operations.empty() == true ) {
2740
29
        return;
2741
29
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
402
#if 1
2745
402
    {
2746
402
        std::set<uint64_t> moduleIDs;
2747
564
        for (const auto& m : modules ) {
2748
564
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
564
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
564
            moduleIDs.insert(moduleID);
2756
564
        }
2757
2758
402
        std::set<uint64_t> operationModuleIDs;
2759
581
        for (const auto& op : operations) {
2760
581
            operationModuleIDs.insert(op.first->ID);
2761
581
        }
2762
2763
402
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
402
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
402
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
402
        for (const auto& id : addModuleIDs) {
2768
262
            operations.push_back({ modules.at(id), operations[0].second});
2769
262
        }
2770
402
    }
2771
402
#endif
2772
2773
402
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
402
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.24k
    for (size_t i = 0; i < operations.size(); i++) {
2781
843
        auto& operation = operations[i];
2782
2783
843
        auto& module = operation.first;
2784
843
        auto& op = operation.second;
2785
2786
843
        if ( i > 0 ) {
2787
561
            auto& prevModule = operations[i-1].first;
2788
561
            auto& prevOp = operations[i].second;
2789
2790
561
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
262
                auto& curModifier = op.modifier.GetVectorPtr();
2792
262
                if ( curModifier.size() == 0 ) {
2793
59.5k
                    for (size_t j = 0; j < 512; j++) {
2794
59.3k
                        curModifier.push_back(1);
2795
59.3k
                    }
2796
146
                } else {
2797
36.6k
                    for (auto& c : curModifier) {
2798
36.6k
                        c++;
2799
36.6k
                    }
2800
146
                }
2801
262
            }
2802
561
        }
2803
2804
843
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
843
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
843
        const auto& result = results.back();
2811
2812
843
        if ( result.second != std::nullopt ) {
2813
57
            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
57
        }
2820
2821
843
        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
843
        if ( options.disableTests == false ) {
2830
843
            tests::test(op, result.second);
2831
843
        }
2832
2833
843
        postprocess(module, op, result);
2834
843
    }
2835
2836
402
    if ( options.noCompare == false ) {
2837
282
        compare(operations, results, data, size);
2838
282
    }
2839
402
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.60k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.60k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.60k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
21.3k
    do {
2725
21.3k
        auto op = getOp(&parentDs, data, size);
2726
21.3k
        auto module = getModule(parentDs);
2727
21.3k
        if ( module == nullptr ) {
2728
13.1k
            continue;
2729
13.1k
        }
2730
2731
8.19k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8.19k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
301
            break;
2736
301
        }
2737
21.0k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.60k
    if ( operations.empty() == true ) {
2740
155
        return;
2741
155
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.44k
#if 1
2745
4.44k
    {
2746
4.44k
        std::set<uint64_t> moduleIDs;
2747
8.21k
        for (const auto& m : modules ) {
2748
8.21k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
8.21k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
8.21k
            moduleIDs.insert(moduleID);
2756
8.21k
        }
2757
2758
4.44k
        std::set<uint64_t> operationModuleIDs;
2759
7.79k
        for (const auto& op : operations) {
2760
7.79k
            operationModuleIDs.insert(op.first->ID);
2761
7.79k
        }
2762
2763
4.44k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.44k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.44k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.44k
        for (const auto& id : addModuleIDs) {
2768
4.04k
            operations.push_back({ modules.at(id), operations[0].second});
2769
4.04k
        }
2770
4.44k
    }
2771
4.44k
#endif
2772
2773
4.44k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.44k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
16.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
11.8k
        auto& operation = operations[i];
2782
2783
11.8k
        auto& module = operation.first;
2784
11.8k
        auto& op = operation.second;
2785
2786
11.8k
        if ( i > 0 ) {
2787
7.73k
            auto& prevModule = operations[i-1].first;
2788
7.73k
            auto& prevOp = operations[i].second;
2789
2790
7.73k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3.58k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3.58k
                if ( curModifier.size() == 0 ) {
2793
961k
                    for (size_t j = 0; j < 512; j++) {
2794
960k
                        curModifier.push_back(1);
2795
960k
                    }
2796
1.87k
                } else {
2797
96.9k
                    for (auto& c : curModifier) {
2798
96.9k
                        c++;
2799
96.9k
                    }
2800
1.71k
                }
2801
3.58k
            }
2802
7.73k
        }
2803
2804
11.8k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
11.8k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
11.8k
        const auto& result = results.back();
2811
2812
11.8k
        if ( result.second != std::nullopt ) {
2813
5.15k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
5.15k
        }
2820
2821
11.8k
        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
11.8k
        if ( options.disableTests == false ) {
2830
11.8k
            tests::test(op, result.second);
2831
11.8k
        }
2832
2833
11.8k
        postprocess(module, op, result);
2834
11.8k
    }
2835
2836
4.44k
    if ( options.noCompare == false ) {
2837
4.10k
        compare(operations, results, data, size);
2838
4.10k
    }
2839
4.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
170
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
170
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
170
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.61k
    do {
2725
2.61k
        auto op = getOp(&parentDs, data, size);
2726
2.61k
        auto module = getModule(parentDs);
2727
2.61k
        if ( module == nullptr ) {
2728
2.31k
            continue;
2729
2.31k
        }
2730
2731
299
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
299
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
2.60k
    } while ( parentDs.Get<bool>() == true );
2738
2739
170
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
162
#if 1
2745
162
    {
2746
162
        std::set<uint64_t> moduleIDs;
2747
194
        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
162
        std::set<uint64_t> operationModuleIDs;
2759
220
        for (const auto& op : operations) {
2760
220
            operationModuleIDs.insert(op.first->ID);
2761
220
        }
2762
2763
162
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
162
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
162
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
162
        for (const auto& id : addModuleIDs) {
2768
80
            operations.push_back({ modules.at(id), operations[0].second});
2769
80
        }
2770
162
    }
2771
162
#endif
2772
2773
162
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
162
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
462
    for (size_t i = 0; i < operations.size(); i++) {
2781
300
        auto& operation = operations[i];
2782
2783
300
        auto& module = operation.first;
2784
300
        auto& op = operation.second;
2785
2786
300
        if ( i > 0 ) {
2787
203
            auto& prevModule = operations[i-1].first;
2788
203
            auto& prevOp = operations[i].second;
2789
2790
203
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
92
                auto& curModifier = op.modifier.GetVectorPtr();
2792
92
                if ( curModifier.size() == 0 ) {
2793
25.1k
                    for (size_t j = 0; j < 512; j++) {
2794
25.0k
                        curModifier.push_back(1);
2795
25.0k
                    }
2796
49
                } else {
2797
3.42k
                    for (auto& c : curModifier) {
2798
3.42k
                        c++;
2799
3.42k
                    }
2800
43
                }
2801
92
            }
2802
203
        }
2803
2804
300
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
300
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
300
        const auto& result = results.back();
2811
2812
300
        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
300
        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
300
        if ( options.disableTests == false ) {
2830
300
            tests::test(op, result.second);
2831
300
        }
2832
2833
300
        postprocess(module, op, result);
2834
300
    }
2835
2836
162
    if ( options.noCompare == false ) {
2837
97
        compare(operations, results, data, size);
2838
97
    }
2839
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
451
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
451
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
451
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.73k
    do {
2725
4.73k
        auto op = getOp(&parentDs, data, size);
2726
4.73k
        auto module = getModule(parentDs);
2727
4.73k
        if ( module == nullptr ) {
2728
3.84k
            continue;
2729
3.84k
        }
2730
2731
888
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
888
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
69
            break;
2736
69
        }
2737
4.66k
    } while ( parentDs.Get<bool>() == true );
2738
2739
451
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
438
#if 1
2745
438
    {
2746
438
        std::set<uint64_t> moduleIDs;
2747
706
        for (const auto& m : modules ) {
2748
706
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
706
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
706
            moduleIDs.insert(moduleID);
2756
706
        }
2757
2758
438
        std::set<uint64_t> operationModuleIDs;
2759
786
        for (const auto& op : operations) {
2760
786
            operationModuleIDs.insert(op.first->ID);
2761
786
        }
2762
2763
438
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
438
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
438
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
438
        for (const auto& id : addModuleIDs) {
2768
337
            operations.push_back({ modules.at(id), operations[0].second});
2769
337
        }
2770
438
    }
2771
438
#endif
2772
2773
438
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
438
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.56k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.12k
        auto& operation = operations[i];
2782
2783
1.12k
        auto& module = operation.first;
2784
1.12k
        auto& op = operation.second;
2785
2786
1.12k
        if ( i > 0 ) {
2787
770
            auto& prevModule = operations[i-1].first;
2788
770
            auto& prevOp = operations[i].second;
2789
2790
770
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
406
                auto& curModifier = op.modifier.GetVectorPtr();
2792
406
                if ( curModifier.size() == 0 ) {
2793
121k
                    for (size_t j = 0; j < 512; j++) {
2794
120k
                        curModifier.push_back(1);
2795
120k
                    }
2796
236
                } else {
2797
53.1k
                    for (auto& c : curModifier) {
2798
53.1k
                        c++;
2799
53.1k
                    }
2800
170
                }
2801
406
            }
2802
770
        }
2803
2804
1.12k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.12k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.12k
        const auto& result = results.back();
2811
2812
1.12k
        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
1.12k
        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.12k
        if ( options.disableTests == false ) {
2830
1.12k
            tests::test(op, result.second);
2831
1.12k
        }
2832
2833
1.12k
        postprocess(module, op, result);
2834
1.12k
    }
2835
2836
438
    if ( options.noCompare == false ) {
2837
353
        compare(operations, results, data, size);
2838
353
    }
2839
438
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
183
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
183
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
183
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.15k
    do {
2725
2.15k
        auto op = getOp(&parentDs, data, size);
2726
2.15k
        auto module = getModule(parentDs);
2727
2.15k
        if ( module == nullptr ) {
2728
1.87k
            continue;
2729
1.87k
        }
2730
2731
276
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
276
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
2.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
183
    if ( operations.empty() == true ) {
2740
23
        return;
2741
23
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
160
#if 1
2745
160
    {
2746
160
        std::set<uint64_t> moduleIDs;
2747
160
        for (const auto& m : modules ) {
2748
146
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
146
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
146
            moduleIDs.insert(moduleID);
2756
146
        }
2757
2758
160
        std::set<uint64_t> operationModuleIDs;
2759
184
        for (const auto& op : operations) {
2760
184
            operationModuleIDs.insert(op.first->ID);
2761
184
        }
2762
2763
160
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
160
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
160
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
160
        for (const auto& id : addModuleIDs) {
2768
50
            operations.push_back({ modules.at(id), operations[0].second});
2769
50
        }
2770
160
    }
2771
160
#endif
2772
2773
160
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
160
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
394
    for (size_t i = 0; i < operations.size(); i++) {
2781
234
        auto& operation = operations[i];
2782
2783
234
        auto& module = operation.first;
2784
234
        auto& op = operation.second;
2785
2786
234
        if ( i > 0 ) {
2787
161
            auto& prevModule = operations[i-1].first;
2788
161
            auto& prevOp = operations[i].second;
2789
2790
161
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
76
                auto& curModifier = op.modifier.GetVectorPtr();
2792
76
                if ( curModifier.size() == 0 ) {
2793
18.4k
                    for (size_t j = 0; j < 512; j++) {
2794
18.4k
                        curModifier.push_back(1);
2795
18.4k
                    }
2796
40
                } else {
2797
19.4k
                    for (auto& c : curModifier) {
2798
19.4k
                        c++;
2799
19.4k
                    }
2800
40
                }
2801
76
            }
2802
161
        }
2803
2804
234
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
234
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
234
        const auto& result = results.back();
2811
2812
234
        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
234
        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
234
        if ( options.disableTests == false ) {
2830
234
            tests::test(op, result.second);
2831
234
        }
2832
2833
234
        postprocess(module, op, result);
2834
234
    }
2835
2836
160
    if ( options.noCompare == false ) {
2837
73
        compare(operations, results, data, size);
2838
73
    }
2839
160
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
154
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
154
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
154
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.40k
    do {
2725
2.40k
        auto op = getOp(&parentDs, data, size);
2726
2.40k
        auto module = getModule(parentDs);
2727
2.40k
        if ( module == nullptr ) {
2728
2.14k
            continue;
2729
2.14k
        }
2730
2731
259
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
259
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
2.39k
    } while ( parentDs.Get<bool>() == true );
2738
2739
154
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
141
#if 1
2745
141
    {
2746
141
        std::set<uint64_t> moduleIDs;
2747
141
        for (const auto& m : modules ) {
2748
132
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
132
            moduleIDs.insert(moduleID);
2756
132
        }
2757
2758
141
        std::set<uint64_t> operationModuleIDs;
2759
173
        for (const auto& op : operations) {
2760
173
            operationModuleIDs.insert(op.first->ID);
2761
173
        }
2762
2763
141
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
141
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
141
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
141
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
141
    }
2771
141
#endif
2772
2773
141
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
141
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
361
    for (size_t i = 0; i < operations.size(); i++) {
2781
220
        auto& operation = operations[i];
2782
2783
220
        auto& module = operation.first;
2784
220
        auto& op = operation.second;
2785
2786
220
        if ( i > 0 ) {
2787
154
            auto& prevModule = operations[i-1].first;
2788
154
            auto& prevOp = operations[i].second;
2789
2790
154
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
76
                auto& curModifier = op.modifier.GetVectorPtr();
2792
76
                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
41
                } else {
2797
28.4k
                    for (auto& c : curModifier) {
2798
28.4k
                        c++;
2799
28.4k
                    }
2800
41
                }
2801
76
            }
2802
154
        }
2803
2804
220
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
220
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
220
        const auto& result = results.back();
2811
2812
220
        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
220
        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
220
        if ( options.disableTests == false ) {
2830
220
            tests::test(op, result.second);
2831
220
        }
2832
2833
220
        postprocess(module, op, result);
2834
220
    }
2835
2836
141
    if ( options.noCompare == false ) {
2837
66
        compare(operations, results, data, size);
2838
66
    }
2839
141
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
199
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
199
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
199
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.27k
    do {
2725
3.27k
        auto op = getOp(&parentDs, data, size);
2726
3.27k
        auto module = getModule(parentDs);
2727
3.27k
        if ( module == nullptr ) {
2728
2.95k
            continue;
2729
2.95k
        }
2730
2731
318
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
318
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
18
            break;
2736
18
        }
2737
3.25k
    } while ( parentDs.Get<bool>() == true );
2738
2739
199
    if ( operations.empty() == true ) {
2740
36
        return;
2741
36
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
163
#if 1
2745
163
    {
2746
163
        std::set<uint64_t> moduleIDs;
2747
163
        for (const auto& m : modules ) {
2748
146
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
146
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
146
            moduleIDs.insert(moduleID);
2756
146
        }
2757
2758
163
        std::set<uint64_t> operationModuleIDs;
2759
213
        for (const auto& op : operations) {
2760
213
            operationModuleIDs.insert(op.first->ID);
2761
213
        }
2762
2763
163
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
163
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
163
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
163
        for (const auto& id : addModuleIDs) {
2768
48
            operations.push_back({ modules.at(id), operations[0].second});
2769
48
        }
2770
163
    }
2771
163
#endif
2772
2773
163
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
163
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
424
    for (size_t i = 0; i < operations.size(); i++) {
2781
261
        auto& operation = operations[i];
2782
2783
261
        auto& module = operation.first;
2784
261
        auto& op = operation.second;
2785
2786
261
        if ( i > 0 ) {
2787
188
            auto& prevModule = operations[i-1].first;
2788
188
            auto& prevOp = operations[i].second;
2789
2790
188
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
95
                auto& curModifier = op.modifier.GetVectorPtr();
2792
95
                if ( curModifier.size() == 0 ) {
2793
26.1k
                    for (size_t j = 0; j < 512; j++) {
2794
26.1k
                        curModifier.push_back(1);
2795
26.1k
                    }
2796
51
                } else {
2797
5.82k
                    for (auto& c : curModifier) {
2798
5.82k
                        c++;
2799
5.82k
                    }
2800
44
                }
2801
95
            }
2802
188
        }
2803
2804
261
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
261
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
261
        const auto& result = results.back();
2811
2812
261
        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
261
        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
261
        if ( options.disableTests == false ) {
2830
261
            tests::test(op, result.second);
2831
261
        }
2832
2833
261
        postprocess(module, op, result);
2834
261
    }
2835
2836
163
    if ( options.noCompare == false ) {
2837
73
        compare(operations, results, data, size);
2838
73
    }
2839
163
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
134
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
134
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
134
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.53k
    do {
2725
2.53k
        auto op = getOp(&parentDs, data, size);
2726
2.53k
        auto module = getModule(parentDs);
2727
2.53k
        if ( module == nullptr ) {
2728
2.29k
            continue;
2729
2.29k
        }
2730
2731
241
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
241
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
2.52k
    } while ( parentDs.Get<bool>() == true );
2738
2739
134
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
125
#if 1
2745
125
    {
2746
125
        std::set<uint64_t> moduleIDs;
2747
125
        for (const auto& m : modules ) {
2748
98
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
98
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
98
            moduleIDs.insert(moduleID);
2756
98
        }
2757
2758
125
        std::set<uint64_t> operationModuleIDs;
2759
147
        for (const auto& op : operations) {
2760
147
            operationModuleIDs.insert(op.first->ID);
2761
147
        }
2762
2763
125
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
125
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
125
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
125
        for (const auto& id : addModuleIDs) {
2768
34
            operations.push_back({ modules.at(id), operations[0].second});
2769
34
        }
2770
125
    }
2771
125
#endif
2772
2773
125
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
125
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
306
    for (size_t i = 0; i < operations.size(); i++) {
2781
181
        auto& operation = operations[i];
2782
2783
181
        auto& module = operation.first;
2784
181
        auto& op = operation.second;
2785
2786
181
        if ( i > 0 ) {
2787
132
            auto& prevModule = operations[i-1].first;
2788
132
            auto& prevOp = operations[i].second;
2789
2790
132
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
71
                auto& curModifier = op.modifier.GetVectorPtr();
2792
71
                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
40
                } else {
2797
11.3k
                    for (auto& c : curModifier) {
2798
11.3k
                        c++;
2799
11.3k
                    }
2800
40
                }
2801
71
            }
2802
132
        }
2803
2804
181
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
181
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
181
        const auto& result = results.back();
2811
2812
181
        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
181
        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
181
        if ( options.disableTests == false ) {
2830
181
            tests::test(op, result.second);
2831
181
        }
2832
2833
181
        postprocess(module, op, result);
2834
181
    }
2835
2836
125
    if ( options.noCompare == false ) {
2837
49
        compare(operations, results, data, size);
2838
49
    }
2839
125
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
258
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
258
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
258
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.84k
    do {
2725
3.84k
        auto op = getOp(&parentDs, data, size);
2726
3.84k
        auto module = getModule(parentDs);
2727
3.84k
        if ( module == nullptr ) {
2728
3.48k
            continue;
2729
3.48k
        }
2730
2731
361
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
361
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
3.82k
    } while ( parentDs.Get<bool>() == true );
2738
2739
258
    if ( operations.empty() == true ) {
2740
37
        return;
2741
37
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
221
#if 1
2745
221
    {
2746
221
        std::set<uint64_t> moduleIDs;
2747
221
        for (const auto& m : modules ) {
2748
140
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
140
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
140
            moduleIDs.insert(moduleID);
2756
140
        }
2757
2758
221
        std::set<uint64_t> operationModuleIDs;
2759
221
        for (const auto& op : operations) {
2760
181
            operationModuleIDs.insert(op.first->ID);
2761
181
        }
2762
2763
221
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
221
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
221
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
221
        for (const auto& id : addModuleIDs) {
2768
56
            operations.push_back({ modules.at(id), operations[0].second});
2769
56
        }
2770
221
    }
2771
221
#endif
2772
2773
221
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
221
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
458
    for (size_t i = 0; i < operations.size(); i++) {
2781
237
        auto& operation = operations[i];
2782
2783
237
        auto& module = operation.first;
2784
237
        auto& op = operation.second;
2785
2786
237
        if ( i > 0 ) {
2787
167
            auto& prevModule = operations[i-1].first;
2788
167
            auto& prevOp = operations[i].second;
2789
2790
167
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
88
                auto& curModifier = op.modifier.GetVectorPtr();
2792
88
                if ( curModifier.size() == 0 ) {
2793
25.1k
                    for (size_t j = 0; j < 512; j++) {
2794
25.0k
                        curModifier.push_back(1);
2795
25.0k
                    }
2796
49
                } else {
2797
6.31k
                    for (auto& c : curModifier) {
2798
6.31k
                        c++;
2799
6.31k
                    }
2800
39
                }
2801
88
            }
2802
167
        }
2803
2804
237
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
237
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
237
        const auto& result = results.back();
2811
2812
237
        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
237
        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
237
        if ( options.disableTests == false ) {
2830
237
            tests::test(op, result.second);
2831
237
        }
2832
2833
237
        postprocess(module, op, result);
2834
237
    }
2835
2836
221
    if ( options.noCompare == false ) {
2837
70
        compare(operations, results, data, size);
2838
70
    }
2839
221
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
267
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
267
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
267
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.36k
    do {
2725
2.36k
        auto op = getOp(&parentDs, data, size);
2726
2.36k
        auto module = getModule(parentDs);
2727
2.36k
        if ( module == nullptr ) {
2728
1.97k
            continue;
2729
1.97k
        }
2730
2731
385
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
385
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
2.34k
    } while ( parentDs.Get<bool>() == true );
2738
2739
267
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
250
#if 1
2745
250
    {
2746
250
        std::set<uint64_t> moduleIDs;
2747
250
        for (const auto& m : modules ) {
2748
122
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
122
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
122
            moduleIDs.insert(moduleID);
2756
122
        }
2757
2758
250
        std::set<uint64_t> operationModuleIDs;
2759
250
        for (const auto& op : operations) {
2760
189
            operationModuleIDs.insert(op.first->ID);
2761
189
        }
2762
2763
250
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
250
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
250
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
250
        for (const auto& id : addModuleIDs) {
2768
43
            operations.push_back({ modules.at(id), operations[0].second});
2769
43
        }
2770
250
    }
2771
250
#endif
2772
2773
250
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
250
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
482
    for (size_t i = 0; i < operations.size(); i++) {
2781
232
        auto& operation = operations[i];
2782
2783
232
        auto& module = operation.first;
2784
232
        auto& op = operation.second;
2785
2786
232
        if ( i > 0 ) {
2787
171
            auto& prevModule = operations[i-1].first;
2788
171
            auto& prevOp = operations[i].second;
2789
2790
171
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
98
                auto& curModifier = op.modifier.GetVectorPtr();
2792
98
                if ( curModifier.size() == 0 ) {
2793
30.2k
                    for (size_t j = 0; j < 512; j++) {
2794
30.2k
                        curModifier.push_back(1);
2795
30.2k
                    }
2796
59
                } else {
2797
689
                    for (auto& c : curModifier) {
2798
689
                        c++;
2799
689
                    }
2800
39
                }
2801
98
            }
2802
171
        }
2803
2804
232
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
232
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
232
        const auto& result = results.back();
2811
2812
232
        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
232
        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
232
        if ( options.disableTests == false ) {
2830
232
            tests::test(op, result.second);
2831
232
        }
2832
2833
232
        postprocess(module, op, result);
2834
232
    }
2835
2836
250
    if ( options.noCompare == false ) {
2837
61
        compare(operations, results, data, size);
2838
61
    }
2839
250
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
280
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
280
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
280
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.66k
    do {
2725
2.66k
        auto op = getOp(&parentDs, data, size);
2726
2.66k
        auto module = getModule(parentDs);
2727
2.66k
        if ( module == nullptr ) {
2728
2.25k
            continue;
2729
2.25k
        }
2730
2731
406
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
406
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
2.64k
    } while ( parentDs.Get<bool>() == true );
2738
2739
280
    if ( operations.empty() == true ) {
2740
30
        return;
2741
30
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
250
#if 1
2745
250
    {
2746
250
        std::set<uint64_t> moduleIDs;
2747
250
        for (const auto& m : modules ) {
2748
124
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
124
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
124
            moduleIDs.insert(moduleID);
2756
124
        }
2757
2758
250
        std::set<uint64_t> operationModuleIDs;
2759
250
        for (const auto& op : operations) {
2760
186
            operationModuleIDs.insert(op.first->ID);
2761
186
        }
2762
2763
250
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
250
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
250
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
250
        for (const auto& id : addModuleIDs) {
2768
42
            operations.push_back({ modules.at(id), operations[0].second});
2769
42
        }
2770
250
    }
2771
250
#endif
2772
2773
250
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
250
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
478
    for (size_t i = 0; i < operations.size(); i++) {
2781
228
        auto& operation = operations[i];
2782
2783
228
        auto& module = operation.first;
2784
228
        auto& op = operation.second;
2785
2786
228
        if ( i > 0 ) {
2787
166
            auto& prevModule = operations[i-1].first;
2788
166
            auto& prevOp = operations[i].second;
2789
2790
166
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
88
                auto& curModifier = op.modifier.GetVectorPtr();
2792
88
                if ( curModifier.size() == 0 ) {
2793
28.7k
                    for (size_t j = 0; j < 512; j++) {
2794
28.6k
                        curModifier.push_back(1);
2795
28.6k
                    }
2796
56
                } else {
2797
644
                    for (auto& c : curModifier) {
2798
644
                        c++;
2799
644
                    }
2800
32
                }
2801
88
            }
2802
166
        }
2803
2804
228
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
228
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
228
        const auto& result = results.back();
2811
2812
228
        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
228
        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
228
        if ( options.disableTests == false ) {
2830
228
            tests::test(op, result.second);
2831
228
        }
2832
2833
228
        postprocess(module, op, result);
2834
228
    }
2835
2836
250
    if ( options.noCompare == false ) {
2837
62
        compare(operations, results, data, size);
2838
62
    }
2839
250
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
219
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
219
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
219
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.98k
    do {
2725
2.98k
        auto op = getOp(&parentDs, data, size);
2726
2.98k
        auto module = getModule(parentDs);
2727
2.98k
        if ( module == nullptr ) {
2728
2.62k
            continue;
2729
2.62k
        }
2730
2731
361
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
361
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
20
            break;
2736
20
        }
2737
2.96k
    } while ( parentDs.Get<bool>() == true );
2738
2739
219
    if ( operations.empty() == true ) {
2740
30
        return;
2741
30
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
189
#if 1
2745
189
    {
2746
189
        std::set<uint64_t> moduleIDs;
2747
189
        for (const auto& m : modules ) {
2748
122
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
122
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
122
            moduleIDs.insert(moduleID);
2756
122
        }
2757
2758
189
        std::set<uint64_t> operationModuleIDs;
2759
199
        for (const auto& op : operations) {
2760
199
            operationModuleIDs.insert(op.first->ID);
2761
199
        }
2762
2763
189
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
189
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
189
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
189
        for (const auto& id : addModuleIDs) {
2768
45
            operations.push_back({ modules.at(id), operations[0].second});
2769
45
        }
2770
189
    }
2771
189
#endif
2772
2773
189
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
189
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
433
    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
183
            auto& prevModule = operations[i-1].first;
2788
183
            auto& prevOp = operations[i].second;
2789
2790
183
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
106
                auto& curModifier = op.modifier.GetVectorPtr();
2792
106
                if ( curModifier.size() == 0 ) {
2793
22.0k
                    for (size_t j = 0; j < 512; j++) {
2794
22.0k
                        curModifier.push_back(1);
2795
22.0k
                    }
2796
63
                } else {
2797
933
                    for (auto& c : curModifier) {
2798
933
                        c++;
2799
933
                    }
2800
63
                }
2801
106
            }
2802
183
        }
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
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
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
189
    if ( options.noCompare == false ) {
2837
61
        compare(operations, results, data, size);
2838
61
    }
2839
189
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
159
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
159
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
159
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.92k
    do {
2725
2.92k
        auto op = getOp(&parentDs, data, size);
2726
2.92k
        auto module = getModule(parentDs);
2727
2.92k
        if ( module == nullptr ) {
2728
2.62k
            continue;
2729
2.62k
        }
2730
2731
300
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
300
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
2.91k
    } while ( parentDs.Get<bool>() == true );
2738
2739
159
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
146
#if 1
2745
146
    {
2746
146
        std::set<uint64_t> moduleIDs;
2747
146
        for (const auto& m : modules ) {
2748
110
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
110
            moduleIDs.insert(moduleID);
2756
110
        }
2757
2758
146
        std::set<uint64_t> operationModuleIDs;
2759
165
        for (const auto& op : operations) {
2760
165
            operationModuleIDs.insert(op.first->ID);
2761
165
        }
2762
2763
146
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
146
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
146
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
146
        for (const auto& id : addModuleIDs) {
2768
35
            operations.push_back({ modules.at(id), operations[0].second});
2769
35
        }
2770
146
    }
2771
146
#endif
2772
2773
146
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
146
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
346
    for (size_t i = 0; i < operations.size(); i++) {
2781
200
        auto& operation = operations[i];
2782
2783
200
        auto& module = operation.first;
2784
200
        auto& op = operation.second;
2785
2786
200
        if ( i > 0 ) {
2787
145
            auto& prevModule = operations[i-1].first;
2788
145
            auto& prevOp = operations[i].second;
2789
2790
145
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
75
                auto& curModifier = op.modifier.GetVectorPtr();
2792
75
                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
46
                } else {
2797
31.9k
                    for (auto& c : curModifier) {
2798
31.9k
                        c++;
2799
31.9k
                    }
2800
46
                }
2801
75
            }
2802
145
        }
2803
2804
200
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
200
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
200
        const auto& result = results.back();
2811
2812
200
        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
200
        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
200
        if ( options.disableTests == false ) {
2830
200
            tests::test(op, result.second);
2831
200
        }
2832
2833
200
        postprocess(module, op, result);
2834
200
    }
2835
2836
146
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
146
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
157
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
157
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
157
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.77k
    do {
2725
2.77k
        auto op = getOp(&parentDs, data, size);
2726
2.77k
        auto module = getModule(parentDs);
2727
2.77k
        if ( module == nullptr ) {
2728
2.47k
            continue;
2729
2.47k
        }
2730
2731
297
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
297
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
2.76k
    } while ( parentDs.Get<bool>() == true );
2738
2739
157
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
137
#if 1
2745
137
    {
2746
137
        std::set<uint64_t> moduleIDs;
2747
137
        for (const auto& m : modules ) {
2748
110
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
110
            moduleIDs.insert(moduleID);
2756
110
        }
2757
2758
137
        std::set<uint64_t> operationModuleIDs;
2759
169
        for (const auto& op : operations) {
2760
169
            operationModuleIDs.insert(op.first->ID);
2761
169
        }
2762
2763
137
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
137
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
137
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
137
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
137
    }
2771
137
#endif
2772
2773
137
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
137
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
343
    for (size_t i = 0; i < operations.size(); i++) {
2781
206
        auto& operation = operations[i];
2782
2783
206
        auto& module = operation.first;
2784
206
        auto& op = operation.second;
2785
2786
206
        if ( i > 0 ) {
2787
151
            auto& prevModule = operations[i-1].first;
2788
151
            auto& prevOp = operations[i].second;
2789
2790
151
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
77
                auto& curModifier = op.modifier.GetVectorPtr();
2792
77
                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
44
                } else {
2797
22.9k
                    for (auto& c : curModifier) {
2798
22.9k
                        c++;
2799
22.9k
                    }
2800
44
                }
2801
77
            }
2802
151
        }
2803
2804
206
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
206
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
206
        const auto& result = results.back();
2811
2812
206
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
206
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
206
        if ( options.disableTests == false ) {
2830
206
            tests::test(op, result.second);
2831
206
        }
2832
2833
206
        postprocess(module, op, result);
2834
206
    }
2835
2836
137
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
137
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
162
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
162
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
162
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.57k
    do {
2725
2.57k
        auto op = getOp(&parentDs, data, size);
2726
2.57k
        auto module = getModule(parentDs);
2727
2.57k
        if ( module == nullptr ) {
2728
2.29k
            continue;
2729
2.29k
        }
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
13
            break;
2736
13
        }
2737
2.56k
    } while ( parentDs.Get<bool>() == true );
2738
2739
162
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
145
#if 1
2745
145
    {
2746
145
        std::set<uint64_t> moduleIDs;
2747
145
        for (const auto& m : modules ) {
2748
110
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
110
            moduleIDs.insert(moduleID);
2756
110
        }
2757
2758
145
        std::set<uint64_t> operationModuleIDs;
2759
161
        for (const auto& op : operations) {
2760
161
            operationModuleIDs.insert(op.first->ID);
2761
161
        }
2762
2763
145
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
145
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
145
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
145
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
145
    }
2771
145
#endif
2772
2773
145
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
145
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
343
    for (size_t i = 0; i < operations.size(); i++) {
2781
198
        auto& operation = operations[i];
2782
2783
198
        auto& module = operation.first;
2784
198
        auto& op = operation.second;
2785
2786
198
        if ( i > 0 ) {
2787
143
            auto& prevModule = operations[i-1].first;
2788
143
            auto& prevOp = operations[i].second;
2789
2790
143
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
73
                auto& curModifier = op.modifier.GetVectorPtr();
2792
73
                if ( curModifier.size() == 0 ) {
2793
15.3k
                    for (size_t j = 0; j < 512; j++) {
2794
15.3k
                        curModifier.push_back(1);
2795
15.3k
                    }
2796
43
                } else {
2797
1.54k
                    for (auto& c : curModifier) {
2798
1.54k
                        c++;
2799
1.54k
                    }
2800
43
                }
2801
73
            }
2802
143
        }
2803
2804
198
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
198
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
198
        const auto& result = results.back();
2811
2812
198
        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
198
        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
198
        if ( options.disableTests == false ) {
2830
198
            tests::test(op, result.second);
2831
198
        }
2832
2833
198
        postprocess(module, op, result);
2834
198
    }
2835
2836
145
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
145
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.16k
    do {
2725
3.16k
        auto op = getOp(&parentDs, data, size);
2726
3.16k
        auto module = getModule(parentDs);
2727
3.16k
        if ( module == nullptr ) {
2728
2.90k
            continue;
2729
2.90k
        }
2730
2731
255
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
255
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
3.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
149
    if ( operations.empty() == true ) {
2740
23
        return;
2741
23
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
126
#if 1
2745
126
    {
2746
126
        std::set<uint64_t> moduleIDs;
2747
126
        for (const auto& m : modules ) {
2748
102
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
102
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
102
            moduleIDs.insert(moduleID);
2756
102
        }
2757
2758
126
        std::set<uint64_t> operationModuleIDs;
2759
157
        for (const auto& op : operations) {
2760
157
            operationModuleIDs.insert(op.first->ID);
2761
157
        }
2762
2763
126
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
126
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
126
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
126
        for (const auto& id : addModuleIDs) {
2768
33
            operations.push_back({ modules.at(id), operations[0].second});
2769
33
        }
2770
126
    }
2771
126
#endif
2772
2773
126
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
126
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
316
    for (size_t i = 0; i < operations.size(); i++) {
2781
190
        auto& operation = operations[i];
2782
2783
190
        auto& module = operation.first;
2784
190
        auto& op = operation.second;
2785
2786
190
        if ( i > 0 ) {
2787
139
            auto& prevModule = operations[i-1].first;
2788
139
            auto& prevOp = operations[i].second;
2789
2790
139
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
78
                auto& curModifier = op.modifier.GetVectorPtr();
2792
78
                if ( curModifier.size() == 0 ) {
2793
18.9k
                    for (size_t j = 0; j < 512; j++) {
2794
18.9k
                        curModifier.push_back(1);
2795
18.9k
                    }
2796
41
                } else {
2797
1.18k
                    for (auto& c : curModifier) {
2798
1.18k
                        c++;
2799
1.18k
                    }
2800
41
                }
2801
78
            }
2802
139
        }
2803
2804
190
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
190
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
190
        const auto& result = results.back();
2811
2812
190
        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
190
        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
190
        if ( options.disableTests == false ) {
2830
190
            tests::test(op, result.second);
2831
190
        }
2832
2833
190
        postprocess(module, op, result);
2834
190
    }
2835
2836
126
    if ( options.noCompare == false ) {
2837
51
        compare(operations, results, data, size);
2838
51
    }
2839
126
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
180
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
180
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
180
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.84k
    do {
2725
2.84k
        auto op = getOp(&parentDs, data, size);
2726
2.84k
        auto module = getModule(parentDs);
2727
2.84k
        if ( module == nullptr ) {
2728
2.54k
            continue;
2729
2.54k
        }
2730
2731
296
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
296
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
2.83k
    } while ( parentDs.Get<bool>() == true );
2738
2739
180
    if ( operations.empty() == true ) {
2740
26
        return;
2741
26
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
154
#if 1
2745
154
    {
2746
154
        std::set<uint64_t> moduleIDs;
2747
154
        for (const auto& m : modules ) {
2748
116
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
116
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
116
            moduleIDs.insert(moduleID);
2756
116
        }
2757
2758
154
        std::set<uint64_t> operationModuleIDs;
2759
172
        for (const auto& op : operations) {
2760
172
            operationModuleIDs.insert(op.first->ID);
2761
172
        }
2762
2763
154
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
154
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
154
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
154
        for (const auto& id : addModuleIDs) {
2768
35
            operations.push_back({ modules.at(id), operations[0].second});
2769
35
        }
2770
154
    }
2771
154
#endif
2772
2773
154
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
154
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
361
    for (size_t i = 0; i < operations.size(); i++) {
2781
207
        auto& operation = operations[i];
2782
2783
207
        auto& module = operation.first;
2784
207
        auto& op = operation.second;
2785
2786
207
        if ( i > 0 ) {
2787
149
            auto& prevModule = operations[i-1].first;
2788
149
            auto& prevOp = operations[i].second;
2789
2790
149
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
76
                auto& curModifier = op.modifier.GetVectorPtr();
2792
76
                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
43
                } else {
2797
3.32k
                    for (auto& c : curModifier) {
2798
3.32k
                        c++;
2799
3.32k
                    }
2800
43
                }
2801
76
            }
2802
149
        }
2803
2804
207
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
207
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
207
        const auto& result = results.back();
2811
2812
207
        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
207
        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
207
        if ( options.disableTests == false ) {
2830
207
            tests::test(op, result.second);
2831
207
        }
2832
2833
207
        postprocess(module, op, result);
2834
207
    }
2835
2836
154
    if ( options.noCompare == false ) {
2837
58
        compare(operations, results, data, size);
2838
58
    }
2839
154
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
148
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
148
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
148
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.94k
    do {
2725
2.94k
        auto op = getOp(&parentDs, data, size);
2726
2.94k
        auto module = getModule(parentDs);
2727
2.94k
        if ( module == nullptr ) {
2728
2.64k
            continue;
2729
2.64k
        }
2730
2731
296
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
296
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
2.92k
    } while ( parentDs.Get<bool>() == true );
2738
2739
148
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
127
#if 1
2745
127
    {
2746
127
        std::set<uint64_t> moduleIDs;
2747
127
        for (const auto& m : modules ) {
2748
122
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
122
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
122
            moduleIDs.insert(moduleID);
2756
122
        }
2757
2758
127
        std::set<uint64_t> operationModuleIDs;
2759
189
        for (const auto& op : operations) {
2760
189
            operationModuleIDs.insert(op.first->ID);
2761
189
        }
2762
2763
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
127
        for (const auto& id : addModuleIDs) {
2768
41
            operations.push_back({ modules.at(id), operations[0].second});
2769
41
        }
2770
127
    }
2771
127
#endif
2772
2773
127
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
127
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
357
    for (size_t i = 0; i < operations.size(); i++) {
2781
230
        auto& operation = operations[i];
2782
2783
230
        auto& module = operation.first;
2784
230
        auto& op = operation.second;
2785
2786
230
        if ( i > 0 ) {
2787
169
            auto& prevModule = operations[i-1].first;
2788
169
            auto& prevOp = operations[i].second;
2789
2790
169
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
94
                auto& curModifier = op.modifier.GetVectorPtr();
2792
94
                if ( curModifier.size() == 0 ) {
2793
23.0k
                    for (size_t j = 0; j < 512; j++) {
2794
23.0k
                        curModifier.push_back(1);
2795
23.0k
                    }
2796
49
                } else {
2797
5.99k
                    for (auto& c : curModifier) {
2798
5.99k
                        c++;
2799
5.99k
                    }
2800
49
                }
2801
94
            }
2802
169
        }
2803
2804
230
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
230
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
230
        const auto& result = results.back();
2811
2812
230
        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
230
        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
230
        if ( options.disableTests == false ) {
2830
230
            tests::test(op, result.second);
2831
230
        }
2832
2833
230
        postprocess(module, op, result);
2834
230
    }
2835
2836
127
    if ( options.noCompare == false ) {
2837
61
        compare(operations, results, data, size);
2838
61
    }
2839
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
152
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
152
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
152
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.60k
    do {
2725
2.60k
        auto op = getOp(&parentDs, data, size);
2726
2.60k
        auto module = getModule(parentDs);
2727
2.60k
        if ( module == nullptr ) {
2728
2.34k
            continue;
2729
2.34k
        }
2730
2731
265
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
265
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
2.59k
    } while ( parentDs.Get<bool>() == true );
2738
2739
152
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
132
#if 1
2745
132
    {
2746
132
        std::set<uint64_t> moduleIDs;
2747
132
        for (const auto& m : modules ) {
2748
104
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
104
            moduleIDs.insert(moduleID);
2756
104
        }
2757
2758
132
        std::set<uint64_t> operationModuleIDs;
2759
166
        for (const auto& op : operations) {
2760
166
            operationModuleIDs.insert(op.first->ID);
2761
166
        }
2762
2763
132
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
132
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
132
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
132
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
132
    }
2771
132
#endif
2772
2773
132
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
132
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
326
    for (size_t i = 0; i < operations.size(); i++) {
2781
194
        auto& operation = operations[i];
2782
2783
194
        auto& module = operation.first;
2784
194
        auto& op = operation.second;
2785
2786
194
        if ( i > 0 ) {
2787
142
            auto& prevModule = operations[i-1].first;
2788
142
            auto& prevOp = operations[i].second;
2789
2790
142
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
73
                auto& curModifier = op.modifier.GetVectorPtr();
2792
73
                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
41
                } else {
2797
1.58k
                    for (auto& c : curModifier) {
2798
1.58k
                        c++;
2799
1.58k
                    }
2800
41
                }
2801
73
            }
2802
142
        }
2803
2804
194
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
194
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
194
        const auto& result = results.back();
2811
2812
194
        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
194
        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
194
        if ( options.disableTests == false ) {
2830
194
            tests::test(op, result.second);
2831
194
        }
2832
2833
194
        postprocess(module, op, result);
2834
194
    }
2835
2836
132
    if ( options.noCompare == false ) {
2837
52
        compare(operations, results, data, size);
2838
52
    }
2839
132
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
194
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
194
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
194
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.64k
    do {
2725
2.64k
        auto op = getOp(&parentDs, data, size);
2726
2.64k
        auto module = getModule(parentDs);
2727
2.64k
        if ( module == nullptr ) {
2728
2.34k
            continue;
2729
2.34k
        }
2730
2731
298
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
298
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
2.62k
    } while ( parentDs.Get<bool>() == true );
2738
2739
194
    if ( operations.empty() == true ) {
2740
35
        return;
2741
35
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
159
#if 1
2745
159
    {
2746
159
        std::set<uint64_t> moduleIDs;
2747
159
        for (const auto& m : modules ) {
2748
138
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
138
            moduleIDs.insert(moduleID);
2756
138
        }
2757
2758
159
        std::set<uint64_t> operationModuleIDs;
2759
185
        for (const auto& op : operations) {
2760
185
            operationModuleIDs.insert(op.first->ID);
2761
185
        }
2762
2763
159
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
159
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
159
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
159
        for (const auto& id : addModuleIDs) {
2768
51
            operations.push_back({ modules.at(id), operations[0].second});
2769
51
        }
2770
159
    }
2771
159
#endif
2772
2773
159
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
159
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
395
    for (size_t i = 0; i < operations.size(); i++) {
2781
236
        auto& operation = operations[i];
2782
2783
236
        auto& module = operation.first;
2784
236
        auto& op = operation.second;
2785
2786
236
        if ( i > 0 ) {
2787
167
            auto& prevModule = operations[i-1].first;
2788
167
            auto& prevOp = operations[i].second;
2789
2790
167
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
84
                auto& curModifier = op.modifier.GetVectorPtr();
2792
84
                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
51
                } else {
2797
2.25k
                    for (auto& c : curModifier) {
2798
2.25k
                        c++;
2799
2.25k
                    }
2800
51
                }
2801
84
            }
2802
167
        }
2803
2804
236
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
236
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
236
        const auto& result = results.back();
2811
2812
236
        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
236
        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
236
        if ( options.disableTests == false ) {
2830
236
            tests::test(op, result.second);
2831
236
        }
2832
2833
236
        postprocess(module, op, result);
2834
236
    }
2835
2836
159
    if ( options.noCompare == false ) {
2837
69
        compare(operations, results, data, size);
2838
69
    }
2839
159
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
180
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
180
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
180
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.87k
    do {
2725
2.87k
        auto op = getOp(&parentDs, data, size);
2726
2.87k
        auto module = getModule(parentDs);
2727
2.87k
        if ( module == nullptr ) {
2728
2.56k
            continue;
2729
2.56k
        }
2730
2731
315
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
315
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
2.86k
    } while ( parentDs.Get<bool>() == true );
2738
2739
180
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
161
#if 1
2745
161
    {
2746
161
        std::set<uint64_t> moduleIDs;
2747
161
        for (const auto& m : modules ) {
2748
160
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
160
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
160
            moduleIDs.insert(moduleID);
2756
160
        }
2757
2758
161
        std::set<uint64_t> operationModuleIDs;
2759
190
        for (const auto& op : operations) {
2760
190
            operationModuleIDs.insert(op.first->ID);
2761
190
        }
2762
2763
161
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
161
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
161
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
161
        for (const auto& id : addModuleIDs) {
2768
62
            operations.push_back({ modules.at(id), operations[0].second});
2769
62
        }
2770
161
    }
2771
161
#endif
2772
2773
161
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
161
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
413
    for (size_t i = 0; i < operations.size(); i++) {
2781
252
        auto& operation = operations[i];
2782
2783
252
        auto& module = operation.first;
2784
252
        auto& op = operation.second;
2785
2786
252
        if ( i > 0 ) {
2787
172
            auto& prevModule = operations[i-1].first;
2788
172
            auto& prevOp = operations[i].second;
2789
2790
172
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
81
                auto& curModifier = op.modifier.GetVectorPtr();
2792
81
                if ( curModifier.size() == 0 ) {
2793
24.1k
                    for (size_t j = 0; j < 512; j++) {
2794
24.0k
                        curModifier.push_back(1);
2795
24.0k
                    }
2796
47
                } else {
2797
9.39k
                    for (auto& c : curModifier) {
2798
9.39k
                        c++;
2799
9.39k
                    }
2800
34
                }
2801
81
            }
2802
172
        }
2803
2804
252
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
252
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
252
        const auto& result = results.back();
2811
2812
252
        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
252
        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
252
        if ( options.disableTests == false ) {
2830
252
            tests::test(op, result.second);
2831
252
        }
2832
2833
252
        postprocess(module, op, result);
2834
252
    }
2835
2836
161
    if ( options.noCompare == false ) {
2837
80
        compare(operations, results, data, size);
2838
80
    }
2839
161
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
203
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
203
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
203
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.22k
    do {
2725
3.22k
        auto op = getOp(&parentDs, data, size);
2726
3.22k
        auto module = getModule(parentDs);
2727
3.22k
        if ( module == nullptr ) {
2728
2.94k
            continue;
2729
2.94k
        }
2730
2731
278
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
278
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
3.21k
    } while ( parentDs.Get<bool>() == true );
2738
2739
203
    if ( operations.empty() == true ) {
2740
42
        return;
2741
42
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
161
#if 1
2745
161
    {
2746
161
        std::set<uint64_t> moduleIDs;
2747
161
        for (const auto& m : modules ) {
2748
118
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
118
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
118
            moduleIDs.insert(moduleID);
2756
118
        }
2757
2758
161
        std::set<uint64_t> operationModuleIDs;
2759
179
        for (const auto& op : operations) {
2760
179
            operationModuleIDs.insert(op.first->ID);
2761
179
        }
2762
2763
161
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
161
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
161
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
161
        for (const auto& id : addModuleIDs) {
2768
39
            operations.push_back({ modules.at(id), operations[0].second});
2769
39
        }
2770
161
    }
2771
161
#endif
2772
2773
161
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
161
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
379
    for (size_t i = 0; i < operations.size(); i++) {
2781
218
        auto& operation = operations[i];
2782
2783
218
        auto& module = operation.first;
2784
218
        auto& op = operation.second;
2785
2786
218
        if ( i > 0 ) {
2787
159
            auto& prevModule = operations[i-1].first;
2788
159
            auto& prevOp = operations[i].second;
2789
2790
159
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
85
                auto& curModifier = op.modifier.GetVectorPtr();
2792
85
                if ( curModifier.size() == 0 ) {
2793
19.4k
                    for (size_t j = 0; j < 512; j++) {
2794
19.4k
                        curModifier.push_back(1);
2795
19.4k
                    }
2796
47
                } else {
2797
388
                    for (auto& c : curModifier) {
2798
388
                        c++;
2799
388
                    }
2800
47
                }
2801
85
            }
2802
159
        }
2803
2804
218
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
218
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
218
        const auto& result = results.back();
2811
2812
218
        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
218
        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
218
        if ( options.disableTests == false ) {
2830
218
            tests::test(op, result.second);
2831
218
        }
2832
2833
218
        postprocess(module, op, result);
2834
218
    }
2835
2836
161
    if ( options.noCompare == false ) {
2837
59
        compare(operations, results, data, size);
2838
59
    }
2839
161
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
202
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
202
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
202
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.99k
    do {
2725
2.99k
        auto op = getOp(&parentDs, data, size);
2726
2.99k
        auto module = getModule(parentDs);
2727
2.99k
        if ( module == nullptr ) {
2728
2.68k
            continue;
2729
2.68k
        }
2730
2731
308
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
308
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
2.97k
    } while ( parentDs.Get<bool>() == true );
2738
2739
202
    if ( operations.empty() == true ) {
2740
32
        return;
2741
32
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
170
#if 1
2745
170
    {
2746
170
        std::set<uint64_t> moduleIDs;
2747
170
        for (const auto& m : modules ) {
2748
138
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
138
            moduleIDs.insert(moduleID);
2756
138
        }
2757
2758
170
        std::set<uint64_t> operationModuleIDs;
2759
181
        for (const auto& op : operations) {
2760
181
            operationModuleIDs.insert(op.first->ID);
2761
181
        }
2762
2763
170
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
170
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
170
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
170
        for (const auto& id : addModuleIDs) {
2768
51
            operations.push_back({ modules.at(id), operations[0].second});
2769
51
        }
2770
170
    }
2771
170
#endif
2772
2773
170
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
170
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
402
    for (size_t i = 0; i < operations.size(); i++) {
2781
232
        auto& operation = operations[i];
2782
2783
232
        auto& module = operation.first;
2784
232
        auto& op = operation.second;
2785
2786
232
        if ( i > 0 ) {
2787
163
            auto& prevModule = operations[i-1].first;
2788
163
            auto& prevOp = operations[i].second;
2789
2790
163
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
86
                auto& curModifier = op.modifier.GetVectorPtr();
2792
86
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
59
                } else {
2797
877
                    for (auto& c : curModifier) {
2798
877
                        c++;
2799
877
                    }
2800
59
                }
2801
86
            }
2802
163
        }
2803
2804
232
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
232
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
232
        const auto& result = results.back();
2811
2812
232
        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
232
        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
232
        if ( options.disableTests == false ) {
2830
232
            tests::test(op, result.second);
2831
232
        }
2832
2833
232
        postprocess(module, op, result);
2834
232
    }
2835
2836
170
    if ( options.noCompare == false ) {
2837
69
        compare(operations, results, data, size);
2838
69
    }
2839
170
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
160
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
160
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
160
    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
2.56k
            continue;
2729
2.56k
        }
2730
2731
253
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
253
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
2.80k
    } while ( parentDs.Get<bool>() == true );
2738
2739
160
    if ( operations.empty() == true ) {
2740
31
        return;
2741
31
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
129
#if 1
2745
129
    {
2746
129
        std::set<uint64_t> moduleIDs;
2747
129
        for (const auto& m : modules ) {
2748
106
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
106
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
106
            moduleIDs.insert(moduleID);
2756
106
        }
2757
2758
129
        std::set<uint64_t> operationModuleIDs;
2759
153
        for (const auto& op : operations) {
2760
153
            operationModuleIDs.insert(op.first->ID);
2761
153
        }
2762
2763
129
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
129
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
129
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
129
        for (const auto& id : addModuleIDs) {
2768
34
            operations.push_back({ modules.at(id), operations[0].second});
2769
34
        }
2770
129
    }
2771
129
#endif
2772
2773
129
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
129
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
316
    for (size_t i = 0; i < operations.size(); i++) {
2781
187
        auto& operation = operations[i];
2782
2783
187
        auto& module = operation.first;
2784
187
        auto& op = operation.second;
2785
2786
187
        if ( i > 0 ) {
2787
134
            auto& prevModule = operations[i-1].first;
2788
134
            auto& prevOp = operations[i].second;
2789
2790
134
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
68
                auto& curModifier = op.modifier.GetVectorPtr();
2792
68
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
40
                } else {
2797
4.90k
                    for (auto& c : curModifier) {
2798
4.90k
                        c++;
2799
4.90k
                    }
2800
40
                }
2801
68
            }
2802
134
        }
2803
2804
187
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
187
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
187
        const auto& result = results.back();
2811
2812
187
        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
187
        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
187
        if ( options.disableTests == false ) {
2830
187
            tests::test(op, result.second);
2831
187
        }
2832
2833
187
        postprocess(module, op, result);
2834
187
    }
2835
2836
129
    if ( options.noCompare == false ) {
2837
53
        compare(operations, results, data, size);
2838
53
    }
2839
129
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
154
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
154
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
154
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.60k
    do {
2725
2.60k
        auto op = getOp(&parentDs, data, size);
2726
2.60k
        auto module = getModule(parentDs);
2727
2.60k
        if ( module == nullptr ) {
2728
2.34k
            continue;
2729
2.34k
        }
2730
2731
264
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
264
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
2.59k
    } while ( parentDs.Get<bool>() == true );
2738
2739
154
    if ( operations.empty() == true ) {
2740
29
        return;
2741
29
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
125
#if 1
2745
125
    {
2746
125
        std::set<uint64_t> moduleIDs;
2747
125
        for (const auto& m : modules ) {
2748
116
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
116
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
116
            moduleIDs.insert(moduleID);
2756
116
        }
2757
2758
125
        std::set<uint64_t> operationModuleIDs;
2759
171
        for (const auto& op : operations) {
2760
171
            operationModuleIDs.insert(op.first->ID);
2761
171
        }
2762
2763
125
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
125
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
125
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
125
        for (const auto& id : addModuleIDs) {
2768
37
            operations.push_back({ modules.at(id), operations[0].second});
2769
37
        }
2770
125
    }
2771
125
#endif
2772
2773
125
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
125
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
333
    for (size_t i = 0; i < operations.size(); i++) {
2781
208
        auto& operation = operations[i];
2782
2783
208
        auto& module = operation.first;
2784
208
        auto& op = operation.second;
2785
2786
208
        if ( i > 0 ) {
2787
150
            auto& prevModule = operations[i-1].first;
2788
150
            auto& prevOp = operations[i].second;
2789
2790
150
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
78
                auto& curModifier = op.modifier.GetVectorPtr();
2792
78
                if ( curModifier.size() == 0 ) {
2793
18.4k
                    for (size_t j = 0; j < 512; j++) {
2794
18.4k
                        curModifier.push_back(1);
2795
18.4k
                    }
2796
42
                } else {
2797
1.68k
                    for (auto& c : curModifier) {
2798
1.68k
                        c++;
2799
1.68k
                    }
2800
42
                }
2801
78
            }
2802
150
        }
2803
2804
208
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
208
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
208
        const auto& result = results.back();
2811
2812
208
        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
208
        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
208
        if ( options.disableTests == false ) {
2830
208
            tests::test(op, result.second);
2831
208
        }
2832
2833
208
        postprocess(module, op, result);
2834
208
    }
2835
2836
125
    if ( options.noCompare == false ) {
2837
58
        compare(operations, results, data, size);
2838
58
    }
2839
125
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
178
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
178
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
178
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.80k
    do {
2725
2.80k
        auto op = getOp(&parentDs, data, size);
2726
2.80k
        auto module = getModule(parentDs);
2727
2.80k
        if ( module == nullptr ) {
2728
2.48k
            continue;
2729
2.48k
        }
2730
2731
317
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
317
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
2.78k
    } while ( parentDs.Get<bool>() == true );
2738
2739
178
    if ( operations.empty() == true ) {
2740
25
        return;
2741
25
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
153
#if 1
2745
153
    {
2746
153
        std::set<uint64_t> moduleIDs;
2747
153
        for (const auto& m : modules ) {
2748
122
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
122
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
122
            moduleIDs.insert(moduleID);
2756
122
        }
2757
2758
153
        std::set<uint64_t> operationModuleIDs;
2759
183
        for (const auto& op : operations) {
2760
183
            operationModuleIDs.insert(op.first->ID);
2761
183
        }
2762
2763
153
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
153
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
153
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
153
        for (const auto& id : addModuleIDs) {
2768
41
            operations.push_back({ modules.at(id), operations[0].second});
2769
41
        }
2770
153
    }
2771
153
#endif
2772
2773
153
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
153
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
377
    for (size_t i = 0; i < operations.size(); i++) {
2781
224
        auto& operation = operations[i];
2782
2783
224
        auto& module = operation.first;
2784
224
        auto& op = operation.second;
2785
2786
224
        if ( i > 0 ) {
2787
163
            auto& prevModule = operations[i-1].first;
2788
163
            auto& prevOp = operations[i].second;
2789
2790
163
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
93
                auto& curModifier = op.modifier.GetVectorPtr();
2792
93
                if ( curModifier.size() == 0 ) {
2793
21.5k
                    for (size_t j = 0; j < 512; j++) {
2794
21.5k
                        curModifier.push_back(1);
2795
21.5k
                    }
2796
51
                } else {
2797
887
                    for (auto& c : curModifier) {
2798
887
                        c++;
2799
887
                    }
2800
51
                }
2801
93
            }
2802
163
        }
2803
2804
224
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
224
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
224
        const auto& result = results.back();
2811
2812
224
        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
224
        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
224
        if ( options.disableTests == false ) {
2830
224
            tests::test(op, result.second);
2831
224
        }
2832
2833
224
        postprocess(module, op, result);
2834
224
    }
2835
2836
153
    if ( options.noCompare == false ) {
2837
61
        compare(operations, results, data, size);
2838
61
    }
2839
153
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
191
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
191
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
191
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.10k
    do {
2725
3.10k
        auto op = getOp(&parentDs, data, size);
2726
3.10k
        auto module = getModule(parentDs);
2727
3.10k
        if ( module == nullptr ) {
2728
2.77k
            continue;
2729
2.77k
        }
2730
2731
330
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
330
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
3.09k
    } while ( parentDs.Get<bool>() == true );
2738
2739
191
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
170
#if 1
2745
170
    {
2746
170
        std::set<uint64_t> moduleIDs;
2747
170
        for (const auto& m : modules ) {
2748
136
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
136
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
136
            moduleIDs.insert(moduleID);
2756
136
        }
2757
2758
170
        std::set<uint64_t> operationModuleIDs;
2759
186
        for (const auto& op : operations) {
2760
186
            operationModuleIDs.insert(op.first->ID);
2761
186
        }
2762
2763
170
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
170
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
170
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
170
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
170
    }
2771
170
#endif
2772
2773
170
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
170
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
400
    for (size_t i = 0; i < operations.size(); i++) {
2781
230
        auto& operation = operations[i];
2782
2783
230
        auto& module = operation.first;
2784
230
        auto& op = operation.second;
2785
2786
230
        if ( i > 0 ) {
2787
162
            auto& prevModule = operations[i-1].first;
2788
162
            auto& prevOp = operations[i].second;
2789
2790
162
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
76
                auto& curModifier = op.modifier.GetVectorPtr();
2792
76
                if ( curModifier.size() == 0 ) {
2793
15.3k
                    for (size_t j = 0; j < 512; j++) {
2794
15.3k
                        curModifier.push_back(1);
2795
15.3k
                    }
2796
46
                } else {
2797
5.74k
                    for (auto& c : curModifier) {
2798
5.74k
                        c++;
2799
5.74k
                    }
2800
46
                }
2801
76
            }
2802
162
        }
2803
2804
230
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
230
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
230
        const auto& result = results.back();
2811
2812
230
        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
230
        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
230
        if ( options.disableTests == false ) {
2830
230
            tests::test(op, result.second);
2831
230
        }
2832
2833
230
        postprocess(module, op, result);
2834
230
    }
2835
2836
170
    if ( options.noCompare == false ) {
2837
68
        compare(operations, results, data, size);
2838
68
    }
2839
170
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
181
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
181
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
181
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.59k
    do {
2725
4.59k
        auto op = getOp(&parentDs, data, size);
2726
4.59k
        auto module = getModule(parentDs);
2727
4.59k
        if ( module == nullptr ) {
2728
4.28k
            continue;
2729
4.28k
        }
2730
2731
305
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
305
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
4.57k
    } while ( parentDs.Get<bool>() == true );
2738
2739
181
    if ( operations.empty() == true ) {
2740
31
        return;
2741
31
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
150
#if 1
2745
150
    {
2746
150
        std::set<uint64_t> moduleIDs;
2747
152
        for (const auto& m : modules ) {
2748
152
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
152
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
152
            moduleIDs.insert(moduleID);
2756
152
        }
2757
2758
150
        std::set<uint64_t> operationModuleIDs;
2759
214
        for (const auto& op : operations) {
2760
214
            operationModuleIDs.insert(op.first->ID);
2761
214
        }
2762
2763
150
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
150
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
150
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
150
        for (const auto& id : addModuleIDs) {
2768
54
            operations.push_back({ modules.at(id), operations[0].second});
2769
54
        }
2770
150
    }
2771
150
#endif
2772
2773
150
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
150
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
418
    for (size_t i = 0; i < operations.size(); i++) {
2781
268
        auto& operation = operations[i];
2782
2783
268
        auto& module = operation.first;
2784
268
        auto& op = operation.second;
2785
2786
268
        if ( i > 0 ) {
2787
192
            auto& prevModule = operations[i-1].first;
2788
192
            auto& prevOp = operations[i].second;
2789
2790
192
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
105
                auto& curModifier = op.modifier.GetVectorPtr();
2792
105
                if ( curModifier.size() == 0 ) {
2793
22.0k
                    for (size_t j = 0; j < 512; j++) {
2794
22.0k
                        curModifier.push_back(1);
2795
22.0k
                    }
2796
62
                } else {
2797
3.24k
                    for (auto& c : curModifier) {
2798
3.24k
                        c++;
2799
3.24k
                    }
2800
62
                }
2801
105
            }
2802
192
        }
2803
2804
268
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
268
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
268
        const auto& result = results.back();
2811
2812
268
        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
268
        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
268
        if ( options.disableTests == false ) {
2830
268
            tests::test(op, result.second);
2831
268
        }
2832
2833
268
        postprocess(module, op, result);
2834
268
    }
2835
2836
150
    if ( options.noCompare == false ) {
2837
76
        compare(operations, results, data, size);
2838
76
    }
2839
150
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
194
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
194
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
194
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.72k
    do {
2725
3.72k
        auto op = getOp(&parentDs, data, size);
2726
3.72k
        auto module = getModule(parentDs);
2727
3.72k
        if ( module == nullptr ) {
2728
3.38k
            continue;
2729
3.38k
        }
2730
2731
340
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
340
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
3.71k
    } while ( parentDs.Get<bool>() == true );
2738
2739
194
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
177
#if 1
2745
177
    {
2746
177
        std::set<uint64_t> moduleIDs;
2747
180
        for (const auto& m : modules ) {
2748
180
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
180
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
180
            moduleIDs.insert(moduleID);
2756
180
        }
2757
2758
177
        std::set<uint64_t> operationModuleIDs;
2759
224
        for (const auto& op : operations) {
2760
224
            operationModuleIDs.insert(op.first->ID);
2761
224
        }
2762
2763
177
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
177
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
177
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
177
        for (const auto& id : addModuleIDs) {
2768
70
            operations.push_back({ modules.at(id), operations[0].second});
2769
70
        }
2770
177
    }
2771
177
#endif
2772
2773
177
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
177
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
471
    for (size_t i = 0; i < operations.size(); i++) {
2781
294
        auto& operation = operations[i];
2782
2783
294
        auto& module = operation.first;
2784
294
        auto& op = operation.second;
2785
2786
294
        if ( i > 0 ) {
2787
204
            auto& prevModule = operations[i-1].first;
2788
204
            auto& prevOp = operations[i].second;
2789
2790
204
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
100
                auto& curModifier = op.modifier.GetVectorPtr();
2792
100
                if ( curModifier.size() == 0 ) {
2793
21.5k
                    for (size_t j = 0; j < 512; j++) {
2794
21.5k
                        curModifier.push_back(1);
2795
21.5k
                    }
2796
58
                } else {
2797
2.63k
                    for (auto& c : curModifier) {
2798
2.63k
                        c++;
2799
2.63k
                    }
2800
58
                }
2801
100
            }
2802
204
        }
2803
2804
294
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
294
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
294
        const auto& result = results.back();
2811
2812
294
        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
294
        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
294
        if ( options.disableTests == false ) {
2830
294
            tests::test(op, result.second);
2831
294
        }
2832
2833
294
        postprocess(module, op, result);
2834
294
    }
2835
2836
177
    if ( options.noCompare == false ) {
2837
90
        compare(operations, results, data, size);
2838
90
    }
2839
177
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
160
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
160
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
160
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.40k
    do {
2725
2.40k
        auto op = getOp(&parentDs, data, size);
2726
2.40k
        auto module = getModule(parentDs);
2727
2.40k
        if ( module == nullptr ) {
2728
2.12k
            continue;
2729
2.12k
        }
2730
2731
283
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
283
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
2.39k
    } while ( parentDs.Get<bool>() == true );
2738
2739
160
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
138
#if 1
2745
138
    {
2746
138
        std::set<uint64_t> moduleIDs;
2747
138
        for (const auto& m : modules ) {
2748
138
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
138
            moduleIDs.insert(moduleID);
2756
138
        }
2757
2758
138
        std::set<uint64_t> operationModuleIDs;
2759
178
        for (const auto& op : operations) {
2760
178
            operationModuleIDs.insert(op.first->ID);
2761
178
        }
2762
2763
138
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
138
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
138
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
138
        for (const auto& id : addModuleIDs) {
2768
50
            operations.push_back({ modules.at(id), operations[0].second});
2769
50
        }
2770
138
    }
2771
138
#endif
2772
2773
138
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
138
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
366
    for (size_t i = 0; i < operations.size(); i++) {
2781
228
        auto& operation = operations[i];
2782
2783
228
        auto& module = operation.first;
2784
228
        auto& op = operation.second;
2785
2786
228
        if ( i > 0 ) {
2787
159
            auto& prevModule = operations[i-1].first;
2788
159
            auto& prevOp = operations[i].second;
2789
2790
159
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
78
                auto& curModifier = op.modifier.GetVectorPtr();
2792
78
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
50
                } else {
2797
993
                    for (auto& c : curModifier) {
2798
993
                        c++;
2799
993
                    }
2800
50
                }
2801
78
            }
2802
159
        }
2803
2804
228
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
228
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
228
        const auto& result = results.back();
2811
2812
228
        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
228
        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
228
        if ( options.disableTests == false ) {
2830
228
            tests::test(op, result.second);
2831
228
        }
2832
2833
228
        postprocess(module, op, result);
2834
228
    }
2835
2836
138
    if ( options.noCompare == false ) {
2837
69
        compare(operations, results, data, size);
2838
69
    }
2839
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
224
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
224
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
224
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.04k
    do {
2725
3.04k
        auto op = getOp(&parentDs, data, size);
2726
3.04k
        auto module = getModule(parentDs);
2727
3.04k
        if ( module == nullptr ) {
2728
2.64k
            continue;
2729
2.64k
        }
2730
2731
401
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
401
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
3.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
224
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
209
#if 1
2745
209
    {
2746
209
        std::set<uint64_t> moduleIDs;
2747
218
        for (const auto& m : modules ) {
2748
218
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
218
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
218
            moduleIDs.insert(moduleID);
2756
218
        }
2757
2758
209
        std::set<uint64_t> operationModuleIDs;
2759
243
        for (const auto& op : operations) {
2760
243
            operationModuleIDs.insert(op.first->ID);
2761
243
        }
2762
2763
209
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
209
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
209
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
209
        for (const auto& id : addModuleIDs) {
2768
93
            operations.push_back({ modules.at(id), operations[0].second});
2769
93
        }
2770
209
    }
2771
209
#endif
2772
2773
209
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
209
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
545
    for (size_t i = 0; i < operations.size(); i++) {
2781
336
        auto& operation = operations[i];
2782
2783
336
        auto& module = operation.first;
2784
336
        auto& op = operation.second;
2785
2786
336
        if ( i > 0 ) {
2787
227
            auto& prevModule = operations[i-1].first;
2788
227
            auto& prevOp = operations[i].second;
2789
2790
227
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
103
                auto& curModifier = op.modifier.GetVectorPtr();
2792
103
                if ( curModifier.size() == 0 ) {
2793
29.7k
                    for (size_t j = 0; j < 512; j++) {
2794
29.6k
                        curModifier.push_back(1);
2795
29.6k
                    }
2796
58
                } else {
2797
8.01k
                    for (auto& c : curModifier) {
2798
8.01k
                        c++;
2799
8.01k
                    }
2800
45
                }
2801
103
            }
2802
227
        }
2803
2804
336
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
336
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
336
        const auto& result = results.back();
2811
2812
336
        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
336
        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
336
        if ( options.disableTests == false ) {
2830
336
            tests::test(op, result.second);
2831
336
        }
2832
2833
336
        postprocess(module, op, result);
2834
336
    }
2835
2836
209
    if ( options.noCompare == false ) {
2837
109
        compare(operations, results, data, size);
2838
109
    }
2839
209
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
161
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
161
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
161
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.96k
    do {
2725
2.96k
        auto op = getOp(&parentDs, data, size);
2726
2.96k
        auto module = getModule(parentDs);
2727
2.96k
        if ( module == nullptr ) {
2728
2.68k
            continue;
2729
2.68k
        }
2730
2731
275
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
275
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
13
            break;
2736
13
        }
2737
2.94k
    } while ( parentDs.Get<bool>() == true );
2738
2739
161
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
146
#if 1
2745
146
    {
2746
146
        std::set<uint64_t> moduleIDs;
2747
158
        for (const auto& m : modules ) {
2748
158
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
158
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
158
            moduleIDs.insert(moduleID);
2756
158
        }
2757
2758
146
        std::set<uint64_t> operationModuleIDs;
2759
190
        for (const auto& op : operations) {
2760
190
            operationModuleIDs.insert(op.first->ID);
2761
190
        }
2762
2763
146
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
146
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
146
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
146
        for (const auto& id : addModuleIDs) {
2768
60
            operations.push_back({ modules.at(id), operations[0].second});
2769
60
        }
2770
146
    }
2771
146
#endif
2772
2773
146
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
146
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
396
    for (size_t i = 0; i < operations.size(); i++) {
2781
250
        auto& operation = operations[i];
2782
2783
250
        auto& module = operation.first;
2784
250
        auto& op = operation.second;
2785
2786
250
        if ( i > 0 ) {
2787
171
            auto& prevModule = operations[i-1].first;
2788
171
            auto& prevOp = operations[i].second;
2789
2790
171
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
81
                auto& curModifier = op.modifier.GetVectorPtr();
2792
81
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
58
                } else {
2797
7.60k
                    for (auto& c : curModifier) {
2798
7.60k
                        c++;
2799
7.60k
                    }
2800
58
                }
2801
81
            }
2802
171
        }
2803
2804
250
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
250
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
250
        const auto& result = results.back();
2811
2812
250
        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
250
        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
250
        if ( options.disableTests == false ) {
2830
250
            tests::test(op, result.second);
2831
250
        }
2832
2833
250
        postprocess(module, op, result);
2834
250
    }
2835
2836
146
    if ( options.noCompare == false ) {
2837
79
        compare(operations, results, data, size);
2838
79
    }
2839
146
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
202
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
202
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
202
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.74k
    do {
2725
2.74k
        auto op = getOp(&parentDs, data, size);
2726
2.74k
        auto module = getModule(parentDs);
2727
2.74k
        if ( module == nullptr ) {
2728
2.40k
            continue;
2729
2.40k
        }
2730
2731
338
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
338
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
2.73k
    } while ( parentDs.Get<bool>() == true );
2738
2739
202
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
185
#if 1
2745
185
    {
2746
185
        std::set<uint64_t> moduleIDs;
2747
196
        for (const auto& m : modules ) {
2748
196
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
196
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
196
            moduleIDs.insert(moduleID);
2756
196
        }
2757
2758
185
        std::set<uint64_t> operationModuleIDs;
2759
229
        for (const auto& op : operations) {
2760
229
            operationModuleIDs.insert(op.first->ID);
2761
229
        }
2762
2763
185
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
185
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
185
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
185
        for (const auto& id : addModuleIDs) {
2768
81
            operations.push_back({ modules.at(id), operations[0].second});
2769
81
        }
2770
185
    }
2771
185
#endif
2772
2773
185
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
185
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
495
    for (size_t i = 0; i < operations.size(); i++) {
2781
310
        auto& operation = operations[i];
2782
2783
310
        auto& module = operation.first;
2784
310
        auto& op = operation.second;
2785
2786
310
        if ( i > 0 ) {
2787
212
            auto& prevModule = operations[i-1].first;
2788
212
            auto& prevOp = operations[i].second;
2789
2790
212
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
97
                auto& curModifier = op.modifier.GetVectorPtr();
2792
97
                if ( curModifier.size() == 0 ) {
2793
22.0k
                    for (size_t j = 0; j < 512; j++) {
2794
22.0k
                        curModifier.push_back(1);
2795
22.0k
                    }
2796
54
                } else {
2797
4.25k
                    for (auto& c : curModifier) {
2798
4.25k
                        c++;
2799
4.25k
                    }
2800
54
                }
2801
97
            }
2802
212
        }
2803
2804
310
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
310
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
310
        const auto& result = results.back();
2811
2812
310
        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
310
        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
310
        if ( options.disableTests == false ) {
2830
310
            tests::test(op, result.second);
2831
310
        }
2832
2833
310
        postprocess(module, op, result);
2834
310
    }
2835
2836
185
    if ( options.noCompare == false ) {
2837
98
        compare(operations, results, data, size);
2838
98
    }
2839
185
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
173
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
173
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
173
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.66k
    do {
2725
2.66k
        auto op = getOp(&parentDs, data, size);
2726
2.66k
        auto module = getModule(parentDs);
2727
2.66k
        if ( module == nullptr ) {
2728
2.33k
            continue;
2729
2.33k
        }
2730
2731
326
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
326
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
2.64k
    } while ( parentDs.Get<bool>() == true );
2738
2739
173
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
159
#if 1
2745
159
    {
2746
159
        std::set<uint64_t> moduleIDs;
2747
159
        for (const auto& m : modules ) {
2748
158
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
158
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
158
            moduleIDs.insert(moduleID);
2756
158
        }
2757
2758
159
        std::set<uint64_t> operationModuleIDs;
2759
206
        for (const auto& op : operations) {
2760
206
            operationModuleIDs.insert(op.first->ID);
2761
206
        }
2762
2763
159
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
159
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
159
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
159
        for (const auto& id : addModuleIDs) {
2768
59
            operations.push_back({ modules.at(id), operations[0].second});
2769
59
        }
2770
159
    }
2771
159
#endif
2772
2773
159
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
159
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
424
    for (size_t i = 0; i < operations.size(); i++) {
2781
265
        auto& operation = operations[i];
2782
2783
265
        auto& module = operation.first;
2784
265
        auto& op = operation.second;
2785
2786
265
        if ( i > 0 ) {
2787
186
            auto& prevModule = operations[i-1].first;
2788
186
            auto& prevOp = operations[i].second;
2789
2790
186
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
93
                auto& curModifier = op.modifier.GetVectorPtr();
2792
93
                if ( curModifier.size() == 0 ) {
2793
23.0k
                    for (size_t j = 0; j < 512; j++) {
2794
23.0k
                        curModifier.push_back(1);
2795
23.0k
                    }
2796
48
                } else {
2797
49.3k
                    for (auto& c : curModifier) {
2798
49.3k
                        c++;
2799
49.3k
                    }
2800
48
                }
2801
93
            }
2802
186
        }
2803
2804
265
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
265
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
265
        const auto& result = results.back();
2811
2812
265
        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
265
        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
265
        if ( options.disableTests == false ) {
2830
265
            tests::test(op, result.second);
2831
265
        }
2832
2833
265
        postprocess(module, op, result);
2834
265
    }
2835
2836
159
    if ( options.noCompare == false ) {
2837
79
        compare(operations, results, data, size);
2838
79
    }
2839
159
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
261
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
261
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
261
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.48k
    do {
2725
3.48k
        auto op = getOp(&parentDs, data, size);
2726
3.48k
        auto module = getModule(parentDs);
2727
3.48k
        if ( module == nullptr ) {
2728
3.07k
            continue;
2729
3.07k
        }
2730
2731
413
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
413
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
3.46k
    } while ( parentDs.Get<bool>() == true );
2738
2739
261
    if ( operations.empty() == true ) {
2740
26
        return;
2741
26
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
235
#if 1
2745
235
    {
2746
235
        std::set<uint64_t> moduleIDs;
2747
235
        for (const auto& m : modules ) {
2748
170
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
170
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
170
            moduleIDs.insert(moduleID);
2756
170
        }
2757
2758
235
        std::set<uint64_t> operationModuleIDs;
2759
235
        for (const auto& op : operations) {
2760
223
            operationModuleIDs.insert(op.first->ID);
2761
223
        }
2762
2763
235
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
235
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
235
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
235
        for (const auto& id : addModuleIDs) {
2768
64
            operations.push_back({ modules.at(id), operations[0].second});
2769
64
        }
2770
235
    }
2771
235
#endif
2772
2773
235
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
235
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
522
    for (size_t i = 0; i < operations.size(); i++) {
2781
287
        auto& operation = operations[i];
2782
2783
287
        auto& module = operation.first;
2784
287
        auto& op = operation.second;
2785
2786
287
        if ( i > 0 ) {
2787
202
            auto& prevModule = operations[i-1].first;
2788
202
            auto& prevOp = operations[i].second;
2789
2790
202
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
108
                auto& curModifier = op.modifier.GetVectorPtr();
2792
108
                if ( curModifier.size() == 0 ) {
2793
28.7k
                    for (size_t j = 0; j < 512; j++) {
2794
28.6k
                        curModifier.push_back(1);
2795
28.6k
                    }
2796
56
                } else {
2797
31.6k
                    for (auto& c : curModifier) {
2798
31.6k
                        c++;
2799
31.6k
                    }
2800
52
                }
2801
108
            }
2802
202
        }
2803
2804
287
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
287
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
287
        const auto& result = results.back();
2811
2812
287
        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
287
        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
287
        if ( options.disableTests == false ) {
2830
287
            tests::test(op, result.second);
2831
287
        }
2832
2833
287
        postprocess(module, op, result);
2834
287
    }
2835
2836
235
    if ( options.noCompare == false ) {
2837
85
        compare(operations, results, data, size);
2838
85
    }
2839
235
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
153
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
153
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
153
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.71k
    do {
2725
2.71k
        auto op = getOp(&parentDs, data, size);
2726
2.71k
        auto module = getModule(parentDs);
2727
2.71k
        if ( module == nullptr ) {
2728
2.43k
            continue;
2729
2.43k
        }
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
14
            break;
2736
14
        }
2737
2.69k
    } while ( parentDs.Get<bool>() == true );
2738
2739
153
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
144
#if 1
2745
144
    {
2746
144
        std::set<uint64_t> moduleIDs;
2747
144
        for (const auto& m : modules ) {
2748
110
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
110
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
110
            moduleIDs.insert(moduleID);
2756
110
        }
2757
2758
144
        std::set<uint64_t> operationModuleIDs;
2759
172
        for (const auto& op : operations) {
2760
172
            operationModuleIDs.insert(op.first->ID);
2761
172
        }
2762
2763
144
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
144
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
144
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
144
        for (const auto& id : addModuleIDs) {
2768
34
            operations.push_back({ modules.at(id), operations[0].second});
2769
34
        }
2770
144
    }
2771
144
#endif
2772
2773
144
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
144
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
350
    for (size_t i = 0; i < operations.size(); i++) {
2781
206
        auto& operation = operations[i];
2782
2783
206
        auto& module = operation.first;
2784
206
        auto& op = operation.second;
2785
2786
206
        if ( i > 0 ) {
2787
151
            auto& prevModule = operations[i-1].first;
2788
151
            auto& prevOp = operations[i].second;
2789
2790
151
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
81
                auto& curModifier = op.modifier.GetVectorPtr();
2792
81
                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
47
                } else {
2797
497
                    for (auto& c : curModifier) {
2798
497
                        c++;
2799
497
                    }
2800
47
                }
2801
81
            }
2802
151
        }
2803
2804
206
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
206
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
206
        const auto& result = results.back();
2811
2812
206
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
206
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
206
        if ( options.disableTests == false ) {
2830
206
            tests::test(op, result.second);
2831
206
        }
2832
2833
206
        postprocess(module, op, result);
2834
206
    }
2835
2836
144
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
144
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
198
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
198
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
198
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.96k
    do {
2725
3.96k
        auto op = getOp(&parentDs, data, size);
2726
3.96k
        auto module = getModule(parentDs);
2727
3.96k
        if ( module == nullptr ) {
2728
3.59k
            continue;
2729
3.59k
        }
2730
2731
374
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
374
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
18
            break;
2736
18
        }
2737
3.95k
    } while ( parentDs.Get<bool>() == true );
2738
2739
198
    if ( operations.empty() == true ) {
2740
28
        return;
2741
28
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
170
#if 1
2745
170
    {
2746
170
        std::set<uint64_t> moduleIDs;
2747
170
        for (const auto& m : modules ) {
2748
128
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
128
            moduleIDs.insert(moduleID);
2756
128
        }
2757
2758
170
        std::set<uint64_t> operationModuleIDs;
2759
207
        for (const auto& op : operations) {
2760
207
            operationModuleIDs.insert(op.first->ID);
2761
207
        }
2762
2763
170
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
170
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
170
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
170
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
170
    }
2771
170
#endif
2772
2773
170
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
170
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
421
    for (size_t i = 0; i < operations.size(); i++) {
2781
251
        auto& operation = operations[i];
2782
2783
251
        auto& module = operation.first;
2784
251
        auto& op = operation.second;
2785
2786
251
        if ( i > 0 ) {
2787
187
            auto& prevModule = operations[i-1].first;
2788
187
            auto& prevOp = operations[i].second;
2789
2790
187
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
113
                auto& curModifier = op.modifier.GetVectorPtr();
2792
113
                if ( curModifier.size() == 0 ) {
2793
31.2k
                    for (size_t j = 0; j < 512; j++) {
2794
31.2k
                        curModifier.push_back(1);
2795
31.2k
                    }
2796
61
                } else {
2797
31.1k
                    for (auto& c : curModifier) {
2798
31.1k
                        c++;
2799
31.1k
                    }
2800
52
                }
2801
113
            }
2802
187
        }
2803
2804
251
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
251
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
251
        const auto& result = results.back();
2811
2812
251
        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
251
        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
251
        if ( options.disableTests == false ) {
2830
251
            tests::test(op, result.second);
2831
251
        }
2832
2833
251
        postprocess(module, op, result);
2834
251
    }
2835
2836
170
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
170
}
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 */