Coverage Report

Created: 2024-02-25 06:16

/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
63.6k
#define RETURN_IF_DISABLED(option, id) if ( !option.Have(id) ) return std::nullopt;
14
15
namespace cryptofuzz {
16
17
0
static std::string GxCoordMutate(const uint64_t curveID, std::string coord) {
18
0
    if ( (PRNG()%10) != 0 ) {
19
0
        return coord;
20
0
    }
21
22
0
    if ( curveID == CF_ECC_CURVE("BLS12_381") ) {
23
0
        const static auto prime = boost::multiprecision::cpp_int("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787");
24
0
        return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str();
25
0
    } else if ( curveID == CF_ECC_CURVE("alt_bn128") ) {
26
0
        const static auto prime = boost::multiprecision::cpp_int("21888242871839275222246405745257275088696311157297823662689037894645226208583");
27
0
        return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str();
28
0
    } else {
29
0
        return coord;
30
0
    }
31
0
}
32
0
static void G1AddToPool(const uint64_t curveID, const std::string& g1_x, const std::string& g1_y) {
33
0
    Pool_CurveBLSG1.Set({ curveID, GxCoordMutate(curveID, g1_x), GxCoordMutate(curveID, g1_y) });
34
0
}
35
36
static void G2AddToPool(const uint64_t curveID,
37
                        const std::string& g2_v,
38
                        const std::string& g2_w,
39
                        const std::string& g2_x,
40
0
                        const std::string& g2_y) {
41
42
0
    Pool_CurveBLSG2.Set({ curveID,
43
0
                                    GxCoordMutate(curveID, g2_v),
44
0
                                    GxCoordMutate(curveID, g2_w),
45
0
                                    GxCoordMutate(curveID, g2_x),
46
0
                                    GxCoordMutate(curveID, g2_y)
47
0
    });
48
0
}
49
50
/* Specialization for operation::Digest */
51
3.11k
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
3.11k
    (void)module;
53
3.11k
    (void)op;
54
55
3.11k
    if ( result.second != std::nullopt ) {
56
1.75k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
1.75k
    }
58
3.11k
}
59
60
3.11k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
3.11k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
3.11k
    return module->OpDigest(op);
64
3.11k
}
65
66
/* Specialization for operation::HMAC */
67
1.84k
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
1.84k
    (void)module;
69
1.84k
    (void)op;
70
71
1.84k
    if ( result.second != std::nullopt ) {
72
872
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
872
    }
74
1.84k
}
75
76
1.84k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
1.84k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
1.84k
    return module->OpHMAC(op);
80
1.84k
}
81
82
/* Specialization for operation::UMAC */
83
2.61k
template<> void ExecutorBase<component::MAC, operation::UMAC>::postprocess(std::shared_ptr<Module> module, operation::UMAC& op, const ExecutorBase<component::MAC, operation::UMAC>::ResultPair& result) const {
84
2.61k
    (void)module;
85
2.61k
    (void)op;
86
87
2.61k
    if ( result.second != std::nullopt ) {
88
1.21k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
1.21k
    }
90
2.61k
}
91
92
2.61k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
2.61k
    return module->OpUMAC(op);
94
2.61k
}
95
96
/* Specialization for operation::CMAC */
97
1.87k
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
1.87k
    (void)module;
99
1.87k
    (void)op;
100
101
1.87k
    if ( result.second != std::nullopt ) {
102
774
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
774
    }
104
1.87k
}
105
106
1.87k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
1.87k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
1.87k
    return module->OpCMAC(op);
110
1.87k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
10.4k
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
10.4k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
10.4k
    if ( result.second != std::nullopt ) {
119
3.43k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
3.43k
        if ( result.second->tag != std::nullopt ) {
121
1.68k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
1.68k
        }
123
3.43k
    }
124
125
10.4k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
3.02k
        using fuzzing::datasource::ID;
127
128
3.02k
        bool tryDecrypt = true;
129
130
3.02k
        if ( module->ID == CF_MODULE("OpenSSL") ) {
131
0
            switch ( op.cipher.cipherType.Get() ) {
132
0
                case    ID("Cryptofuzz/Cipher/AES_128_OCB"):
133
0
                case    ID("Cryptofuzz/Cipher/AES_256_OCB"):
134
0
                    tryDecrypt = false;
135
0
                    break;
136
0
                case    ID("Cryptofuzz/Cipher/AES_128_GCM"):
137
0
                case    ID("Cryptofuzz/Cipher/AES_192_GCM"):
138
0
                case    ID("Cryptofuzz/Cipher/AES_256_GCM"):
139
0
                case    ID("Cryptofuzz/Cipher/AES_128_CCM"):
140
0
                case    ID("Cryptofuzz/Cipher/AES_192_CCM"):
141
0
                case    ID("Cryptofuzz/Cipher/AES_256_CCM"):
142
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_CCM"):
143
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_CCM"):
144
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_CCM"):
145
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_GCM"):
146
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_GCM"):
147
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_GCM"):
148
0
                    if ( op.tagSize == std::nullopt ) {
149
                        /* OpenSSL fails to decrypt its own CCM and GCM ciphertexts if
150
                         * a tag is not included
151
                         */
152
0
                        tryDecrypt = false;
153
0
                    }
154
0
                    break;
155
0
            }
156
0
        }
157
158
3.02k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
3.02k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
3.02k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
3.02k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
3.02k
                    op.cleartext.GetSize() + 32,
171
172
3.02k
                    op.aad,
173
174
                    /* Empty modifier */
175
3.02k
                    {});
176
177
3.02k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
3.02k
            if ( cleartext == std::nullopt ) {
180
                /* Decryption failed, OpSymmetricDecrypt() returned std::nullopt */
181
0
                printf("Cannot decrypt ciphertext\n\n");
182
0
                printf("Operation:\n%s\n", op.ToString().c_str());
183
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
184
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
185
0
                abort(
186
0
                        {module->name},
187
0
                        op.Name(),
188
0
                        op.GetAlgorithmString(),
189
0
                        "cannot decrypt ciphertext"
190
0
                );
191
3.02k
            } else if ( cleartext->Get() != op.cleartext.Get() ) {
192
                /* Decryption ostensibly succeeded, but the cleartext returned by OpSymmetricDecrypt()
193
                 * does not match to original cleartext */
194
195
0
                printf("Cannot decrypt ciphertext (but decryption ostensibly succeeded)\n\n");
196
0
                printf("Operation:\n%s\n", op.ToString().c_str());
197
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
198
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
199
0
                printf("Purported cleartext: %s\n", util::HexDump(cleartext->Get()).c_str());
200
0
                abort(
201
0
                        {module->name},
202
0
                        op.Name(),
203
0
                        op.GetAlgorithmString(),
204
0
                        "cannot decrypt ciphertext"
205
0
                );
206
0
            }
207
3.02k
        }
208
3.02k
    }
209
10.4k
}
210
211
10.4k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
10.4k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
10.4k
    return module->OpSymmetricEncrypt(op);
215
10.4k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
9.16k
template<> void ExecutorBase<component::MAC, operation::SymmetricDecrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op, const ExecutorBase<component::MAC, operation::SymmetricDecrypt>::ResultPair& result) const {
219
9.16k
    (void)module;
220
9.16k
    (void)op;
221
222
9.16k
    if ( result.second != std::nullopt ) {
223
944
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
944
    }
225
9.16k
}
226
227
9.16k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
9.16k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
9.16k
    return module->OpSymmetricDecrypt(op);
231
9.16k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
654
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
654
    (void)module;
236
654
    (void)op;
237
238
654
    if ( result.second != std::nullopt ) {
239
230
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
230
    }
241
654
}
242
243
654
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
654
    return module->OpKDF_SCRYPT(op);
245
654
}
246
247
/* Specialization for operation::KDF_HKDF */
248
5.14k
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
5.14k
    (void)module;
250
5.14k
    (void)op;
251
252
5.14k
    if ( result.second != std::nullopt ) {
253
2.27k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
2.27k
    }
255
5.14k
}
256
257
5.14k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
5.14k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
5.14k
    return module->OpKDF_HKDF(op);
261
5.14k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
323
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
323
    (void)module;
266
323
    (void)op;
267
268
323
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
323
}
272
273
323
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
323
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
323
    return module->OpKDF_PBKDF(op);
277
323
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
296
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
296
    (void)module;
282
296
    (void)op;
283
284
296
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
296
}
288
289
296
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
296
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
296
    return module->OpKDF_PBKDF1(op);
293
296
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
1.77k
template<> void ExecutorBase<component::Key, operation::KDF_PBKDF2>::postprocess(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op, const ExecutorBase<component::Key, operation::KDF_PBKDF2>::ResultPair& result) const {
297
1.77k
    (void)module;
298
1.77k
    (void)op;
299
300
1.77k
    if ( result.second != std::nullopt ) {
301
702
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
702
    }
303
1.77k
}
304
305
1.77k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
1.77k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
1.77k
    return module->OpKDF_PBKDF2(op);
309
1.77k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
586
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
586
    (void)module;
314
586
    (void)op;
315
316
586
    if ( result.second != std::nullopt ) {
317
279
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
279
    }
319
586
}
320
321
586
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
586
    return module->OpKDF_ARGON2(op);
323
586
}
324
325
/* Specialization for operation::KDF_SSH */
326
298
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
298
    (void)module;
328
298
    (void)op;
329
330
298
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
298
}
334
335
298
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
298
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
298
    return module->OpKDF_SSH(op);
339
298
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
366
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
366
    (void)module;
344
366
    (void)op;
345
346
366
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
366
}
350
351
366
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
366
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
366
    return module->OpKDF_TLS1_PRF(op);
355
366
}
356
357
/* Specialization for operation::KDF_X963 */
358
302
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
302
    (void)module;
360
302
    (void)op;
361
362
302
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
302
}
366
367
302
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
302
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
302
    return module->OpKDF_X963(op);
371
302
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
195
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
195
    (void)module;
376
195
    (void)op;
377
378
195
    if ( result.second != std::nullopt ) {
379
39
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
39
    }
381
195
}
382
383
195
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
195
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
195
    return module->OpKDF_BCRYPT(op);
387
195
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
1.37k
template<> void ExecutorBase<component::Key, operation::KDF_SP_800_108>::postprocess(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op, const ExecutorBase<component::Key, operation::KDF_SP_800_108>::ResultPair& result) const {
391
1.37k
    (void)module;
392
1.37k
    (void)op;
393
394
1.37k
    if ( result.second != std::nullopt ) {
395
582
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
582
    }
397
1.37k
}
398
399
1.37k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SP_800_108>::callModule(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op) const {
400
1.37k
    if ( op.mech.mode == true ) {
401
843
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
843
    }
403
404
1.37k
    return module->OpKDF_SP_800_108(op);
405
1.37k
}
406
407
/* Specialization for operation::KDF_SRTP */
408
342
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
342
    (void)module;
410
342
    (void)op;
411
342
    (void)result;
412
342
}
413
414
342
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
342
    return module->OpKDF_SRTP(op);
416
342
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
242
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
242
    (void)module;
421
242
    (void)op;
422
242
    (void)result;
423
242
}
424
425
242
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
242
    return module->OpKDF_SRTCP(op);
427
242
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
1.69k
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
1.69k
    (void)module;
432
433
1.69k
    if ( result.second != std::nullopt  ) {
434
383
        const auto curveID = op.curveType.Get();
435
383
        const auto privkey = op.priv.ToTrimmedString();
436
383
        const auto pub_x = result.second->first.ToTrimmedString();
437
383
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
383
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
383
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
383
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
383
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
383
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
383
    }
446
1.69k
}
447
448
1.69k
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
1.69k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
1.69k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
1.69k
    if ( size == 0 || size > 4096 ) {
454
0
        return std::nullopt;
455
0
    }
456
457
1.69k
    return module->OpECC_PrivateToPublic(op);
458
1.69k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
623
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
623
    (void)module;
463
623
    (void)op;
464
623
    (void)result;
465
623
}
466
467
623
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
623
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
623
    return module->OpECC_ValidatePubkey(op);
471
623
}
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
32
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
478
32
    (void)operations;
479
32
    (void)results;
480
32
    (void)data;
481
32
    (void)size;
482
32
}
483
484
1.23k
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
1.23k
    (void)module;
486
487
1.23k
    if ( result.second != std::nullopt  ) {
488
248
        const auto curveID = op.curveType.Get();
489
248
        const auto privkey = result.second->priv.ToTrimmedString();
490
248
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
248
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
248
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
248
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
248
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
248
        {
498
248
            auto opValidate = operation::ECC_ValidatePubkey(
499
248
                    op.curveType,
500
248
                    result.second->pub,
501
248
                    op.modifier);
502
503
248
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
248
            CF_ASSERT(
505
248
                    validateResult == std::nullopt ||
506
248
                    *validateResult == true,
507
248
                    "Cannot validate generated public key");
508
248
        }
509
248
    }
510
1.23k
}
511
512
1.23k
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
1.23k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
1.23k
    return module->OpECC_GenerateKeyPair(op);
516
1.23k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
117
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
117
    (void)module;
521
522
117
    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
117
}
565
566
117
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
117
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
117
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
117
    const size_t size = op.priv.ToTrimmedString().size();
571
572
117
    if ( size == 0 || size > 4096 ) {
573
0
        return std::nullopt;
574
0
    }
575
576
117
    return module->OpECCSI_Sign(op);
577
117
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
1.17k
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
1.17k
    (void)module;
582
583
1.17k
    if ( result.second != std::nullopt  ) {
584
492
        const auto curveID = op.curveType.Get();
585
492
        const auto cleartext = op.cleartext.ToHex();
586
492
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
492
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
492
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
492
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
492
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
492
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
492
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
492
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
492
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
492
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
492
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
492
        {
601
492
            auto opVerify = operation::ECDSA_Verify(
602
492
                    op,
603
492
                    *(result.second),
604
492
                    op.modifier);
605
606
492
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
492
            CF_ASSERT(
608
492
                    verifyResult == std::nullopt ||
609
492
                    *verifyResult == true,
610
492
                    "Cannot verify generated signature");
611
492
        }
612
492
    }
613
1.17k
}
614
615
1.17k
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
1.17k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
1.17k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
1.17k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
1.17k
    if ( size == 0 || size > 4096 ) {
622
0
        return std::nullopt;
623
0
    }
624
625
1.17k
    return module->OpECDSA_Sign(op);
626
1.17k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
328
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
328
    (void)module;
631
632
328
    if ( result.second != std::nullopt  ) {
633
48
        const auto curveID = op.curveType.Get();
634
48
        const auto cleartext = op.cleartext.ToHex();
635
48
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
48
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
48
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
48
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
48
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
48
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
48
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
48
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
48
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
48
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
48
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
48
    }
649
328
}
650
651
328
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
328
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
328
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
328
    const size_t size = op.priv.ToTrimmedString().size();
656
657
328
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
328
    return module->OpECGDSA_Sign(op);
662
328
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
152
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
152
    (void)module;
667
668
152
    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
152
}
686
687
152
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
152
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
152
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
152
    const size_t size = op.priv.ToTrimmedString().size();
692
693
152
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
152
    return module->OpECRDSA_Sign(op);
698
152
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
109
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
109
    (void)module;
703
704
109
    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
109
}
722
723
109
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
109
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
109
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
109
    const size_t size = op.priv.ToTrimmedString().size();
728
729
109
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
109
    return module->OpSchnorr_Sign(op);
734
109
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
94
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
94
    (void)module;
739
94
    (void)op;
740
94
    (void)result;
741
94
}
742
743
94
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
94
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
94
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
94
    return module->OpECCSI_Verify(op);
748
94
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
692
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
692
    (void)module;
753
692
    (void)op;
754
692
    (void)result;
755
692
}
756
757
692
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
692
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
692
    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
692
    return module->OpECDSA_Verify(op);
772
692
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
433
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
433
    (void)module;
777
433
    (void)op;
778
433
    (void)result;
779
433
}
780
781
433
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
433
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
433
    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
433
    return module->OpECGDSA_Verify(op);
796
433
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
100
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
100
    (void)module;
801
100
    (void)op;
802
100
    (void)result;
803
100
}
804
805
100
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
100
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
100
    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
100
    return module->OpECRDSA_Verify(op);
820
100
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
129
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
129
    (void)module;
825
129
    (void)op;
826
129
    (void)result;
827
129
}
828
829
129
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
129
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
129
    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
129
    return module->OpSchnorr_Verify(op);
844
129
}
845
846
1.26k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Recover& op, const ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::ResultPair& result) const {
847
1.26k
    (void)module;
848
1.26k
    (void)op;
849
1.26k
    (void)result;
850
1.26k
}
851
852
1.26k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
853
1.26k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
1.26k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
1.26k
    return module->OpECDSA_Recover(op);
857
1.26k
}
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
497
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
497
    (void)module;
869
497
    (void)op;
870
497
    (void)result;
871
497
}
872
873
497
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
497
    const std::vector<size_t> sizes = {
875
497
        op.parameters.p.ToTrimmedString().size(),
876
497
        op.parameters.q.ToTrimmedString().size(),
877
497
        op.parameters.g.ToTrimmedString().size(),
878
497
        op.pub.ToTrimmedString().size(),
879
497
        op.signature.first.ToTrimmedString().size(),
880
497
        op.signature.second.ToTrimmedString().size(),
881
497
    };
882
883
2.98k
    for (const auto& size : sizes) {
884
2.98k
        if ( size == 0 || size > 4096 ) {
885
0
            return std::nullopt;
886
0
        }
887
2.98k
    }
888
889
497
    return module->OpDSA_Verify(op);
890
497
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
35
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
35
    (void)operations;
897
35
    (void)results;
898
35
    (void)data;
899
35
    (void)size;
900
35
}
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
127
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
127
    (void)module;
910
127
    (void)op;
911
127
    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
127
}
934
935
127
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
127
    const std::vector<size_t> sizes = {
937
127
        op.parameters.p.ToTrimmedString().size(),
938
127
        op.parameters.q.ToTrimmedString().size(),
939
127
        op.parameters.g.ToTrimmedString().size(),
940
127
        op.priv.ToTrimmedString().size(),
941
127
    };
942
943
508
    for (const auto& size : sizes) {
944
508
        if ( size == 0 || size > 4096 ) {
945
0
            return std::nullopt;
946
0
        }
947
508
    }
948
949
127
    return module->OpDSA_Sign(op);
950
127
}
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
133
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
133
    (void)result;
963
133
    (void)module;
964
133
    (void)op;
965
133
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
133
}
969
970
133
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
133
    return module->OpDSA_PrivateToPublic(op);
972
133
}
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
36
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
36
    (void)operations;
980
36
    (void)results;
981
36
    (void)data;
982
36
    (void)size;
983
36
}
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
132
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
132
    (void)result;
994
132
    (void)module;
995
132
    (void)op;
996
132
    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
132
}
1003
1004
132
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
132
    const std::vector<size_t> sizes = {
1006
132
        op.p.ToTrimmedString().size(),
1007
132
        op.q.ToTrimmedString().size(),
1008
132
        op.g.ToTrimmedString().size(),
1009
132
    };
1010
1011
396
    for (const auto& size : sizes) {
1012
396
        if ( size == 0 || size > 4096 ) {
1013
0
            return std::nullopt;
1014
0
        }
1015
396
    }
1016
1017
132
    return module->OpDSA_GenerateKeyPair(op);
1018
132
}
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
32
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
32
    (void)operations;
1026
32
    (void)results;
1027
32
    (void)data;
1028
32
    (void)size;
1029
32
}
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
116
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op, const ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::ResultPair& result) const {
1039
116
    (void)result;
1040
116
    (void)module;
1041
116
    (void)op;
1042
116
    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
116
}
1054
1055
116
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1056
116
    return module->OpDSA_GenerateParameters(op);
1057
116
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
96
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
96
    (void)module;
1062
96
    (void)op;
1063
96
    (void)result;
1064
96
}
1065
1066
96
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
96
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
96
    return module->OpECDH_Derive(op);
1070
96
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
36
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
36
    (void)operations;
1076
36
    (void)results;
1077
36
    (void)data;
1078
36
    (void)size;
1079
36
}
1080
122
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
122
    (void)module;
1082
122
    (void)op;
1083
122
    (void)result;
1084
122
}
1085
1086
122
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
122
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
122
    return module->OpECIES_Encrypt(op);
1090
122
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
123
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
123
    (void)module;
1095
123
    (void)op;
1096
123
    (void)result;
1097
123
}
1098
1099
123
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
123
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
123
    return module->OpECIES_Decrypt(op);
1103
123
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
219
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
219
    (void)module;
1108
1109
219
    if ( result.second != std::nullopt  ) {
1110
39
        const auto curveID = op.curveType.Get();
1111
39
        const auto x = result.second->first.ToTrimmedString();
1112
39
        const auto y = result.second->second.ToTrimmedString();
1113
1114
39
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
39
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
39
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
39
    }
1119
219
}
1120
1121
219
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
219
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
219
    return module->OpECC_Point_Add(op);
1125
219
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
254
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
254
    (void)module;
1130
1131
254
    if ( result.second != std::nullopt  ) {
1132
28
        const auto curveID = op.curveType.Get();
1133
28
        const auto x = result.second->first.ToTrimmedString();
1134
28
        const auto y = result.second->second.ToTrimmedString();
1135
1136
28
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
28
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
28
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
28
    }
1141
254
}
1142
1143
254
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
254
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
254
    return module->OpECC_Point_Sub(op);
1147
254
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
1.41k
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.41k
    (void)module;
1152
1153
1.41k
    if ( result.second != std::nullopt  ) {
1154
115
        const auto curveID = op.curveType.Get();
1155
115
        const auto x = result.second->first.ToTrimmedString();
1156
115
        const auto y = result.second->second.ToTrimmedString();
1157
1158
115
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
115
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
115
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
115
    }
1163
1.41k
}
1164
1165
1.41k
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.41k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
1.41k
    return module->OpECC_Point_Mul(op);
1169
1.41k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
212
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
212
    (void)module;
1174
1175
212
    if ( result.second != std::nullopt  ) {
1176
36
        const auto curveID = op.curveType.Get();
1177
36
        const auto x = result.second->first.ToTrimmedString();
1178
36
        const auto y = result.second->second.ToTrimmedString();
1179
1180
36
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
36
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
36
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
36
    }
1185
212
}
1186
1187
212
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
212
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
212
    return module->OpECC_Point_Neg(op);
1191
212
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
200
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
200
    (void)module;
1196
1197
200
    if ( result.second != std::nullopt  ) {
1198
23
        const auto curveID = op.curveType.Get();
1199
23
        const auto x = result.second->first.ToTrimmedString();
1200
23
        const auto y = result.second->second.ToTrimmedString();
1201
1202
23
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
23
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
23
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
23
    }
1207
200
}
1208
1209
200
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
200
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
200
    return module->OpECC_Point_Dbl(op);
1213
200
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
202
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
202
    (void)module;
1218
202
    (void)result;
1219
202
    (void)op;
1220
202
}
1221
1222
202
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
202
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
202
    return module->OpECC_Point_Cmp(op);
1226
202
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
422
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
422
    (void)module;
1231
422
    (void)op;
1232
422
    (void)result;
1233
422
}
1234
1235
422
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
422
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
417
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
417
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
417
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
417
    return module->OpDH_Derive(op);
1242
417
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
113
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
113
    (void)result;
1247
113
    (void)op;
1248
113
    (void)module;
1249
1250
113
    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
113
}
1258
1259
113
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
113
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
113
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
113
    return module->OpDH_GenerateKeyPair(op);
1264
113
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
9.05k
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
9.05k
    (void)module;
1269
9.05k
    (void)op;
1270
1271
9.05k
    if ( result.second != std::nullopt  ) {
1272
3.35k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
3.35k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
3.35k
            Pool_Bignum.Set(bignum);
1276
3.35k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
706
                Pool_Bignum_Primes.Set(bignum);
1278
706
            }
1279
3.35k
        }
1280
3.35k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
96
            if ( bignum == "1" ) {
1282
55
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
55
            }
1284
96
        }
1285
3.35k
    }
1286
9.05k
}
1287
1288
9.05k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
9.05k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
9.05k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
9.05k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
9.04k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
9.03k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
9.02k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
864
        return std::nullopt;
1299
864
    }
1300
1301
8.16k
    switch ( op.calcOp.Get() ) {
1302
36
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
36
            if ( op.bn1.GetSize() > 4 ) {
1305
6
                return std::nullopt;
1306
6
            }
1307
30
            break;
1308
69
        case    CF_CALCOP("Exp(A,B)"):
1309
69
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
20
                return std::nullopt;
1311
20
            }
1312
49
            break;
1313
49
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
24
            if ( op.bn1.GetSize() > 4 ) {
1315
13
                return std::nullopt;
1316
13
            }
1317
11
            break;
1318
59
        case    CF_CALCOP("Exp2(A)"):
1319
59
            if ( op.bn0.GetSize() > 4 ) {
1320
10
                return std::nullopt;
1321
10
            }
1322
49
            break;
1323
8.16k
    }
1324
1325
8.11k
    return module->OpBignumCalc(op);
1326
8.16k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
221
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
221
    (void)module;
1331
221
    (void)op;
1332
1333
221
    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
221
}
1345
1346
221
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
221
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
221
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
212
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
212
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
203
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
194
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
183
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
179
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
164
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
155
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
155
    return module->OpBignumCalc_Fp2(op);
1364
155
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
737
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
737
    (void)module;
1369
737
    (void)op;
1370
1371
737
    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
737
}
1400
1401
737
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
737
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
737
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
726
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
720
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
709
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
702
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
693
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
682
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
671
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
654
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
643
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
635
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
624
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
613
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
605
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
594
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
585
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
575
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
566
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
557
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
551
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
541
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
532
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
521
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
514
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
503
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
492
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
482
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
476
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
467
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
461
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
450
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
441
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
430
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
423
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
412
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
402
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
392
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
381
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
370
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
359
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
348
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
339
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
330
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
319
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
313
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
302
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
292
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
282
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
271
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
271
    return module->OpBignumCalc_Fp12(op);
1462
271
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
132
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
132
    (void)module;
1467
1468
132
    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
132
}
1479
1480
132
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
132
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
132
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
132
    if ( size == 0 || size > 4096 ) {
1486
0
        return std::nullopt;
1487
0
    }
1488
1489
132
    return module->OpBLS_PrivateToPublic(op);
1490
132
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
173
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
173
    (void)module;
1495
173
    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
173
}
1510
1511
173
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
173
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
173
    if ( size == 0 || size > 4096 ) {
1515
0
        return std::nullopt;
1516
0
    }
1517
1518
173
    return module->OpBLS_PrivateToPublic_G2(op);
1519
173
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
106
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
106
    (void)module;
1524
1525
106
    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
106
}
1553
1554
106
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
106
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
106
    if ( size == 0 || size > 4096 ) {
1558
0
        return std::nullopt;
1559
0
    }
1560
1561
106
    return module->OpBLS_Sign(op);
1562
106
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
114
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
114
    (void)module;
1567
114
    (void)op;
1568
114
    (void)result;
1569
114
}
1570
1571
114
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
114
    return module->OpBLS_Verify(op);
1588
114
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
151
template<> void ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchSign& op, const ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::ResultPair& result) const {
1592
151
    (void)module;
1593
151
    (void)op;
1594
1595
151
    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
151
}
1624
1625
151
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1626
151
    return module->OpBLS_BatchSign(op);
1627
151
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
138
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
138
    (void)module;
1632
138
    (void)op;
1633
138
    (void)result;
1634
138
}
1635
1636
138
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
138
    return module->OpBLS_BatchVerify(op);
1638
138
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
121
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
121
    (void)module;
1643
121
    (void)op;
1644
121
    (void)result;
1645
121
}
1646
1647
121
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
121
    return module->OpBLS_Aggregate_G1(op);
1649
121
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
130
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
130
    (void)module;
1654
130
    (void)op;
1655
130
    (void)result;
1656
130
}
1657
1658
130
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
130
    return module->OpBLS_Aggregate_G2(op);
1660
130
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
131
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
131
    (void)module;
1665
131
    (void)op;
1666
1667
131
    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
131
}
1684
1685
131
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
131
    return module->OpBLS_Pairing(op);
1687
131
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
120
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
120
    (void)module;
1692
120
    (void)op;
1693
1694
120
    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
120
}
1711
1712
120
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
120
    return module->OpBLS_MillerLoop(op);
1714
120
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
120
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
120
    (void)module;
1719
120
    (void)op;
1720
1721
120
    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
120
}
1738
1739
120
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
120
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
120
    return module->OpBLS_FinalExp(op);
1742
120
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
116
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
116
    (void)module;
1747
1748
116
    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
116
}
1759
1760
116
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
116
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
116
    return module->OpBLS_HashToG1(op);
1763
116
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
123
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
123
    (void)module;
1768
1769
123
    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
123
}
1780
1781
123
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
123
    return module->OpBLS_MapToG1(op);
1783
123
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
115
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
115
    (void)module;
1788
1789
115
    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
115
}
1804
1805
115
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
115
    return module->OpBLS_MapToG2(op);
1807
115
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
142
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
142
    (void)module;
1812
142
    (void)op;
1813
142
    (void)result;
1814
142
}
1815
1816
142
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
142
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
142
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
142
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
142
    return module->OpBLS_IsG1OnCurve(op);
1822
142
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
130
template<> void ExecutorBase<bool, operation::BLS_IsG2OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG2OnCurve>::ResultPair& result) const {
1826
130
    (void)module;
1827
130
    (void)op;
1828
130
    (void)result;
1829
130
}
1830
1831
130
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
130
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
130
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
130
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
130
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
130
    return module->OpBLS_IsG2OnCurve(op);
1838
130
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
129
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
129
    (void)module;
1843
1844
129
    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
129
}
1857
1858
129
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
129
    return module->OpBLS_GenerateKeyPair(op);
1860
129
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
141
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
141
    (void)module;
1865
1866
141
    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
141
}
1877
1878
141
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
141
    return module->OpBLS_Decompress_G1(op);
1880
141
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
125
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
125
    (void)module;
1885
125
    (void)op;
1886
1887
125
    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
125
}
1893
1894
125
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
125
    return module->OpBLS_Compress_G1(op);
1896
125
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
121
template<> void ExecutorBase<component::G2, operation::BLS_Decompress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op, const ExecutorBase<component::G2, operation::BLS_Decompress_G2>::ResultPair& result) const {
1900
121
    (void)module;
1901
1902
121
    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
121
}
1917
1918
121
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1919
121
    return module->OpBLS_Decompress_G2(op);
1920
121
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
102
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
102
    (void)module;
1925
1926
102
    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
102
}
1937
1938
102
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
102
    return module->OpBLS_Compress_G2(op);
1940
102
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
129
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
129
    (void)module;
1945
1946
129
    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
129
}
1957
1958
129
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
129
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
129
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
129
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
129
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
129
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
129
    return module->OpBLS_G1_Add(op);
1966
129
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
143
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
143
    (void)module;
1971
1972
143
    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
143
}
1983
1984
143
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
143
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
143
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
143
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
143
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
143
    return module->OpBLS_G1_Mul(op);
1991
143
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
235
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
235
    (void)module;
1996
235
    (void)op;
1997
235
    (void)result;
1998
235
}
1999
2000
235
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
235
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
235
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
226
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
217
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
217
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
217
    return module->OpBLS_G1_IsEq(op);
2008
217
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
146
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
146
    (void)module;
2013
2014
146
    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
146
}
2025
2026
146
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
146
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
146
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
146
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
146
    return module->OpBLS_G1_Neg(op);
2032
146
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
224
template<> void ExecutorBase<component::G2, operation::BLS_G2_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Add& op, const ExecutorBase<component::G2, operation::BLS_G2_Add>::ResultPair& result) const {
2036
224
    (void)module;
2037
2038
224
    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
224
}
2053
2054
224
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
2055
224
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
224
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
224
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
224
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
214
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
205
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
194
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
186
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
177
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
168
    return module->OpBLS_G2_Add(op);
2066
177
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
106
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
106
    (void)module;
2071
2072
106
    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
106
}
2087
2088
106
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
106
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
106
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
106
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
106
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
106
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
106
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
106
    return module->OpBLS_G2_Mul(op);
2097
106
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
187
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
187
    (void)module;
2102
187
    (void)op;
2103
187
    (void)result;
2104
187
}
2105
2106
187
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
187
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
187
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
176
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
168
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
159
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
148
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
148
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
148
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
148
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
148
    return module->OpBLS_G2_IsEq(op);
2118
148
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
132
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
132
    (void)module;
2123
2124
132
    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
132
}
2139
2140
132
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
132
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
132
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
132
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
132
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
132
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
132
    return module->OpBLS_G2_Neg(op);
2148
132
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
186
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
186
    (void)module;
2153
2154
186
    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
186
}
2165
2166
186
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
186
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
1.56k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
1.56k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
1.56k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
1.56k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
1.56k
    }
2174
2175
186
    return module->OpBLS_G1_MultiExp(op);
2176
186
}
2177
2178
/* Specialization for operation::Misc */
2179
96
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
96
    (void)module;
2181
96
    (void)op;
2182
96
    (void)result;
2183
96
}
2184
2185
96
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
96
    return module->OpMisc(op);
2187
96
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
126
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
126
    (void)module;
2192
2193
126
    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
126
}
2208
2209
126
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
126
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
126
    return module->OpBLS_HashToG2(op);
2212
126
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
23
{ }
2217
22
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
22
    this->modulo = component::Bignum(modulo);
2219
22
}
2220
2221
ExecutorBignumCalc_Mod_BLS12_381_R::ExecutorBignumCalc_Mod_BLS12_381_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2222
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
1
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
1
}
2225
2226
ExecutorBignumCalc_Mod_BLS12_381_P::ExecutorBignumCalc_Mod_BLS12_381_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2227
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
1
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
1
}
2230
2231
ExecutorBignumCalc_Mod_BLS12_377_R::ExecutorBignumCalc_Mod_BLS12_377_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2232
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
1
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
1
}
2235
2236
ExecutorBignumCalc_Mod_BLS12_377_P::ExecutorBignumCalc_Mod_BLS12_377_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2237
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
1
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
1
}
2240
2241
ExecutorBignumCalc_Mod_BN128_R::ExecutorBignumCalc_Mod_BN128_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2242
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
1
}
2245
2246
ExecutorBignumCalc_Mod_BN128_P::ExecutorBignumCalc_Mod_BN128_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2247
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
1
}
2250
2251
ExecutorBignumCalc_Mod_Vesta_R::ExecutorBignumCalc_Mod_Vesta_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2252
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
1
}
2255
2256
ExecutorBignumCalc_Mod_Vesta_P::ExecutorBignumCalc_Mod_Vesta_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2257
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
1
}
2260
2261
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2262
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
1
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
1
}
2265
2266
ExecutorBignumCalc_Mod_Edwards_R::ExecutorBignumCalc_Mod_Edwards_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2267
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
1
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
1
}
2270
2271
ExecutorBignumCalc_Mod_Edwards_P::ExecutorBignumCalc_Mod_Edwards_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2272
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
1
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
1
}
2275
2276
ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2277
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
1
    CF_NORET(SetModulo("18446744069414584321"));
2279
1
}
2280
2281
ExecutorBignumCalc_Mod_MNT4_R::ExecutorBignumCalc_Mod_MNT4_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2282
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
1
}
2285
2286
ExecutorBignumCalc_Mod_MNT4_P::ExecutorBignumCalc_Mod_MNT4_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2287
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
1
}
2290
2291
ExecutorBignumCalc_Mod_MNT6_R::ExecutorBignumCalc_Mod_MNT6_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2292
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
1
}
2295
2296
ExecutorBignumCalc_Mod_MNT6_P::ExecutorBignumCalc_Mod_MNT6_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2297
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
1
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
1
}
2300
2301
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2302
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
1
    CF_NORET(SetModulo("18446744073709551616"));
2304
1
}
2305
2306
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2307
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
1
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
1
}
2310
2311
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2312
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
1
}
2315
2316
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2317
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
1
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
1
}
2320
2321
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2322
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
1
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
1
}
2325
2326
ExecutorBignumCalc_Mod_SECP256K1_P::ExecutorBignumCalc_Mod_SECP256K1_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2327
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
1
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
1
{ }
2334
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2335
0
    this->modulo = component::Bignum(modulo);
2336
0
}
2337
2338
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2339
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
1
{ }
2341
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2342
0
    this->modulo = component::Bignum(modulo);
2343
0
}
2344
2345
template <class ResultType, class OperationType>
2346
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2347
    operationID(operationID),
2348
    modules(modules),
2349
    options(options)
2350
107
{
2351
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
23
{
2351
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2350
1
{
2351
1
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
131
template<> void ExecutorBase<bool, operation::SR25519_Verify>::postprocess(std::shared_ptr<Module> module, operation::SR25519_Verify& op, const ExecutorBase<bool, operation::SR25519_Verify>::ResultPair& result) const {
2355
131
    (void)module;
2356
131
    (void)op;
2357
131
    (void)result;
2358
131
}
2359
2360
131
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
131
    return module->OpSR25519_Verify(op);
2362
131
}
2363
2364
template <class ResultType, class OperationType>
2365
107
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
23
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
1
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
19.2k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19.2k
    ResultSet ret;
2372
2373
66.1k
    for (const auto& result : results) {
2374
66.1k
        if ( result.second == std::nullopt ) {
2375
47.0k
            continue;
2376
47.0k
        }
2377
2378
19.0k
        ret.push_back(result);
2379
19.0k
    }
2380
2381
19.2k
    return ret;
2382
19.2k
}
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
1.07k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.07k
    ResultSet ret;
2372
2373
3.11k
    for (const auto& result : results) {
2374
3.11k
        if ( result.second == std::nullopt ) {
2375
1.36k
            continue;
2376
1.36k
        }
2377
2378
1.75k
        ret.push_back(result);
2379
1.75k
    }
2380
2381
1.07k
    return ret;
2382
1.07k
}
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
565
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
565
    ResultSet ret;
2372
2373
1.84k
    for (const auto& result : results) {
2374
1.84k
        if ( result.second == std::nullopt ) {
2375
972
            continue;
2376
972
        }
2377
2378
872
        ret.push_back(result);
2379
872
    }
2380
2381
565
    return ret;
2382
565
}
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
490
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
490
    ResultSet ret;
2372
2373
2.61k
    for (const auto& result : results) {
2374
2.61k
        if ( result.second == std::nullopt ) {
2375
1.39k
            continue;
2376
1.39k
        }
2377
2378
1.21k
        ret.push_back(result);
2379
1.21k
    }
2380
2381
490
    return ret;
2382
490
}
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
478
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
478
    ResultSet ret;
2372
2373
1.87k
    for (const auto& result : results) {
2374
1.87k
        if ( result.second == std::nullopt ) {
2375
1.10k
            continue;
2376
1.10k
        }
2377
2378
774
        ret.push_back(result);
2379
774
    }
2380
2381
478
    return ret;
2382
478
}
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
2.39k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.39k
    ResultSet ret;
2372
2373
10.4k
    for (const auto& result : results) {
2374
10.4k
        if ( result.second == std::nullopt ) {
2375
6.97k
            continue;
2376
6.97k
        }
2377
2378
3.43k
        ret.push_back(result);
2379
3.43k
    }
2380
2381
2.39k
    return ret;
2382
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
2.44k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.44k
    ResultSet ret;
2372
2373
9.16k
    for (const auto& result : results) {
2374
9.16k
        if ( result.second == std::nullopt ) {
2375
8.22k
            continue;
2376
8.22k
        }
2377
2378
944
        ret.push_back(result);
2379
944
    }
2380
2381
2.44k
    return ret;
2382
2.44k
}
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
116
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
116
    ResultSet ret;
2372
2373
654
    for (const auto& result : results) {
2374
654
        if ( result.second == std::nullopt ) {
2375
424
            continue;
2376
424
        }
2377
2378
230
        ret.push_back(result);
2379
230
    }
2380
2381
116
    return ret;
2382
116
}
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.48k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.48k
    ResultSet ret;
2372
2373
5.14k
    for (const auto& result : results) {
2374
5.14k
        if ( result.second == std::nullopt ) {
2375
2.87k
            continue;
2376
2.87k
        }
2377
2378
2.27k
        ret.push_back(result);
2379
2.27k
    }
2380
2381
1.48k
    return ret;
2382
1.48k
}
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
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
62
    ResultSet ret;
2372
2373
366
    for (const auto& result : results) {
2374
366
        if ( result.second == std::nullopt ) {
2375
366
            continue;
2376
366
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
62
    return ret;
2382
62
}
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
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
323
    for (const auto& result : results) {
2374
323
        if ( result.second == std::nullopt ) {
2375
323
            continue;
2376
323
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
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
50
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
50
    ResultSet ret;
2372
2373
296
    for (const auto& result : results) {
2374
296
        if ( result.second == std::nullopt ) {
2375
296
            continue;
2376
296
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
50
    return ret;
2382
50
}
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
544
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
544
    ResultSet ret;
2372
2373
1.77k
    for (const auto& result : results) {
2374
1.77k
        if ( result.second == std::nullopt ) {
2375
1.07k
            continue;
2376
1.07k
        }
2377
2378
702
        ret.push_back(result);
2379
702
    }
2380
2381
544
    return ret;
2382
544
}
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
231
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
231
    ResultSet ret;
2372
2373
586
    for (const auto& result : results) {
2374
586
        if ( result.second == std::nullopt ) {
2375
307
            continue;
2376
307
        }
2377
2378
279
        ret.push_back(result);
2379
279
    }
2380
2381
231
    return ret;
2382
231
}
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
49
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
49
    ResultSet ret;
2372
2373
298
    for (const auto& result : results) {
2374
298
        if ( result.second == std::nullopt ) {
2375
298
            continue;
2376
298
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
49
    return ret;
2382
49
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
302
    for (const auto& result : results) {
2374
302
        if ( result.second == std::nullopt ) {
2375
302
            continue;
2376
302
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
91
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
91
    ResultSet ret;
2372
2373
195
    for (const auto& result : results) {
2374
195
        if ( result.second == std::nullopt ) {
2375
156
            continue;
2376
156
        }
2377
2378
39
        ret.push_back(result);
2379
39
    }
2380
2381
91
    return ret;
2382
91
}
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
318
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
318
    ResultSet ret;
2372
2373
1.37k
    for (const auto& result : results) {
2374
1.37k
        if ( result.second == std::nullopt ) {
2375
793
            continue;
2376
793
        }
2377
2378
582
        ret.push_back(result);
2379
582
    }
2380
2381
318
    return ret;
2382
318
}
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
54
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
54
    ResultSet ret;
2372
2373
342
    for (const auto& result : results) {
2374
342
        if ( result.second == std::nullopt ) {
2375
342
            continue;
2376
342
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
54
    return ret;
2382
54
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
242
    for (const auto& result : results) {
2374
242
        if ( result.second == std::nullopt ) {
2375
242
            continue;
2376
242
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
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
650
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
650
    ResultSet ret;
2372
2373
1.69k
    for (const auto& result : results) {
2374
1.69k
        if ( result.second == std::nullopt ) {
2375
1.31k
            continue;
2376
1.31k
        }
2377
2378
383
        ret.push_back(result);
2379
383
    }
2380
2381
650
    return ret;
2382
650
}
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
241
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
241
    ResultSet ret;
2372
2373
623
    for (const auto& result : results) {
2374
623
        if ( result.second == std::nullopt ) {
2375
297
            continue;
2376
297
        }
2377
2378
326
        ret.push_back(result);
2379
326
    }
2380
2381
241
    return ret;
2382
241
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
117
    for (const auto& result : results) {
2374
117
        if ( result.second == std::nullopt ) {
2375
117
            continue;
2376
117
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
398
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
398
    ResultSet ret;
2372
2373
1.17k
    for (const auto& result : results) {
2374
1.17k
        if ( result.second == std::nullopt ) {
2375
687
            continue;
2376
687
        }
2377
2378
492
        ret.push_back(result);
2379
492
    }
2380
2381
398
    return ret;
2382
398
}
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
110
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
110
    ResultSet ret;
2372
2373
328
    for (const auto& result : results) {
2374
328
        if ( result.second == std::nullopt ) {
2375
280
            continue;
2376
280
        }
2377
2378
48
        ret.push_back(result);
2379
48
    }
2380
2381
110
    return ret;
2382
110
}
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
45
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
45
    ResultSet ret;
2372
2373
152
    for (const auto& result : results) {
2374
152
        if ( result.second == std::nullopt ) {
2375
152
            continue;
2376
152
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
45
    return ret;
2382
45
}
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
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
29
    ResultSet ret;
2372
2373
109
    for (const auto& result : results) {
2374
109
        if ( result.second == std::nullopt ) {
2375
109
            continue;
2376
109
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
29
    return ret;
2382
29
}
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
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
94
    for (const auto& result : results) {
2374
94
        if ( result.second == std::nullopt ) {
2375
94
            continue;
2376
94
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
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
224
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
224
    ResultSet ret;
2372
2373
692
    for (const auto& result : results) {
2374
692
        if ( result.second == std::nullopt ) {
2375
310
            continue;
2376
310
        }
2377
2378
382
        ret.push_back(result);
2379
382
    }
2380
2381
224
    return ret;
2382
224
}
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
156
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
156
    ResultSet ret;
2372
2373
433
    for (const auto& result : results) {
2374
433
        if ( result.second == std::nullopt ) {
2375
292
            continue;
2376
292
        }
2377
2378
141
        ret.push_back(result);
2379
141
    }
2380
2381
156
    return ret;
2382
156
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
100
    for (const auto& result : results) {
2374
100
        if ( result.second == std::nullopt ) {
2375
100
            continue;
2376
100
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
129
    for (const auto& result : results) {
2374
129
        if ( result.second == std::nullopt ) {
2375
129
            continue;
2376
129
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
490
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
490
    ResultSet ret;
2372
2373
1.26k
    for (const auto& result : results) {
2374
1.26k
        if ( result.second == std::nullopt ) {
2375
790
            continue;
2376
790
        }
2377
2378
470
        ret.push_back(result);
2379
470
    }
2380
2381
490
    return ret;
2382
490
}
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
156
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
156
    ResultSet ret;
2372
2373
497
    for (const auto& result : results) {
2374
497
        if ( result.second == std::nullopt ) {
2375
400
            continue;
2376
400
        }
2377
2378
97
        ret.push_back(result);
2379
97
    }
2380
2381
156
    return ret;
2382
156
}
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
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
133
    for (const auto& result : results) {
2374
133
        if ( result.second == std::nullopt ) {
2375
133
            continue;
2376
133
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
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
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
96
    for (const auto& result : results) {
2374
96
        if ( result.second == std::nullopt ) {
2375
96
            continue;
2376
96
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
123
    for (const auto& result : results) {
2374
123
        if ( result.second == std::nullopt ) {
2375
123
            continue;
2376
123
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
57
    ResultSet ret;
2372
2373
219
    for (const auto& result : results) {
2374
219
        if ( result.second == std::nullopt ) {
2375
180
            continue;
2376
180
        }
2377
2378
39
        ret.push_back(result);
2379
39
    }
2380
2381
57
    return ret;
2382
57
}
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
74
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
74
    ResultSet ret;
2372
2373
254
    for (const auto& result : results) {
2374
254
        if ( result.second == std::nullopt ) {
2375
226
            continue;
2376
226
        }
2377
2378
28
        ret.push_back(result);
2379
28
    }
2380
2381
74
    return ret;
2382
74
}
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
464
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
464
    ResultSet ret;
2372
2373
1.41k
    for (const auto& result : results) {
2374
1.41k
        if ( result.second == std::nullopt ) {
2375
1.29k
            continue;
2376
1.29k
        }
2377
2378
115
        ret.push_back(result);
2379
115
    }
2380
2381
464
    return ret;
2382
464
}
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
67
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
67
    ResultSet ret;
2372
2373
212
    for (const auto& result : results) {
2374
212
        if ( result.second == std::nullopt ) {
2375
176
            continue;
2376
176
        }
2377
2378
36
        ret.push_back(result);
2379
36
    }
2380
2381
67
    return ret;
2382
67
}
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
60
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
60
    ResultSet ret;
2372
2373
200
    for (const auto& result : results) {
2374
200
        if ( result.second == std::nullopt ) {
2375
177
            continue;
2376
177
        }
2377
2378
23
        ret.push_back(result);
2379
23
    }
2380
2381
60
    return ret;
2382
60
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
55
    ResultSet ret;
2372
2373
202
    for (const auto& result : results) {
2374
202
        if ( result.second == std::nullopt ) {
2375
185
            continue;
2376
185
        }
2377
2378
17
        ret.push_back(result);
2379
17
    }
2380
2381
55
    return ret;
2382
55
}
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
151
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
151
    ResultSet ret;
2372
2373
422
    for (const auto& result : results) {
2374
422
        if ( result.second == std::nullopt ) {
2375
405
            continue;
2376
405
        }
2377
2378
17
        ret.push_back(result);
2379
17
    }
2380
2381
151
    return ret;
2382
151
}
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
3.39k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3.39k
    ResultSet ret;
2372
2373
9.05k
    for (const auto& result : results) {
2374
9.05k
        if ( result.second == std::nullopt ) {
2375
5.70k
            continue;
2376
5.70k
        }
2377
2378
3.35k
        ret.push_back(result);
2379
3.35k
    }
2380
2381
3.39k
    return ret;
2382
3.39k
}
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
77
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
77
    ResultSet ret;
2372
2373
221
    for (const auto& result : results) {
2374
221
        if ( result.second == std::nullopt ) {
2375
221
            continue;
2376
221
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
77
    return ret;
2382
77
}
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
247
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
247
    ResultSet ret;
2372
2373
737
    for (const auto& result : results) {
2374
737
        if ( result.second == std::nullopt ) {
2375
737
            continue;
2376
737
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
247
    return ret;
2382
247
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
132
    for (const auto& result : results) {
2374
132
        if ( result.second == std::nullopt ) {
2375
132
            continue;
2376
132
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
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
55
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
55
    ResultSet ret;
2372
2373
173
    for (const auto& result : results) {
2374
173
        if ( result.second == std::nullopt ) {
2375
173
            continue;
2376
173
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
55
    return ret;
2382
55
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
106
    for (const auto& result : results) {
2374
106
        if ( result.second == std::nullopt ) {
2375
106
            continue;
2376
106
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
31
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
31
    ResultSet ret;
2372
2373
114
    for (const auto& result : results) {
2374
114
        if ( result.second == std::nullopt ) {
2375
114
            continue;
2376
114
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
31
    return ret;
2382
31
}
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
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
46
    ResultSet ret;
2372
2373
151
    for (const auto& result : results) {
2374
151
        if ( result.second == std::nullopt ) {
2375
151
            continue;
2376
151
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
46
    return ret;
2382
46
}
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
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
138
    for (const auto& result : results) {
2374
138
        if ( result.second == std::nullopt ) {
2375
138
            continue;
2376
138
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
121
    for (const auto& result : results) {
2374
121
        if ( result.second == std::nullopt ) {
2375
121
            continue;
2376
121
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
130
    for (const auto& result : results) {
2374
130
        if ( result.second == std::nullopt ) {
2375
130
            continue;
2376
130
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
131
    for (const auto& result : results) {
2374
131
        if ( result.second == std::nullopt ) {
2375
131
            continue;
2376
131
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    ResultSet ret;
2372
2373
120
    for (const auto& result : results) {
2374
120
        if ( result.second == std::nullopt ) {
2375
120
            continue;
2376
120
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
35
    return ret;
2382
35
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    ResultSet ret;
2372
2373
120
    for (const auto& result : results) {
2374
120
        if ( result.second == std::nullopt ) {
2375
120
            continue;
2376
120
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
35
    return ret;
2382
35
}
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
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
116
    for (const auto& result : results) {
2374
116
        if ( result.second == std::nullopt ) {
2375
116
            continue;
2376
116
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
126
    for (const auto& result : results) {
2374
126
        if ( result.second == std::nullopt ) {
2375
126
            continue;
2376
126
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    ResultSet ret;
2372
2373
123
    for (const auto& result : results) {
2374
123
        if ( result.second == std::nullopt ) {
2375
123
            continue;
2376
123
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
35
    return ret;
2382
35
}
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
32
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
32
    ResultSet ret;
2372
2373
115
    for (const auto& result : results) {
2374
115
        if ( result.second == std::nullopt ) {
2375
115
            continue;
2376
115
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
32
    return ret;
2382
32
}
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
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
142
    for (const auto& result : results) {
2374
142
        if ( result.second == std::nullopt ) {
2375
142
            continue;
2376
142
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
130
    for (const auto& result : results) {
2374
130
        if ( result.second == std::nullopt ) {
2375
130
            continue;
2376
130
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
129
    for (const auto& result : results) {
2374
129
        if ( result.second == std::nullopt ) {
2375
129
            continue;
2376
129
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
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
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
44
    ResultSet ret;
2372
2373
141
    for (const auto& result : results) {
2374
141
        if ( result.second == std::nullopt ) {
2375
141
            continue;
2376
141
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
44
    return ret;
2382
44
}
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
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
125
    for (const auto& result : results) {
2374
125
        if ( result.second == std::nullopt ) {
2375
125
            continue;
2376
125
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
37
    return ret;
2382
37
}
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
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    ResultSet ret;
2372
2373
121
    for (const auto& result : results) {
2374
121
        if ( result.second == std::nullopt ) {
2375
121
            continue;
2376
121
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
36
    return ret;
2382
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
102
    for (const auto& result : results) {
2374
102
        if ( result.second == std::nullopt ) {
2375
102
            continue;
2376
102
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
45
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
45
    ResultSet ret;
2372
2373
129
    for (const auto& result : results) {
2374
129
        if ( result.second == std::nullopt ) {
2375
129
            continue;
2376
129
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
45
    return ret;
2382
45
}
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
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
46
    ResultSet ret;
2372
2373
143
    for (const auto& result : results) {
2374
143
        if ( result.second == std::nullopt ) {
2375
143
            continue;
2376
143
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
46
    return ret;
2382
46
}
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
84
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
84
    ResultSet ret;
2372
2373
235
    for (const auto& result : results) {
2374
235
        if ( result.second == std::nullopt ) {
2375
235
            continue;
2376
235
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
84
    return ret;
2382
84
}
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
47
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
47
    ResultSet ret;
2372
2373
146
    for (const auto& result : results) {
2374
146
        if ( result.second == std::nullopt ) {
2375
146
            continue;
2376
146
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
47
    return ret;
2382
47
}
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
73
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
73
    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
73
    return ret;
2382
73
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
106
    for (const auto& result : results) {
2374
106
        if ( result.second == std::nullopt ) {
2375
106
            continue;
2376
106
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
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
60
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
60
    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
60
    return ret;
2382
60
}
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
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
42
    ResultSet ret;
2372
2373
132
    for (const auto& result : results) {
2374
132
        if ( result.second == std::nullopt ) {
2375
132
            continue;
2376
132
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
42
    return ret;
2382
42
}
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
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
57
    ResultSet ret;
2372
2373
186
    for (const auto& result : results) {
2374
186
        if ( result.second == std::nullopt ) {
2375
186
            continue;
2376
186
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
57
    return ret;
2382
57
}
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
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
96
    for (const auto& result : results) {
2374
96
        if ( result.second == std::nullopt ) {
2375
96
            continue;
2376
96
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
131
    for (const auto& result : results) {
2374
131
        if ( result.second == std::nullopt ) {
2375
131
            continue;
2376
131
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
40
    return ret;
2382
40
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
551
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
551
    (void)operations;
2388
551
    (void)results;
2389
551
    (void)data;
2390
551
    (void)size;
2391
551
}
2392
2393
template <class ResultType, class OperationType>
2394
1.94k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1.94k
    (void)operation;
2396
2397
1.94k
    return false;
2398
1.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
476
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
476
    (void)operation;
2396
2397
476
    return false;
2398
476
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2394
155
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
155
    (void)operation;
2396
2397
155
    return false;
2398
155
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2394
25
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
25
    (void)operation;
2396
2397
25
    return false;
2398
25
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
481
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
481
    (void)operation;
2396
2397
481
    return false;
2398
481
}
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
138
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
138
    (void)operation;
2396
2397
138
    return false;
2398
138
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2394
46
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
46
    (void)operation;
2396
2397
46
    return false;
2398
46
}
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
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
5
    (void)operation;
2396
2397
5
    return false;
2398
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2394
67
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
67
    (void)operation;
2396
2397
67
    return false;
2398
67
}
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
134
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
134
    (void)operation;
2396
2397
134
    return false;
2398
134
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
108
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
108
    (void)operation;
2396
2397
108
    return false;
2398
108
}
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
107
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
107
    (void)operation;
2396
2397
107
    return false;
2398
107
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2394
35
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
35
    (void)operation;
2396
2397
35
    return false;
2398
35
}
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
67
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
67
    (void)operation;
2396
2397
67
    return false;
2398
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2394
29
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
29
    (void)operation;
2396
2397
29
    return false;
2398
29
}
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
9
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
9
    (void)operation;
2396
2397
9
    return false;
2398
9
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub 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_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2394
30
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
30
    (void)operation;
2396
2397
30
    return false;
2398
30
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
10
    (void)operation;
2396
2397
10
    return false;
2398
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
5
    (void)operation;
2396
2397
5
    return false;
2398
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
5
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
5
    (void)operation;
2396
2397
5
    return false;
2398
5
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::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
2
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
2
    (void)operation;
2396
2397
2
    return false;
2398
2
}
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
702
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
702
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
702
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
702
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
558
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
555
    return false;
2408
558
}
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
103
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
103
    if (
2419
103
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
103
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
52
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
24
            return true;
2424
24
        }
2425
52
    }
2426
2427
79
    return false;
2428
103
}
2429
2430
template <>
2431
8
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2432
8
    if (
2433
8
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2434
8
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2435
8
        if ( operation.UseRandomNonce() ) {
2436
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2437
8
            return true;
2438
8
        }
2439
8
    }
2440
2441
0
    return false;
2442
8
}
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
515
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
515
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
515
    return false;
2464
515
}
2465
2466
template <>
2467
143
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
143
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
143
    return false;
2471
143
}
2472
2473
template <>
2474
119
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
119
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
119
    return false;
2478
119
}
2479
2480
template <>
2481
207
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
207
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
205
    return false;
2485
207
}
2486
2487
template <class ResultType, class OperationType>
2488
19.2k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
19.2k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
19.2k
    const auto filtered = filter(results);
2495
2496
19.2k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15.5k
        return;
2499
15.5k
    }
2500
2501
3.73k
    if ( dontCompare(operations[0].second) == true ) {
2502
181
        return;
2503
181
    }
2504
2505
14.9k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
11.3k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
11.3k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
11.3k
        const bool equal = *prev == *cur;
2510
2511
11.3k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
11.3k
    }
2528
3.55k
}
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
1.07k
void ExecutorBase<ResultType, OperationType>::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.07k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.07k
    const auto filtered = filter(results);
2495
2496
1.07k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
599
        return;
2499
599
    }
2500
2501
476
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.57k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.09k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.09k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.09k
        const bool equal = *prev == *cur;
2510
2511
1.09k
        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.09k
    }
2528
476
}
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
565
void ExecutorBase<ResultType, OperationType>::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
565
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
565
    const auto filtered = filter(results);
2495
2496
565
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
358
        return;
2499
358
    }
2500
2501
207
    if ( dontCompare(operations[0].second) == true ) {
2502
2
        return;
2503
2
    }
2504
2505
787
    for (size_t i = 1; i < filtered.size(); i++) {
2506
582
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
582
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
582
        const bool equal = *prev == *cur;
2510
2511
582
        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
582
    }
2528
205
}
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
490
void ExecutorBase<ResultType, OperationType>::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
490
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
490
    const auto filtered = filter(results);
2495
2496
490
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
335
        return;
2499
335
    }
2500
2501
155
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.03k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
883
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
883
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
883
        const bool equal = *prev == *cur;
2510
2511
883
        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
883
    }
2528
155
}
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
478
void ExecutorBase<ResultType, OperationType>::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
478
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
478
    const auto filtered = filter(results);
2495
2496
478
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
359
        return;
2499
359
    }
2500
2501
119
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
620
    for (size_t i = 1; i < filtered.size(); i++) {
2506
501
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
501
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
501
        const bool equal = *prev == *cur;
2510
2511
501
        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
501
    }
2528
119
}
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
2.39k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2.39k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2.39k
    const auto filtered = filter(results);
2495
2496
2.39k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.88k
        return;
2499
1.88k
    }
2500
2501
515
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
3.25k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2.74k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2.74k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2.74k
        const bool equal = *prev == *cur;
2510
2511
2.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
2.74k
    }
2528
515
}
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.44k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2.44k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2.44k
    const auto filtered = filter(results);
2495
2496
2.44k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2.30k
        return;
2499
2.30k
    }
2500
2501
143
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
830
    for (size_t i = 1; i < filtered.size(); i++) {
2506
687
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
687
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
687
        const bool equal = *prev == *cur;
2510
2511
687
        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
687
    }
2528
143
}
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
116
void ExecutorBase<ResultType, OperationType>::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
116
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
116
    const auto filtered = filter(results);
2495
2496
116
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
91
        return;
2499
91
    }
2500
2501
25
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
190
    for (size_t i = 1; i < filtered.size(); i++) {
2506
165
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
165
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
165
        const bool equal = *prev == *cur;
2510
2511
165
        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
165
    }
2528
25
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.48k
void ExecutorBase<ResultType, OperationType>::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.48k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1.48k
    const auto filtered = filter(results);
2495
2496
1.48k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.00k
        return;
2499
1.00k
    }
2500
2501
481
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.10k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.62k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.62k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.62k
        const bool equal = *prev == *cur;
2510
2511
1.62k
        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.62k
    }
2528
481
}
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
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::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
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::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
50
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
50
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
50
    const auto filtered = filter(results);
2495
2496
50
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
50
        return;
2499
50
    }
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
544
void ExecutorBase<ResultType, OperationType>::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
544
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
544
    const auto filtered = filter(results);
2495
2496
544
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
406
        return;
2499
406
    }
2500
2501
138
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
559
    for (size_t i = 1; i < filtered.size(); i++) {
2506
421
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
421
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
421
        const bool equal = *prev == *cur;
2510
2511
421
        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
421
    }
2528
138
}
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
231
void ExecutorBase<ResultType, OperationType>::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
231
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
231
    const auto filtered = filter(results);
2495
2496
231
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
185
        return;
2499
185
    }
2500
2501
46
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
130
    for (size_t i = 1; i < filtered.size(); i++) {
2506
84
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
84
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
84
        const bool equal = *prev == *cur;
2510
2511
84
        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
84
    }
2528
46
}
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
49
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
49
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
49
    const auto filtered = filter(results);
2495
2496
49
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
49
        return;
2499
49
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
91
void ExecutorBase<ResultType, OperationType>::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
91
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
91
    const auto filtered = filter(results);
2495
2496
91
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
86
        return;
2499
86
    }
2500
2501
5
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
10
    for (size_t i = 1; i < filtered.size(); i++) {
2506
5
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
5
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
5
        const bool equal = *prev == *cur;
2510
2511
5
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
5
    }
2528
5
}
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
318
void ExecutorBase<ResultType, OperationType>::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
318
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
318
    const auto filtered = filter(results);
2495
2496
318
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
251
        return;
2499
251
    }
2500
2501
67
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
404
    for (size_t i = 1; i < filtered.size(); i++) {
2506
337
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
337
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
337
        const bool equal = *prev == *cur;
2510
2511
337
        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
337
    }
2528
67
}
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
54
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
54
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
54
    const auto filtered = filter(results);
2495
2496
54
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
54
        return;
2499
54
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
650
void ExecutorBase<ResultType, OperationType>::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
650
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
650
    const auto filtered = filter(results);
2495
2496
650
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
516
        return;
2499
516
    }
2500
2501
134
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
312
    for (size_t i = 1; i < filtered.size(); i++) {
2506
178
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
178
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
178
        const bool equal = *prev == *cur;
2510
2511
178
        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
178
    }
2528
134
}
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
241
void ExecutorBase<ResultType, OperationType>::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
241
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
241
    const auto filtered = filter(results);
2495
2496
241
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
133
        return;
2499
133
    }
2500
2501
108
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
283
    for (size_t i = 1; i < filtered.size(); i++) {
2506
175
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
175
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
175
        const bool equal = *prev == *cur;
2510
2511
175
        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
175
    }
2528
108
}
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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
398
void ExecutorBase<ResultType, OperationType>::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
398
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
398
    const auto filtered = filter(results);
2495
2496
398
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
295
        return;
2499
295
    }
2500
2501
103
    if ( dontCompare(operations[0].second) == true ) {
2502
24
        return;
2503
24
    }
2504
2505
264
    for (size_t i = 1; i < filtered.size(); i++) {
2506
185
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
185
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
185
        const bool equal = *prev == *cur;
2510
2511
185
        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
185
    }
2528
79
}
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
110
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
110
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
110
    const auto filtered = filter(results);
2495
2496
110
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
102
        return;
2499
102
    }
2500
2501
8
    if ( dontCompare(operations[0].second) == true ) {
2502
8
        return;
2503
8
    }
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
45
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
45
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
45
    const auto filtered = filter(results);
2495
2496
45
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
45
        return;
2499
45
    }
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
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
29
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
29
    const auto filtered = filter(results);
2495
2496
29
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
29
        return;
2499
29
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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
224
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
224
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
224
    const auto filtered = filter(results);
2495
2496
224
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
117
        return;
2499
117
    }
2500
2501
107
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
317
    for (size_t i = 1; i < filtered.size(); i++) {
2506
210
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
210
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
210
        const bool equal = *prev == *cur;
2510
2511
210
        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
210
    }
2528
107
}
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
156
void ExecutorBase<ResultType, OperationType>::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
156
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
156
    const auto filtered = filter(results);
2495
2496
156
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
121
        return;
2499
121
    }
2500
2501
35
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
94
    for (size_t i = 1; i < filtered.size(); i++) {
2506
59
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
59
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
59
        const bool equal = *prev == *cur;
2510
2511
59
        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
59
    }
2528
35
}
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
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
490
void ExecutorBase<ResultType, OperationType>::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
490
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
490
    const auto filtered = filter(results);
2495
2496
490
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
423
        return;
2499
423
    }
2500
2501
67
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
212
    for (size_t i = 1; i < filtered.size(); i++) {
2506
145
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
145
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
145
        const bool equal = *prev == *cur;
2510
2511
145
        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
145
    }
2528
67
}
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
156
void ExecutorBase<ResultType, OperationType>::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
156
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
156
    const auto filtered = filter(results);
2495
2496
156
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
127
        return;
2499
127
    }
2500
2501
29
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
88
    for (size_t i = 1; i < filtered.size(); i++) {
2506
59
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
59
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
59
        const bool equal = *prev == *cur;
2510
2511
59
        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
59
    }
2528
29
}
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
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::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
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
57
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
57
    const auto filtered = filter(results);
2495
2496
57
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
48
        return;
2499
48
    }
2500
2501
9
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
32
    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
9
}
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
74
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
74
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
74
    const auto filtered = filter(results);
2495
2496
74
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
67
        return;
2499
67
    }
2500
2501
7
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
21
    for (size_t i = 1; i < filtered.size(); i++) {
2506
14
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
14
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
14
        const bool equal = *prev == *cur;
2510
2511
14
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
14
    }
2528
7
}
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
464
void ExecutorBase<ResultType, OperationType>::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
464
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
464
    const auto filtered = filter(results);
2495
2496
464
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
434
        return;
2499
434
    }
2500
2501
30
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
93
    for (size_t i = 1; i < filtered.size(); i++) {
2506
63
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
63
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
63
        const bool equal = *prev == *cur;
2510
2511
63
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
63
    }
2528
30
}
cryptofuzz::ExecutorBase<cryptofuzz::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
67
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
67
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
67
    const auto filtered = filter(results);
2495
2496
67
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
57
        return;
2499
57
    }
2500
2501
10
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
30
    for (size_t i = 1; i < filtered.size(); i++) {
2506
20
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
20
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
20
        const bool equal = *prev == *cur;
2510
2511
20
        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
20
    }
2528
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
55
        return;
2499
55
    }
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<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
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
50
        return;
2499
50
    }
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::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
151
void ExecutorBase<ResultType, OperationType>::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
151
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
151
    const auto filtered = filter(results);
2495
2496
151
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
149
        return;
2499
149
    }
2500
2501
2
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
4
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2
        const bool equal = *prev == *cur;
2510
2511
2
        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
    }
2528
2
}
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
3.39k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3.39k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3.39k
    const auto filtered = filter(results);
2495
2496
3.39k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2.69k
        return;
2499
2.69k
    }
2500
2501
702
    if ( dontCompare(operations[0].second) == true ) {
2502
147
        return;
2503
147
    }
2504
2505
1.67k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.11k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.11k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.11k
        const bool equal = *prev == *cur;
2510
2511
1.11k
        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.11k
    }
2528
555
}
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
77
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
77
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
77
    const auto filtered = filter(results);
2495
2496
77
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
77
        return;
2499
77
    }
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
247
void ExecutorBase<ResultType, OperationType>::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
247
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
247
    const auto filtered = filter(results);
2495
2496
247
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
247
        return;
2499
247
    }
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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
40
    const auto filtered = filter(results);
2495
2496
40
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
40
        return;
2499
40
    }
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
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::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
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
31
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
31
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
31
    const auto filtered = filter(results);
2495
2496
31
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
31
        return;
2499
31
    }
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
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
46
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
46
    const auto filtered = filter(results);
2495
2496
46
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
46
        return;
2499
46
    }
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
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_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
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
35
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
35
    const auto filtered = filter(results);
2495
2496
35
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
35
        return;
2499
35
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
35
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
35
    const auto filtered = filter(results);
2495
2496
35
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
35
        return;
2499
35
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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
32
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
32
        return;
2499
32
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
35
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
35
    const auto filtered = filter(results);
2495
2496
35
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
35
        return;
2499
35
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
32
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
32
    const auto filtered = filter(results);
2495
2496
32
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
32
        return;
2499
32
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_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
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
44
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
44
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
44
    const auto filtered = filter(results);
2495
2496
44
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
44
        return;
2499
44
    }
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
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
36
    const auto filtered = filter(results);
2495
2496
36
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
45
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
45
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
45
    const auto filtered = filter(results);
2495
2496
45
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
45
        return;
2499
45
    }
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
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
46
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
46
    const auto filtered = filter(results);
2495
2496
46
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
46
        return;
2499
46
    }
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
84
void ExecutorBase<ResultType, OperationType>::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
84
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
84
    const auto filtered = filter(results);
2495
2496
84
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
84
        return;
2499
84
    }
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
47
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
47
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
47
    const auto filtered = filter(results);
2495
2496
47
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
47
        return;
2499
47
    }
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
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_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
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
30
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
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
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<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
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
42
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
42
    const auto filtered = filter(results);
2495
2496
42
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
42
        return;
2499
42
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
57
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
57
    const auto filtered = filter(results);
2495
2496
57
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
57
        return;
2499
57
    }
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
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
40
    const auto filtered = filter(results);
2495
2496
40
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
40
        return;
2499
40
    }
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
209k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
209k
    (void)parentDs;
2551
209k
    return op;
2552
209k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
4.37k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.37k
    (void)parentDs;
2551
4.37k
    return op;
2552
4.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
3.51k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.51k
    (void)parentDs;
2551
3.51k
    return op;
2552
3.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
4.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.50k
    (void)parentDs;
2551
4.50k
    return op;
2552
4.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
4.09k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.09k
    (void)parentDs;
2551
4.09k
    return op;
2552
4.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
14.3k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
14.3k
    (void)parentDs;
2551
14.3k
    return op;
2552
14.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
12.2k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
12.2k
    (void)parentDs;
2551
12.2k
    return op;
2552
12.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
2.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.18k
    (void)parentDs;
2551
2.18k
    return op;
2552
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
6.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.83k
    (void)parentDs;
2551
6.83k
    return op;
2552
6.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.26k
    (void)parentDs;
2551
2.26k
    return op;
2552
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.39k
    (void)parentDs;
2551
2.39k
    return op;
2552
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
2.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.81k
    (void)parentDs;
2551
2.81k
    return op;
2552
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
3.21k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.21k
    (void)parentDs;
2551
3.21k
    return op;
2552
3.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
2.55k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.55k
    (void)parentDs;
2551
2.55k
    return op;
2552
2.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) 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::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
1.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.45k
    (void)parentDs;
2551
1.45k
    return op;
2552
1.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
1.78k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.78k
    (void)parentDs;
2551
1.78k
    return op;
2552
1.78k
}
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
3.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.05k
    (void)parentDs;
2551
3.05k
    return op;
2552
3.05k
}
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
2.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.18k
    (void)parentDs;
2551
2.18k
    return op;
2552
2.18k
}
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
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::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) 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::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
1.81k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.81k
    (void)parentDs;
2551
1.81k
    return op;
2552
1.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
2.59k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.59k
    (void)parentDs;
2551
2.59k
    return op;
2552
2.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.23k
    (void)parentDs;
2551
2.23k
    return op;
2552
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2549
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.24k
    (void)parentDs;
2551
2.24k
    return op;
2552
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.13k
    (void)parentDs;
2551
2.13k
    return op;
2552
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2549
1.87k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.87k
    (void)parentDs;
2551
1.87k
    return op;
2552
1.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
1.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.44k
    (void)parentDs;
2551
1.44k
    return op;
2552
1.44k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
1.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.79k
    (void)parentDs;
2551
1.79k
    return op;
2552
1.79k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
1.59k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.59k
    (void)parentDs;
2551
1.59k
    return op;
2552
1.59k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.87k
    (void)parentDs;
2551
2.87k
    return op;
2552
2.87k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
1.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.53k
    (void)parentDs;
2551
1.53k
    return op;
2552
1.53k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.05k
    (void)parentDs;
2551
2.05k
    return op;
2552
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
3.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.23k
    (void)parentDs;
2551
3.23k
    return op;
2552
3.23k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.23k
    (void)parentDs;
2551
2.23k
    return op;
2552
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
2.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.18k
    (void)parentDs;
2551
2.18k
    return op;
2552
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
1.44k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.44k
    (void)parentDs;
2551
1.44k
    return op;
2552
1.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
2.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.31k
    (void)parentDs;
2551
2.31k
    return op;
2552
2.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
1.47k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.47k
    (void)parentDs;
2551
1.47k
    return op;
2552
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
1.80k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.80k
    (void)parentDs;
2551
1.80k
    return op;
2552
1.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
1.72k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.72k
    (void)parentDs;
2551
1.72k
    return op;
2552
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.13k
    (void)parentDs;
2551
2.13k
    return op;
2552
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
1.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.24k
    (void)parentDs;
2551
1.24k
    return op;
2552
1.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.83k
    (void)parentDs;
2551
1.83k
    return op;
2552
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
2.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.86k
    (void)parentDs;
2551
2.86k
    return op;
2552
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
1.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.29k
    (void)parentDs;
2551
1.29k
    return op;
2552
1.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
1.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.19k
    (void)parentDs;
2551
1.19k
    return op;
2552
1.19k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
1.71k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.71k
    (void)parentDs;
2551
1.71k
    return op;
2552
1.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) 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::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.50k
    (void)parentDs;
2551
2.50k
    return op;
2552
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
6.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.61k
    (void)parentDs;
2551
6.61k
    return op;
2552
6.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
1.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.92k
    (void)parentDs;
2551
1.92k
    return op;
2552
1.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
1.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.57k
    (void)parentDs;
2551
1.57k
    return op;
2552
1.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
1.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.45k
    (void)parentDs;
2551
1.45k
    return op;
2552
1.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
1.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.22k
    (void)parentDs;
2551
1.22k
    return op;
2552
1.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
2.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.43k
    (void)parentDs;
2551
2.43k
    return op;
2552
2.43k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
1.88k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.88k
    (void)parentDs;
2551
1.88k
    return op;
2552
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.13k
    (void)parentDs;
2551
2.13k
    return op;
2552
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
1.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.62k
    (void)parentDs;
2551
1.62k
    return op;
2552
1.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
1.91k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.91k
    (void)parentDs;
2551
1.91k
    return op;
2552
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
1.70k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.70k
    (void)parentDs;
2551
1.70k
    return op;
2552
1.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
2.15k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.15k
    (void)parentDs;
2551
2.15k
    return op;
2552
2.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
1.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.50k
    (void)parentDs;
2551
1.50k
    return op;
2552
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
1.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.68k
    (void)parentDs;
2551
1.68k
    return op;
2552
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
1.54k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.54k
    (void)parentDs;
2551
1.54k
    return op;
2552
1.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.34k
    (void)parentDs;
2551
2.34k
    return op;
2552
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
2.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.23k
    (void)parentDs;
2551
2.23k
    return op;
2552
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.14k
    (void)parentDs;
2551
2.14k
    return op;
2552
2.14k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
1.47k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.47k
    (void)parentDs;
2551
1.47k
    return op;
2552
1.47k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
1.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.73k
    (void)parentDs;
2551
1.73k
    return op;
2552
1.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2549
1.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.65k
    (void)parentDs;
2551
1.65k
    return op;
2552
1.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
1.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.53k
    (void)parentDs;
2551
1.53k
    return op;
2552
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
1.48k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.48k
    (void)parentDs;
2551
1.48k
    return op;
2552
1.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2549
1.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.79k
    (void)parentDs;
2551
1.79k
    return op;
2552
1.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
1.47k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.47k
    (void)parentDs;
2551
1.47k
    return op;
2552
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
1.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.57k
    (void)parentDs;
2551
1.57k
    return op;
2552
1.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
1.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.89k
    (void)parentDs;
2551
1.89k
    return op;
2552
1.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.39k
    (void)parentDs;
2551
2.39k
    return op;
2552
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
1.85k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.85k
    (void)parentDs;
2551
1.85k
    return op;
2552
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.26k
    (void)parentDs;
2551
2.26k
    return op;
2552
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
1.57k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.57k
    (void)parentDs;
2551
1.57k
    return op;
2552
1.57k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
1.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.86k
    (void)parentDs;
2551
1.86k
    return op;
2552
1.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
1.55k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.55k
    (void)parentDs;
2551
1.55k
    return op;
2552
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
2.54k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.54k
    (void)parentDs;
2551
2.54k
    return op;
2552
2.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
1.35k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.35k
    (void)parentDs;
2551
1.35k
    return op;
2552
1.35k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
1.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.65k
    (void)parentDs;
2551
1.65k
    return op;
2552
1.65k
}
2553
2554
128
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
128
    (void)parentDs;
2556
128
    op.modulo = modulo;
2557
128
    return op;
2558
128
}
2559
2560
228
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
228
    (void)parentDs;
2562
228
    op.modulo = modulo;
2563
228
    return op;
2564
228
}
2565
2566
292
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
292
    (void)parentDs;
2568
292
    op.modulo = modulo;
2569
292
    return op;
2570
292
}
2571
2572
282
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
282
    (void)parentDs;
2574
282
    op.modulo = modulo;
2575
282
    return op;
2576
282
}
2577
2578
272
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
272
    (void)parentDs;
2580
272
    op.modulo = modulo;
2581
272
    return op;
2582
272
}
2583
2584
286
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
286
    (void)parentDs;
2586
286
    op.modulo = modulo;
2587
286
    return op;
2588
286
}
2589
2590
228
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
228
    (void)parentDs;
2592
228
    op.modulo = modulo;
2593
228
    return op;
2594
228
}
2595
2596
260
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
260
    (void)parentDs;
2598
260
    op.modulo = modulo;
2599
260
    return op;
2600
260
}
2601
2602
434
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
434
    (void)parentDs;
2604
434
    op.modulo = modulo;
2605
434
    return op;
2606
434
}
2607
2608
423
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
423
    (void)parentDs;
2610
423
    op.modulo = modulo;
2611
423
    return op;
2612
423
}
2613
2614
432
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
432
    (void)parentDs;
2616
432
    op.modulo = modulo;
2617
432
    return op;
2618
432
}
2619
2620
328
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
328
    (void)parentDs;
2622
328
    op.modulo = modulo;
2623
328
    return op;
2624
328
}
2625
2626
511
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
511
    (void)parentDs;
2628
511
    op.modulo = modulo;
2629
511
    return op;
2630
511
}
2631
2632
242
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
242
    (void)parentDs;
2634
242
    op.modulo = modulo;
2635
242
    return op;
2636
242
}
2637
2638
442
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
442
    (void)parentDs;
2640
442
    op.modulo = modulo;
2641
442
    return op;
2642
442
}
2643
2644
281
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
281
    (void)parentDs;
2646
281
    op.modulo = modulo;
2647
281
    return op;
2648
281
}
2649
2650
364
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
364
    (void)parentDs;
2652
364
    op.modulo = modulo;
2653
364
    return op;
2654
364
}
2655
2656
278
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
278
    (void)parentDs;
2658
278
    op.modulo = modulo;
2659
278
    return op;
2660
278
}
2661
2662
919
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
919
    (void)parentDs;
2664
919
    op.modulo = modulo;
2665
919
    return op;
2666
919
}
2667
2668
357
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
357
    (void)parentDs;
2670
357
    op.modulo = modulo;
2671
357
    return op;
2672
357
}
2673
2674
263
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
263
    (void)parentDs;
2676
263
    op.modulo = modulo;
2677
263
    return op;
2678
263
}
2679
2680
331
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
331
    (void)parentDs;
2682
331
    op.modulo = modulo;
2683
331
    return op;
2684
331
}
2685
2686
template <class ResultType, class OperationType>
2687
219k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
219k
    Datasource ds(data, size);
2689
219k
    if ( parentDs != nullptr ) {
2690
219k
        auto modifier = parentDs->GetData(0);
2691
219k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
219k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
219k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.40k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.40k
    Datasource ds(data, size);
2689
4.40k
    if ( parentDs != nullptr ) {
2690
4.40k
        auto modifier = parentDs->GetData(0);
2691
4.40k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.40k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.54k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.54k
    Datasource ds(data, size);
2689
3.54k
    if ( parentDs != nullptr ) {
2690
3.54k
        auto modifier = parentDs->GetData(0);
2691
3.54k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.54k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.52k
    Datasource ds(data, size);
2689
4.52k
    if ( parentDs != nullptr ) {
2690
4.52k
        auto modifier = parentDs->GetData(0);
2691
4.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.52k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::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::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
14.3k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
14.3k
    Datasource ds(data, size);
2689
14.3k
    if ( parentDs != nullptr ) {
2690
14.3k
        auto modifier = parentDs->GetData(0);
2691
14.3k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
14.3k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
14.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
12.2k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
12.2k
    Datasource ds(data, size);
2689
12.2k
    if ( parentDs != nullptr ) {
2690
12.2k
        auto modifier = parentDs->GetData(0);
2691
12.2k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
12.2k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
12.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.20k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.20k
    Datasource ds(data, size);
2689
2.20k
    if ( parentDs != nullptr ) {
2690
2.20k
        auto modifier = parentDs->GetData(0);
2691
2.20k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.20k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.85k
    Datasource ds(data, size);
2689
6.85k
    if ( parentDs != nullptr ) {
2690
6.85k
        auto modifier = parentDs->GetData(0);
2691
6.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.85k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.28k
    Datasource ds(data, size);
2689
2.28k
    if ( parentDs != nullptr ) {
2690
2.28k
        auto modifier = parentDs->GetData(0);
2691
2.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.28k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.41k
    Datasource ds(data, size);
2689
2.41k
    if ( parentDs != nullptr ) {
2690
2.41k
        auto modifier = parentDs->GetData(0);
2691
2.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.41k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.83k
    Datasource ds(data, size);
2689
2.83k
    if ( parentDs != nullptr ) {
2690
2.83k
        auto modifier = parentDs->GetData(0);
2691
2.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.83k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.23k
    Datasource ds(data, size);
2689
3.23k
    if ( parentDs != nullptr ) {
2690
3.23k
        auto modifier = parentDs->GetData(0);
2691
3.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.23k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::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::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.76k
    Datasource ds(data, size);
2689
2.76k
    if ( parentDs != nullptr ) {
2690
2.76k
        auto modifier = parentDs->GetData(0);
2691
2.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.76k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.47k
    Datasource ds(data, size);
2689
1.47k
    if ( parentDs != nullptr ) {
2690
1.47k
        auto modifier = parentDs->GetData(0);
2691
1.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.47k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.79k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.79k
    Datasource ds(data, size);
2689
1.79k
    if ( parentDs != nullptr ) {
2690
1.79k
        auto modifier = parentDs->GetData(0);
2691
1.79k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.79k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.08k
    Datasource ds(data, size);
2689
3.08k
    if ( parentDs != nullptr ) {
2690
3.08k
        auto modifier = parentDs->GetData(0);
2691
3.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.08k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.08k
}
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
2.20k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.20k
    Datasource ds(data, size);
2689
2.20k
    if ( parentDs != nullptr ) {
2690
2.20k
        auto modifier = parentDs->GetData(0);
2691
2.20k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.20k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.20k
}
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
2.68k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.68k
    Datasource ds(data, size);
2689
2.68k
    if ( parentDs != nullptr ) {
2690
2.68k
        auto modifier = parentDs->GetData(0);
2691
2.68k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.68k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::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<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.83k
    Datasource ds(data, size);
2689
1.83k
    if ( parentDs != nullptr ) {
2690
1.83k
        auto modifier = parentDs->GetData(0);
2691
1.83k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.83k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::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::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.24k
    Datasource ds(data, size);
2689
2.24k
    if ( parentDs != nullptr ) {
2690
2.24k
        auto modifier = parentDs->GetData(0);
2691
2.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.25k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.25k
    Datasource ds(data, size);
2689
2.25k
    if ( parentDs != nullptr ) {
2690
2.25k
        auto modifier = parentDs->GetData(0);
2691
2.25k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.25k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.16k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.16k
    Datasource ds(data, size);
2689
2.16k
    if ( parentDs != nullptr ) {
2690
2.16k
        auto modifier = parentDs->GetData(0);
2691
2.16k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.16k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.89k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.89k
    Datasource ds(data, size);
2689
1.89k
    if ( parentDs != nullptr ) {
2690
1.89k
        auto modifier = parentDs->GetData(0);
2691
1.89k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.89k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.46k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.46k
    Datasource ds(data, size);
2689
1.46k
    if ( parentDs != nullptr ) {
2690
1.46k
        auto modifier = parentDs->GetData(0);
2691
1.46k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.46k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.46k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.81k
    Datasource ds(data, size);
2689
1.81k
    if ( parentDs != nullptr ) {
2690
1.81k
        auto modifier = parentDs->GetData(0);
2691
1.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.81k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.81k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.61k
    Datasource ds(data, size);
2689
1.61k
    if ( parentDs != nullptr ) {
2690
1.61k
        auto modifier = parentDs->GetData(0);
2691
1.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.61k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.61k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.89k
    Datasource ds(data, size);
2689
2.89k
    if ( parentDs != nullptr ) {
2690
2.89k
        auto modifier = parentDs->GetData(0);
2691
2.89k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.89k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.54k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.54k
    Datasource ds(data, size);
2689
1.54k
    if ( parentDs != nullptr ) {
2690
1.54k
        auto modifier = parentDs->GetData(0);
2691
1.54k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.54k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.54k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.06k
    Datasource ds(data, size);
2689
2.06k
    if ( parentDs != nullptr ) {
2690
2.06k
        auto modifier = parentDs->GetData(0);
2691
2.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.06k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.25k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.25k
    Datasource ds(data, size);
2689
3.25k
    if ( parentDs != nullptr ) {
2690
3.25k
        auto modifier = parentDs->GetData(0);
2691
3.25k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.25k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.25k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.25k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.25k
    Datasource ds(data, size);
2689
2.25k
    if ( parentDs != nullptr ) {
2690
2.25k
        auto modifier = parentDs->GetData(0);
2691
2.25k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.25k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.21k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.21k
    Datasource ds(data, size);
2689
2.21k
    if ( parentDs != nullptr ) {
2690
2.21k
        auto modifier = parentDs->GetData(0);
2691
2.21k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.21k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.46k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.46k
    Datasource ds(data, size);
2689
1.46k
    if ( parentDs != nullptr ) {
2690
1.46k
        auto modifier = parentDs->GetData(0);
2691
1.46k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.46k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.46k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.34k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.34k
    Datasource ds(data, size);
2689
2.34k
    if ( parentDs != nullptr ) {
2690
2.34k
        auto modifier = parentDs->GetData(0);
2691
2.34k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.34k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.49k
    Datasource ds(data, size);
2689
1.49k
    if ( parentDs != nullptr ) {
2690
1.49k
        auto modifier = parentDs->GetData(0);
2691
1.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.49k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.82k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.82k
    Datasource ds(data, size);
2689
1.82k
    if ( parentDs != nullptr ) {
2690
1.82k
        auto modifier = parentDs->GetData(0);
2691
1.82k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.82k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.74k
    Datasource ds(data, size);
2689
1.74k
    if ( parentDs != nullptr ) {
2690
1.74k
        auto modifier = parentDs->GetData(0);
2691
1.74k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.74k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::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::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.26k
    Datasource ds(data, size);
2689
1.26k
    if ( parentDs != nullptr ) {
2690
1.26k
        auto modifier = parentDs->GetData(0);
2691
1.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.26k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.85k
    Datasource ds(data, size);
2689
1.85k
    if ( parentDs != nullptr ) {
2690
1.85k
        auto modifier = parentDs->GetData(0);
2691
1.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.85k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.88k
    Datasource ds(data, size);
2689
2.88k
    if ( parentDs != nullptr ) {
2690
2.88k
        auto modifier = parentDs->GetData(0);
2691
2.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.88k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.31k
    Datasource ds(data, size);
2689
1.31k
    if ( parentDs != nullptr ) {
2690
1.31k
        auto modifier = parentDs->GetData(0);
2691
1.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.31k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.21k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.21k
    Datasource ds(data, size);
2689
1.21k
    if ( parentDs != nullptr ) {
2690
1.21k
        auto modifier = parentDs->GetData(0);
2691
1.21k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.21k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.21k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.72k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.72k
    Datasource ds(data, size);
2689
1.72k
    if ( parentDs != nullptr ) {
2690
1.72k
        auto modifier = parentDs->GetData(0);
2691
1.72k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.72k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.51k
    Datasource ds(data, size);
2689
2.51k
    if ( parentDs != nullptr ) {
2690
2.51k
        auto modifier = parentDs->GetData(0);
2691
2.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.51k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::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::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
14.2k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
14.2k
    Datasource ds(data, size);
2689
14.2k
    if ( parentDs != nullptr ) {
2690
14.2k
        auto modifier = parentDs->GetData(0);
2691
14.2k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
14.2k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
14.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.94k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.94k
    Datasource ds(data, size);
2689
1.94k
    if ( parentDs != nullptr ) {
2690
1.94k
        auto modifier = parentDs->GetData(0);
2691
1.94k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.94k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.94k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.60k
    Datasource ds(data, size);
2689
1.60k
    if ( parentDs != nullptr ) {
2690
1.60k
        auto modifier = parentDs->GetData(0);
2691
1.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.60k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.47k
    Datasource ds(data, size);
2689
1.47k
    if ( parentDs != nullptr ) {
2690
1.47k
        auto modifier = parentDs->GetData(0);
2691
1.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.47k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.23k
    Datasource ds(data, size);
2689
1.23k
    if ( parentDs != nullptr ) {
2690
1.23k
        auto modifier = parentDs->GetData(0);
2691
1.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.23k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.46k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.46k
    Datasource ds(data, size);
2689
2.46k
    if ( parentDs != nullptr ) {
2690
2.46k
        auto modifier = parentDs->GetData(0);
2691
2.46k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.46k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.46k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.90k
    Datasource ds(data, size);
2689
1.90k
    if ( parentDs != nullptr ) {
2690
1.90k
        auto modifier = parentDs->GetData(0);
2691
1.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.90k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.18k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.18k
    Datasource ds(data, size);
2689
2.18k
    if ( parentDs != nullptr ) {
2690
2.18k
        auto modifier = parentDs->GetData(0);
2691
2.18k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.18k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.18k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.69k
    Datasource ds(data, size);
2689
1.69k
    if ( parentDs != nullptr ) {
2690
1.69k
        auto modifier = parentDs->GetData(0);
2691
1.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.69k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.97k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.97k
    Datasource ds(data, size);
2689
1.97k
    if ( parentDs != nullptr ) {
2690
1.97k
        auto modifier = parentDs->GetData(0);
2691
1.97k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.97k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.73k
    Datasource ds(data, size);
2689
1.73k
    if ( parentDs != nullptr ) {
2690
1.73k
        auto modifier = parentDs->GetData(0);
2691
1.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.73k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.17k
    Datasource ds(data, size);
2689
2.17k
    if ( parentDs != nullptr ) {
2690
2.17k
        auto modifier = parentDs->GetData(0);
2691
2.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.17k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.52k
    Datasource ds(data, size);
2689
1.52k
    if ( parentDs != nullptr ) {
2690
1.52k
        auto modifier = parentDs->GetData(0);
2691
1.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.52k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.71k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.71k
    Datasource ds(data, size);
2689
1.71k
    if ( parentDs != nullptr ) {
2690
1.71k
        auto modifier = parentDs->GetData(0);
2691
1.71k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.71k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.55k
    Datasource ds(data, size);
2689
1.55k
    if ( parentDs != nullptr ) {
2690
1.55k
        auto modifier = parentDs->GetData(0);
2691
1.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.55k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::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_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.25k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.25k
    Datasource ds(data, size);
2689
2.25k
    if ( parentDs != nullptr ) {
2690
2.25k
        auto modifier = parentDs->GetData(0);
2691
2.25k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.25k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.16k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.16k
    Datasource ds(data, size);
2689
2.16k
    if ( parentDs != nullptr ) {
2690
2.16k
        auto modifier = parentDs->GetData(0);
2691
2.16k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.16k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.16k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.49k
    Datasource ds(data, size);
2689
1.49k
    if ( parentDs != nullptr ) {
2690
1.49k
        auto modifier = parentDs->GetData(0);
2691
1.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.49k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.49k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.75k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.75k
    Datasource ds(data, size);
2689
1.75k
    if ( parentDs != nullptr ) {
2690
1.75k
        auto modifier = parentDs->GetData(0);
2691
1.75k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.75k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.68k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.68k
    Datasource ds(data, size);
2689
1.68k
    if ( parentDs != nullptr ) {
2690
1.68k
        auto modifier = parentDs->GetData(0);
2691
1.68k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.68k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.56k
    Datasource ds(data, size);
2689
1.56k
    if ( parentDs != nullptr ) {
2690
1.56k
        auto modifier = parentDs->GetData(0);
2691
1.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.56k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.49k
    Datasource ds(data, size);
2689
1.49k
    if ( parentDs != nullptr ) {
2690
1.49k
        auto modifier = parentDs->GetData(0);
2691
1.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.49k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.81k
    Datasource ds(data, size);
2689
1.81k
    if ( parentDs != nullptr ) {
2690
1.81k
        auto modifier = parentDs->GetData(0);
2691
1.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.81k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.49k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.49k
    Datasource ds(data, size);
2689
1.49k
    if ( parentDs != nullptr ) {
2690
1.49k
        auto modifier = parentDs->GetData(0);
2691
1.49k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.49k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.59k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.59k
    Datasource ds(data, size);
2689
1.59k
    if ( parentDs != nullptr ) {
2690
1.59k
        auto modifier = parentDs->GetData(0);
2691
1.59k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.59k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.91k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.91k
    Datasource ds(data, size);
2689
1.91k
    if ( parentDs != nullptr ) {
2690
1.91k
        auto modifier = parentDs->GetData(0);
2691
1.91k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.91k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.91k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.41k
    Datasource ds(data, size);
2689
2.41k
    if ( parentDs != nullptr ) {
2690
2.41k
        auto modifier = parentDs->GetData(0);
2691
2.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.41k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.87k
    Datasource ds(data, size);
2689
1.87k
    if ( parentDs != nullptr ) {
2690
1.87k
        auto modifier = parentDs->GetData(0);
2691
1.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.87k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.28k
    Datasource ds(data, size);
2689
2.28k
    if ( parentDs != nullptr ) {
2690
2.28k
        auto modifier = parentDs->GetData(0);
2691
2.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.28k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.59k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.59k
    Datasource ds(data, size);
2689
1.59k
    if ( parentDs != nullptr ) {
2690
1.59k
        auto modifier = parentDs->GetData(0);
2691
1.59k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.59k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.59k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.88k
    Datasource ds(data, size);
2689
1.88k
    if ( parentDs != nullptr ) {
2690
1.88k
        auto modifier = parentDs->GetData(0);
2691
1.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.88k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.57k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.57k
    Datasource ds(data, size);
2689
1.57k
    if ( parentDs != nullptr ) {
2690
1.57k
        auto modifier = parentDs->GetData(0);
2691
1.57k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.57k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::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::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.37k
    Datasource ds(data, size);
2689
1.37k
    if ( parentDs != nullptr ) {
2690
1.37k
        auto modifier = parentDs->GetData(0);
2691
1.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.37k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.37k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.67k
    Datasource ds(data, size);
2689
1.67k
    if ( parentDs != nullptr ) {
2690
1.67k
        auto modifier = parentDs->GetData(0);
2691
1.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.67k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.67k
}
2696
2697
template <class ResultType, class OperationType>
2698
217k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
217k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
217k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
217k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
217k
    if ( modules.find(moduleID) == modules.end() ) {
2712
163k
        return nullptr;
2713
163k
    }
2714
2715
53.6k
    return modules.at(moduleID);
2716
217k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.37k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.37k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.37k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.37k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.37k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.24k
        return nullptr;
2713
2.24k
    }
2714
2715
2.13k
    return modules.at(moduleID);
2716
4.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.51k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.51k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.51k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.51k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.51k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.15k
        return nullptr;
2713
2.15k
    }
2714
2715
1.35k
    return modules.at(moduleID);
2716
3.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.50k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.24k
        return nullptr;
2713
2.24k
    }
2714
2715
2.26k
    return modules.at(moduleID);
2716
4.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.09k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.09k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.09k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.09k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.09k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.59k
        return nullptr;
2713
2.59k
    }
2714
2715
1.50k
    return modules.at(moduleID);
2716
4.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
14.3k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
14.3k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
14.3k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
14.3k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
14.3k
    if ( modules.find(moduleID) == modules.end() ) {
2712
6.07k
        return nullptr;
2713
6.07k
    }
2714
2715
8.23k
    return modules.at(moduleID);
2716
14.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
12.2k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
12.2k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
12.2k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
12.2k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
12.2k
    if ( modules.find(moduleID) == modules.end() ) {
2712
5.28k
        return nullptr;
2713
5.28k
    }
2714
2715
6.93k
    return modules.at(moduleID);
2716
12.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.18k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.18k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.18k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.56k
        return nullptr;
2713
1.56k
    }
2714
2715
620
    return modules.at(moduleID);
2716
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.83k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.83k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.83k
    if ( modules.find(moduleID) == modules.end() ) {
2712
3.02k
        return nullptr;
2713
3.02k
    }
2714
2715
3.80k
    return modules.at(moduleID);
2716
6.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.26k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.26k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.26k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.85k
        return nullptr;
2713
1.85k
    }
2714
2715
411
    return modules.at(moduleID);
2716
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.39k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.39k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.39k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.39k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.39k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.93k
        return nullptr;
2713
1.93k
    }
2714
2715
460
    return modules.at(moduleID);
2716
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.81k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.46k
        return nullptr;
2713
2.46k
    }
2714
2715
348
    return modules.at(moduleID);
2716
2.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.21k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.21k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.21k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.21k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.21k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.90k
        return nullptr;
2713
1.90k
    }
2714
2715
1.31k
    return modules.at(moduleID);
2716
3.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.55k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.55k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.55k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.55k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.55k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.16k
        return nullptr;
2713
2.16k
    }
2714
2715
388
    return modules.at(moduleID);
2716
2.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::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
338
    return modules.at(moduleID);
2716
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.45k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.45k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.45k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.07k
        return nullptr;
2713
1.07k
    }
2714
2715
382
    return modules.at(moduleID);
2716
1.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.78k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.78k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.78k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.78k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.78k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.66k
        return nullptr;
2713
1.66k
    }
2714
2715
121
    return modules.at(moduleID);
2716
1.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.05k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.05k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.05k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.87k
        return nullptr;
2713
1.87k
    }
2714
2715
1.18k
    return modules.at(moduleID);
2716
3.05k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.18k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.18k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.18k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.72k
        return nullptr;
2713
1.72k
    }
2714
2715
459
    return modules.at(moduleID);
2716
2.18k
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::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.38k
        return nullptr;
2713
2.38k
    }
2714
2715
277
    return modules.at(moduleID);
2716
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::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
1.58k
        return nullptr;
2713
1.58k
    }
2714
2715
1.09k
    return modules.at(moduleID);
2716
2.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.81k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.81k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.81k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.81k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.81k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.37k
        return nullptr;
2713
1.37k
    }
2714
2715
437
    return modules.at(moduleID);
2716
1.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.59k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.59k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.59k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.59k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.59k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.86k
        return nullptr;
2713
1.86k
    }
2714
2715
731
    return modules.at(moduleID);
2716
2.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.23k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.23k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.23k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.10k
        return nullptr;
2713
2.10k
    }
2714
2715
121
    return modules.at(moduleID);
2716
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.24k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.24k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.24k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.42k
        return nullptr;
2713
1.42k
    }
2714
2715
820
    return modules.at(moduleID);
2716
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.13k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.87k
        return nullptr;
2713
1.87k
    }
2714
2715
259
    return modules.at(moduleID);
2716
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.87k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.87k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.87k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.87k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.87k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.70k
        return nullptr;
2713
1.70k
    }
2714
2715
168
    return modules.at(moduleID);
2716
1.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.44k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.44k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.44k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.31k
        return nullptr;
2713
1.31k
    }
2714
2715
128
    return modules.at(moduleID);
2716
1.44k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.79k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.79k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.79k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.69k
        return nullptr;
2713
1.69k
    }
2714
2715
104
    return modules.at(moduleID);
2716
1.79k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.59k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.59k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.59k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.59k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.59k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.08k
        return nullptr;
2713
1.08k
    }
2714
2715
513
    return modules.at(moduleID);
2716
1.59k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.87k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.87k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.87k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.87k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.87k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.54k
        return nullptr;
2713
2.54k
    }
2714
2715
329
    return modules.at(moduleID);
2716
2.87k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.53k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.41k
        return nullptr;
2713
1.41k
    }
2714
2715
120
    return modules.at(moduleID);
2716
1.53k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::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.92k
        return nullptr;
2713
1.92k
    }
2714
2715
132
    return modules.at(moduleID);
2716
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.23k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.23k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.23k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.41k
        return nullptr;
2713
2.41k
    }
2714
2715
819
    return modules.at(moduleID);
2716
3.23k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.23k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.23k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.23k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.84k
        return nullptr;
2713
1.84k
    }
2714
2715
388
    return modules.at(moduleID);
2716
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.18k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.18k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.18k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.05k
        return nullptr;
2713
2.05k
    }
2714
2715
133
    return modules.at(moduleID);
2716
2.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.44k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.44k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.44k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.44k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.44k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.30k
        return nullptr;
2713
1.30k
    }
2714
2715
135
    return modules.at(moduleID);
2716
1.44k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.31k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.31k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.31k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.16k
        return nullptr;
2713
2.16k
    }
2714
2715
155
    return modules.at(moduleID);
2716
2.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.47k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.47k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.47k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.47k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.47k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.35k
        return nullptr;
2713
1.35k
    }
2714
2715
129
    return modules.at(moduleID);
2716
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.80k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.80k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.80k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.80k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.80k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.68k
        return nullptr;
2713
1.68k
    }
2714
2715
114
    return modules.at(moduleID);
2716
1.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.72k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.72k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.72k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.72k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.72k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.57k
        return nullptr;
2713
1.57k
    }
2714
2715
144
    return modules.at(moduleID);
2716
1.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.13k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.99k
        return nullptr;
2713
1.99k
    }
2714
2715
139
    return modules.at(moduleID);
2716
2.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.24k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.24k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.24k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.03k
        return nullptr;
2713
1.03k
    }
2714
2715
212
    return modules.at(moduleID);
2716
1.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.83k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.83k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.83k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.59k
        return nullptr;
2713
1.59k
    }
2714
2715
240
    return modules.at(moduleID);
2716
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.86k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.86k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.86k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.87k
        return nullptr;
2713
1.87k
    }
2714
2715
994
    return modules.at(moduleID);
2716
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.29k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.29k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.29k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.10k
        return nullptr;
2713
1.10k
    }
2714
2715
195
    return modules.at(moduleID);
2716
1.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.19k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.19k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.19k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.00k
        return nullptr;
2713
1.00k
    }
2714
2715
194
    return modules.at(moduleID);
2716
1.19k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.71k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.71k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.71k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.71k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.71k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.53k
        return nullptr;
2713
1.53k
    }
2714
2715
179
    return modules.at(moduleID);
2716
1.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::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.37k
        return nullptr;
2713
2.37k
    }
2714
2715
121
    return modules.at(moduleID);
2716
2.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.50k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.17k
        return nullptr;
2713
2.17k
    }
2714
2715
324
    return modules.at(moduleID);
2716
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
14.1k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
14.1k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
14.1k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
14.1k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
14.1k
    if ( modules.find(moduleID) == modules.end() ) {
2712
8.34k
        return nullptr;
2713
8.34k
    }
2714
2715
5.85k
    return modules.at(moduleID);
2716
14.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.92k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.76k
        return nullptr;
2713
1.76k
    }
2714
2715
167
    return modules.at(moduleID);
2716
1.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.57k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.57k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.57k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.04k
        return nullptr;
2713
1.04k
    }
2714
2715
526
    return modules.at(moduleID);
2716
1.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.45k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.45k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.45k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.30k
        return nullptr;
2713
1.30k
    }
2714
2715
150
    return modules.at(moduleID);
2716
1.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.22k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.06k
        return nullptr;
2713
1.06k
    }
2714
2715
159
    return modules.at(moduleID);
2716
1.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.43k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.43k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.43k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.32k
        return nullptr;
2713
2.32k
    }
2714
2715
114
    return modules.at(moduleID);
2716
2.43k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.88k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.88k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.88k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.88k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.88k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.76k
        return nullptr;
2713
1.76k
    }
2714
2715
124
    return modules.at(moduleID);
2716
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.13k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.95k
        return nullptr;
2713
1.95k
    }
2714
2715
176
    return modules.at(moduleID);
2716
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.62k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.62k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.62k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.43k
        return nullptr;
2713
1.43k
    }
2714
2715
189
    return modules.at(moduleID);
2716
1.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.91k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.91k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.91k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.91k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.91k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.76k
        return nullptr;
2713
1.76k
    }
2714
2715
156
    return modules.at(moduleID);
2716
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.70k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.70k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.70k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.70k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.70k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.54k
        return nullptr;
2713
1.54k
    }
2714
2715
165
    return modules.at(moduleID);
2716
1.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.15k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.15k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.15k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.15k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.15k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.00k
        return nullptr;
2713
2.00k
    }
2714
2715
148
    return modules.at(moduleID);
2716
2.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.50k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.36k
        return nullptr;
2713
1.36k
    }
2714
2715
143
    return modules.at(moduleID);
2716
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.68k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.68k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.68k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.52k
        return nullptr;
2713
1.52k
    }
2714
2715
162
    return modules.at(moduleID);
2716
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.54k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.54k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.54k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.54k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.54k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.41k
        return nullptr;
2713
1.41k
    }
2714
2715
128
    return modules.at(moduleID);
2716
1.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.34k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.34k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.34k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.34k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.34k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.20k
        return nullptr;
2713
2.20k
    }
2714
2715
139
    return modules.at(moduleID);
2716
2.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.23k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.23k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.23k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.08k
        return nullptr;
2713
2.08k
    }
2714
2715
149
    return modules.at(moduleID);
2716
2.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.14k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.14k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.14k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.98k
        return nullptr;
2713
1.98k
    }
2714
2715
153
    return modules.at(moduleID);
2716
2.14k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.47k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.47k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.47k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.47k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.47k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.30k
        return nullptr;
2713
1.30k
    }
2714
2715
171
    return modules.at(moduleID);
2716
1.47k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.73k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.73k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.73k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.59k
        return nullptr;
2713
1.59k
    }
2714
2715
147
    return modules.at(moduleID);
2716
1.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.65k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.65k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.65k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.52k
        return nullptr;
2713
1.52k
    }
2714
2715
134
    return modules.at(moduleID);
2716
1.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.53k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.37k
        return nullptr;
2713
1.37k
    }
2714
2715
165
    return modules.at(moduleID);
2716
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.48k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.48k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.48k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.48k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.48k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.34k
        return nullptr;
2713
1.34k
    }
2714
2715
134
    return modules.at(moduleID);
2716
1.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.79k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.79k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.79k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.65k
        return nullptr;
2713
1.65k
    }
2714
2715
134
    return modules.at(moduleID);
2716
1.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.47k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.47k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.47k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.47k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.47k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.34k
        return nullptr;
2713
1.34k
    }
2714
2715
134
    return modules.at(moduleID);
2716
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.57k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.57k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.57k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.43k
        return nullptr;
2713
1.43k
    }
2714
2715
143
    return modules.at(moduleID);
2716
1.57k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.89k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.89k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.89k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.75k
        return nullptr;
2713
1.75k
    }
2714
2715
136
    return modules.at(moduleID);
2716
1.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.39k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.39k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.39k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.39k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.39k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.18k
        return nullptr;
2713
2.18k
    }
2714
2715
215
    return modules.at(moduleID);
2716
2.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.85k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.85k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.85k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.85k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.85k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.70k
        return nullptr;
2713
1.70k
    }
2714
2715
152
    return modules.at(moduleID);
2716
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.26k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.26k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.26k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.05k
        return nullptr;
2713
2.05k
    }
2714
2715
205
    return modules.at(moduleID);
2716
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.57k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.57k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.57k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.57k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.57k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.45k
        return nullptr;
2713
1.45k
    }
2714
2715
117
    return modules.at(moduleID);
2716
1.57k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.86k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.86k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.86k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.67k
        return nullptr;
2713
1.67k
    }
2714
2715
189
    return modules.at(moduleID);
2716
1.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.55k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.55k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.55k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.55k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.55k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.43k
        return nullptr;
2713
1.43k
    }
2714
2715
125
    return modules.at(moduleID);
2716
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.54k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.54k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.54k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.54k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.54k
    if ( modules.find(moduleID) == modules.end() ) {
2712
2.35k
        return nullptr;
2713
2.35k
    }
2714
2715
188
    return modules.at(moduleID);
2716
2.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.35k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.35k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.35k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.35k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.35k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.23k
        return nullptr;
2713
1.23k
    }
2714
2715
121
    return modules.at(moduleID);
2716
1.35k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.65k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.65k
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.65k
    if ( modules.find(moduleID) == modules.end() ) {
2712
1.50k
        return nullptr;
2713
1.50k
    }
2714
2715
146
    return modules.at(moduleID);
2716
1.65k
}
2717
2718
template <class ResultType, class OperationType>
2719
25.9k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
25.9k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
25.9k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
219k
    do {
2725
219k
        auto op = getOp(&parentDs, data, size);
2726
219k
        auto module = getModule(parentDs);
2727
219k
        if ( module == nullptr ) {
2728
163k
            continue;
2729
163k
        }
2730
2731
55.6k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
55.6k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
924
            break;
2736
924
        }
2737
218k
    } while ( parentDs.Get<bool>() == true );
2738
2739
25.9k
    if ( operations.empty() == true ) {
2740
1.38k
        return;
2741
1.38k
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
24.5k
#if 1
2745
24.5k
    {
2746
24.5k
        std::set<uint64_t> moduleIDs;
2747
40.0k
        for (const auto& m : modules ) {
2748
40.0k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
40.0k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
40.0k
            moduleIDs.insert(moduleID);
2756
40.0k
        }
2757
2758
24.5k
        std::set<uint64_t> operationModuleIDs;
2759
49.2k
        for (const auto& op : operations) {
2760
49.2k
            operationModuleIDs.insert(op.first->ID);
2761
49.2k
        }
2762
2763
24.5k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
24.5k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
24.5k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
24.5k
        for (const auto& id : addModuleIDs) {
2768
18.7k
            operations.push_back({ modules.at(id), operations[0].second});
2769
18.7k
        }
2770
24.5k
    }
2771
24.5k
#endif
2772
2773
24.5k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
24.5k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
92.5k
    for (size_t i = 0; i < operations.size(); i++) {
2781
67.9k
        auto& operation = operations[i];
2782
2783
67.9k
        auto& module = operation.first;
2784
67.9k
        auto& op = operation.second;
2785
2786
67.9k
        if ( i > 0 ) {
2787
47.9k
            auto& prevModule = operations[i-1].first;
2788
47.9k
            auto& prevOp = operations[i].second;
2789
2790
47.9k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
26.6k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
26.6k
                if ( curModifier.size() == 0 ) {
2793
9.56M
                    for (size_t j = 0; j < 512; j++) {
2794
9.54M
                        curModifier.push_back(1);
2795
9.54M
                    }
2796
18.6k
                } else {
2797
371k
                    for (auto& c : curModifier) {
2798
371k
                        c++;
2799
371k
                    }
2800
8.02k
                }
2801
26.6k
            }
2802
47.9k
        }
2803
2804
67.9k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
67.9k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
67.9k
        const auto& result = results.back();
2811
2812
67.9k
        if ( result.second != std::nullopt ) {
2813
19.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
19.3k
        }
2820
2821
67.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
67.9k
        if ( options.disableTests == false ) {
2830
67.9k
            tests::test(op, result.second);
2831
67.9k
        }
2832
2833
67.9k
        postprocess(module, op, result);
2834
67.9k
    }
2835
2836
24.5k
    if ( options.noCompare == false ) {
2837
20.0k
        compare(operations, results, data, size);
2838
20.0k
    }
2839
24.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.18k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.18k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.18k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.40k
    do {
2725
4.40k
        auto op = getOp(&parentDs, data, size);
2726
4.40k
        auto module = getModule(parentDs);
2727
4.40k
        if ( module == nullptr ) {
2728
2.24k
            continue;
2729
2.24k
        }
2730
2731
2.16k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.16k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
4.39k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.18k
    if ( operations.empty() == true ) {
2740
45
        return;
2741
45
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.14k
#if 1
2745
1.14k
    {
2746
1.14k
        std::set<uint64_t> moduleIDs;
2747
2.15k
        for (const auto& m : modules ) {
2748
2.15k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.15k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.15k
            moduleIDs.insert(moduleID);
2756
2.15k
        }
2757
2758
1.14k
        std::set<uint64_t> operationModuleIDs;
2759
2.06k
        for (const auto& op : operations) {
2760
2.06k
            operationModuleIDs.insert(op.first->ID);
2761
2.06k
        }
2762
2763
1.14k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.14k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.14k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.14k
        for (const auto& id : addModuleIDs) {
2768
1.04k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.04k
        }
2770
1.14k
    }
2771
1.14k
#endif
2772
2773
1.14k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.14k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.26k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.11k
        auto& operation = operations[i];
2782
2783
3.11k
        auto& module = operation.first;
2784
3.11k
        auto& op = operation.second;
2785
2786
3.11k
        if ( i > 0 ) {
2787
2.04k
            auto& prevModule = operations[i-1].first;
2788
2.04k
            auto& prevOp = operations[i].second;
2789
2790
2.04k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
935
                auto& curModifier = op.modifier.GetVectorPtr();
2792
935
                if ( curModifier.size() == 0 ) {
2793
363k
                    for (size_t j = 0; j < 512; j++) {
2794
362k
                        curModifier.push_back(1);
2795
362k
                    }
2796
708
                } else {
2797
7.70k
                    for (auto& c : curModifier) {
2798
7.70k
                        c++;
2799
7.70k
                    }
2800
227
                }
2801
935
            }
2802
2.04k
        }
2803
2804
3.11k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.11k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.11k
        const auto& result = results.back();
2811
2812
3.11k
        if ( result.second != std::nullopt ) {
2813
1.75k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.75k
        }
2820
2821
3.11k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.11k
        if ( options.disableTests == false ) {
2830
3.11k
            tests::test(op, result.second);
2831
3.11k
        }
2832
2833
3.11k
        postprocess(module, op, result);
2834
3.11k
    }
2835
2836
1.14k
    if ( options.noCompare == false ) {
2837
1.07k
        compare(operations, results, data, size);
2838
1.07k
    }
2839
1.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
637
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
637
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
637
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.54k
    do {
2725
3.54k
        auto op = getOp(&parentDs, data, size);
2726
3.54k
        auto module = getModule(parentDs);
2727
3.54k
        if ( module == nullptr ) {
2728
2.15k
            continue;
2729
2.15k
        }
2730
2731
1.38k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.38k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
3.54k
    } while ( parentDs.Get<bool>() == true );
2738
2739
637
    if ( operations.empty() == true ) {
2740
20
        return;
2741
20
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
617
#if 1
2745
617
    {
2746
617
        std::set<uint64_t> moduleIDs;
2747
1.13k
        for (const auto& m : modules ) {
2748
1.13k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.13k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.13k
            moduleIDs.insert(moduleID);
2756
1.13k
        }
2757
2758
617
        std::set<uint64_t> operationModuleIDs;
2759
1.29k
        for (const auto& op : operations) {
2760
1.29k
            operationModuleIDs.insert(op.first->ID);
2761
1.29k
        }
2762
2763
617
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
617
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
617
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
617
        for (const auto& id : addModuleIDs) {
2768
552
            operations.push_back({ modules.at(id), operations[0].second});
2769
552
        }
2770
617
    }
2771
617
#endif
2772
2773
617
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
617
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.46k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.84k
        auto& operation = operations[i];
2782
2783
1.84k
        auto& module = operation.first;
2784
1.84k
        auto& op = operation.second;
2785
2786
1.84k
        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
687
                auto& curModifier = op.modifier.GetVectorPtr();
2792
687
                if ( curModifier.size() == 0 ) {
2793
237k
                    for (size_t j = 0; j < 512; j++) {
2794
236k
                        curModifier.push_back(1);
2795
236k
                    }
2796
462
                } else {
2797
1.69k
                    for (auto& c : curModifier) {
2798
1.69k
                        c++;
2799
1.69k
                    }
2800
225
                }
2801
687
            }
2802
1.27k
        }
2803
2804
1.84k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.84k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.84k
        const auto& result = results.back();
2811
2812
1.84k
        if ( result.second != std::nullopt ) {
2813
872
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
872
        }
2820
2821
1.84k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.84k
        if ( options.disableTests == false ) {
2830
1.84k
            tests::test(op, result.second);
2831
1.84k
        }
2832
2833
1.84k
        postprocess(module, op, result);
2834
1.84k
    }
2835
2836
617
    if ( options.noCompare == false ) {
2837
565
        compare(operations, results, data, size);
2838
565
    }
2839
617
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
550
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
550
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
550
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.52k
    do {
2725
4.52k
        auto op = getOp(&parentDs, data, size);
2726
4.52k
        auto module = getModule(parentDs);
2727
4.52k
        if ( module == nullptr ) {
2728
2.24k
            continue;
2729
2.24k
        }
2730
2731
2.28k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.28k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
4.52k
    } while ( parentDs.Get<bool>() == true );
2738
2739
550
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
544
#if 1
2745
544
    {
2746
544
        std::set<uint64_t> moduleIDs;
2747
980
        for (const auto& m : modules ) {
2748
980
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
980
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
980
            moduleIDs.insert(moduleID);
2756
980
        }
2757
2758
544
        std::set<uint64_t> operationModuleIDs;
2759
2.14k
        for (const auto& op : operations) {
2760
2.14k
            operationModuleIDs.insert(op.first->ID);
2761
2.14k
        }
2762
2763
544
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
544
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
544
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
544
        for (const auto& id : addModuleIDs) {
2768
468
            operations.push_back({ modules.at(id), operations[0].second});
2769
468
        }
2770
544
    }
2771
544
#endif
2772
2773
544
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
544
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.15k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.61k
        auto& operation = operations[i];
2782
2783
2.61k
        auto& module = operation.first;
2784
2.61k
        auto& op = operation.second;
2785
2786
2.61k
        if ( i > 0 ) {
2787
2.12k
            auto& prevModule = operations[i-1].first;
2788
2.12k
            auto& prevOp = operations[i].second;
2789
2790
2.12k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.61k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.61k
                if ( curModifier.size() == 0 ) {
2793
744k
                    for (size_t j = 0; j < 512; j++) {
2794
743k
                        curModifier.push_back(1);
2795
743k
                    }
2796
1.45k
                } else {
2797
1.56k
                    for (auto& c : curModifier) {
2798
1.56k
                        c++;
2799
1.56k
                    }
2800
159
                }
2801
1.61k
            }
2802
2.12k
        }
2803
2804
2.61k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.61k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.61k
        const auto& result = results.back();
2811
2812
2.61k
        if ( result.second != std::nullopt ) {
2813
1.21k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.21k
        }
2820
2821
2.61k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.61k
        if ( options.disableTests == false ) {
2830
2.61k
            tests::test(op, result.second);
2831
2.61k
        }
2832
2833
2.61k
        postprocess(module, op, result);
2834
2.61k
    }
2835
2836
544
    if ( options.noCompare == false ) {
2837
490
        compare(operations, results, data, size);
2838
490
    }
2839
544
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
542
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
542
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
542
    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
2.59k
            continue;
2729
2.59k
        }
2730
2731
1.52k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.52k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
4.11k
    } while ( parentDs.Get<bool>() == true );
2738
2739
542
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
527
#if 1
2745
527
    {
2746
527
        std::set<uint64_t> moduleIDs;
2747
956
        for (const auto& m : modules ) {
2748
956
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
956
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
956
            moduleIDs.insert(moduleID);
2756
956
        }
2757
2758
527
        std::set<uint64_t> operationModuleIDs;
2759
1.41k
        for (const auto& op : operations) {
2760
1.41k
            operationModuleIDs.insert(op.first->ID);
2761
1.41k
        }
2762
2763
527
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
527
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
527
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
527
        for (const auto& id : addModuleIDs) {
2768
458
            operations.push_back({ modules.at(id), operations[0].second});
2769
458
        }
2770
527
    }
2771
527
#endif
2772
2773
527
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
527
    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.87k
        auto& operation = operations[i];
2782
2783
1.87k
        auto& module = operation.first;
2784
1.87k
        auto& op = operation.second;
2785
2786
1.87k
        if ( i > 0 ) {
2787
1.39k
            auto& prevModule = operations[i-1].first;
2788
1.39k
            auto& prevOp = operations[i].second;
2789
2790
1.39k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
903
                auto& curModifier = op.modifier.GetVectorPtr();
2792
903
                if ( curModifier.size() == 0 ) {
2793
332k
                    for (size_t j = 0; j < 512; j++) {
2794
332k
                        curModifier.push_back(1);
2795
332k
                    }
2796
649
                } else {
2797
663
                    for (auto& c : curModifier) {
2798
663
                        c++;
2799
663
                    }
2800
254
                }
2801
903
            }
2802
1.39k
        }
2803
2804
1.87k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.87k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.87k
        const auto& result = results.back();
2811
2812
1.87k
        if ( result.second != std::nullopt ) {
2813
774
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
774
        }
2820
2821
1.87k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.87k
        if ( options.disableTests == false ) {
2830
1.87k
            tests::test(op, result.second);
2831
1.87k
        }
2832
2833
1.87k
        postprocess(module, op, result);
2834
1.87k
    }
2835
2836
527
    if ( options.noCompare == false ) {
2837
478
        compare(operations, results, data, size);
2838
478
    }
2839
527
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.48k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.48k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.48k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
14.3k
    do {
2725
14.3k
        auto op = getOp(&parentDs, data, size);
2726
14.3k
        auto module = getModule(parentDs);
2727
14.3k
        if ( module == nullptr ) {
2728
6.07k
            continue;
2729
6.07k
        }
2730
2731
8.26k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8.26k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
14.3k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.48k
    if ( operations.empty() == true ) {
2740
29
        return;
2741
29
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.45k
#if 1
2745
2.45k
    {
2746
2.45k
        std::set<uint64_t> moduleIDs;
2747
4.79k
        for (const auto& m : modules ) {
2748
4.79k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.79k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.79k
            moduleIDs.insert(moduleID);
2756
4.79k
        }
2757
2758
2.45k
        std::set<uint64_t> operationModuleIDs;
2759
8.10k
        for (const auto& op : operations) {
2760
8.10k
            operationModuleIDs.insert(op.first->ID);
2761
8.10k
        }
2762
2763
2.45k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.45k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.45k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.45k
        for (const auto& id : addModuleIDs) {
2768
2.31k
            operations.push_back({ modules.at(id), operations[0].second});
2769
2.31k
        }
2770
2.45k
    }
2771
2.45k
#endif
2772
2773
2.45k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.45k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12.8k
    for (size_t i = 0; i < operations.size(); i++) {
2781
10.4k
        auto& operation = operations[i];
2782
2783
10.4k
        auto& module = operation.first;
2784
10.4k
        auto& op = operation.second;
2785
2786
10.4k
        if ( i > 0 ) {
2787
8.01k
            auto& prevModule = operations[i-1].first;
2788
8.01k
            auto& prevOp = operations[i].second;
2789
2790
8.01k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
5.46k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5.46k
                if ( curModifier.size() == 0 ) {
2793
2.04M
                    for (size_t j = 0; j < 512; j++) {
2794
2.04M
                        curModifier.push_back(1);
2795
2.04M
                    }
2796
3.99k
                } else {
2797
26.9k
                    for (auto& c : curModifier) {
2798
26.9k
                        c++;
2799
26.9k
                    }
2800
1.47k
                }
2801
5.46k
            }
2802
8.01k
        }
2803
2804
10.4k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
10.4k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
10.4k
        const auto& result = results.back();
2811
2812
10.4k
        if ( result.second != std::nullopt ) {
2813
3.43k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.43k
        }
2820
2821
10.4k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
10.4k
        if ( options.disableTests == false ) {
2830
10.4k
            tests::test(op, result.second);
2831
10.4k
        }
2832
2833
10.4k
        postprocess(module, op, result);
2834
10.4k
    }
2835
2836
2.45k
    if ( options.noCompare == false ) {
2837
2.39k
        compare(operations, results, data, size);
2838
2.39k
    }
2839
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.51k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.51k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.51k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
12.2k
    do {
2725
12.2k
        auto op = getOp(&parentDs, data, size);
2726
12.2k
        auto module = getModule(parentDs);
2727
12.2k
        if ( module == nullptr ) {
2728
5.28k
            continue;
2729
5.28k
        }
2730
2731
6.95k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6.95k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
12.2k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.51k
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.50k
#if 1
2745
2.50k
    {
2746
2.50k
        std::set<uint64_t> moduleIDs;
2747
4.88k
        for (const auto& m : modules ) {
2748
4.88k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.88k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.88k
            moduleIDs.insert(moduleID);
2756
4.88k
        }
2757
2758
2.50k
        std::set<uint64_t> operationModuleIDs;
2759
6.80k
        for (const auto& op : operations) {
2760
6.80k
            operationModuleIDs.insert(op.first->ID);
2761
6.80k
        }
2762
2763
2.50k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.50k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.50k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.50k
        for (const auto& id : addModuleIDs) {
2768
2.36k
            operations.push_back({ modules.at(id), operations[0].second});
2769
2.36k
        }
2770
2.50k
    }
2771
2.50k
#endif
2772
2773
2.50k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.50k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
11.6k
    for (size_t i = 0; i < operations.size(); i++) {
2781
9.16k
        auto& operation = operations[i];
2782
2783
9.16k
        auto& module = operation.first;
2784
9.16k
        auto& op = operation.second;
2785
2786
9.16k
        if ( i > 0 ) {
2787
6.72k
            auto& prevModule = operations[i-1].first;
2788
6.72k
            auto& prevOp = operations[i].second;
2789
2790
6.72k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4.16k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4.16k
                if ( curModifier.size() == 0 ) {
2793
1.61M
                    for (size_t j = 0; j < 512; j++) {
2794
1.61M
                        curModifier.push_back(1);
2795
1.61M
                    }
2796
3.15k
                } else {
2797
5.49k
                    for (auto& c : curModifier) {
2798
5.49k
                        c++;
2799
5.49k
                    }
2800
1.01k
                }
2801
4.16k
            }
2802
6.72k
        }
2803
2804
9.16k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9.16k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9.16k
        const auto& result = results.back();
2811
2812
9.16k
        if ( result.second != std::nullopt ) {
2813
944
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
944
        }
2820
2821
9.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
9.16k
        if ( options.disableTests == false ) {
2830
9.16k
            tests::test(op, result.second);
2831
9.16k
        }
2832
2833
9.16k
        postprocess(module, op, result);
2834
9.16k
    }
2835
2836
2.50k
    if ( options.noCompare == false ) {
2837
2.44k
        compare(operations, results, data, size);
2838
2.44k
    }
2839
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::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
2.20k
    do {
2725
2.20k
        auto op = getOp(&parentDs, data, size);
2726
2.20k
        auto module = getModule(parentDs);
2727
2.20k
        if ( module == nullptr ) {
2728
1.56k
            continue;
2729
1.56k
        }
2730
2731
643
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
643
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
2.20k
    } while ( parentDs.Get<bool>() == true );
2738
2739
192
    if ( operations.empty() == true ) {
2740
28
        return;
2741
28
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
164
#if 1
2745
164
    {
2746
164
        std::set<uint64_t> moduleIDs;
2747
232
        for (const auto& m : modules ) {
2748
232
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
232
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
232
            moduleIDs.insert(moduleID);
2756
232
        }
2757
2758
164
        std::set<uint64_t> operationModuleIDs;
2759
555
        for (const auto& op : operations) {
2760
555
            operationModuleIDs.insert(op.first->ID);
2761
555
        }
2762
2763
164
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
164
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
164
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
164
        for (const auto& id : addModuleIDs) {
2768
99
            operations.push_back({ modules.at(id), operations[0].second});
2769
99
        }
2770
164
    }
2771
164
#endif
2772
2773
164
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
164
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
818
    for (size_t i = 0; i < operations.size(); i++) {
2781
654
        auto& operation = operations[i];
2782
2783
654
        auto& module = operation.first;
2784
654
        auto& op = operation.second;
2785
2786
654
        if ( i > 0 ) {
2787
538
            auto& prevModule = operations[i-1].first;
2788
538
            auto& prevOp = operations[i].second;
2789
2790
538
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
403
                auto& curModifier = op.modifier.GetVectorPtr();
2792
403
                if ( curModifier.size() == 0 ) {
2793
135k
                    for (size_t j = 0; j < 512; j++) {
2794
135k
                        curModifier.push_back(1);
2795
135k
                    }
2796
264
                } else {
2797
1.75k
                    for (auto& c : curModifier) {
2798
1.75k
                        c++;
2799
1.75k
                    }
2800
139
                }
2801
403
            }
2802
538
        }
2803
2804
654
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
654
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
654
        const auto& result = results.back();
2811
2812
654
        if ( result.second != std::nullopt ) {
2813
230
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
230
        }
2820
2821
654
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
654
        if ( options.disableTests == false ) {
2830
654
            tests::test(op, result.second);
2831
654
        }
2832
2833
654
        postprocess(module, op, result);
2834
654
    }
2835
2836
164
    if ( options.noCompare == false ) {
2837
116
        compare(operations, results, data, size);
2838
116
    }
2839
164
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.61k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.61k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.61k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.85k
    do {
2725
6.85k
        auto op = getOp(&parentDs, data, size);
2726
6.85k
        auto module = getModule(parentDs);
2727
6.85k
        if ( module == nullptr ) {
2728
3.02k
            continue;
2729
3.02k
        }
2730
2731
3.83k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.83k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
6.85k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.61k
    if ( operations.empty() == true ) {
2740
55
        return;
2741
55
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.55k
#if 1
2745
1.55k
    {
2746
1.55k
        std::set<uint64_t> moduleIDs;
2747
2.97k
        for (const auto& m : modules ) {
2748
2.97k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.97k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.97k
            moduleIDs.insert(moduleID);
2756
2.97k
        }
2757
2758
1.55k
        std::set<uint64_t> operationModuleIDs;
2759
3.70k
        for (const auto& op : operations) {
2760
3.70k
            operationModuleIDs.insert(op.first->ID);
2761
3.70k
        }
2762
2763
1.55k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.55k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.55k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.55k
        for (const auto& id : addModuleIDs) {
2768
1.44k
            operations.push_back({ modules.at(id), operations[0].second});
2769
1.44k
        }
2770
1.55k
    }
2771
1.55k
#endif
2772
2773
1.55k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.55k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.70k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.14k
        auto& operation = operations[i];
2782
2783
5.14k
        auto& module = operation.first;
2784
5.14k
        auto& op = operation.second;
2785
2786
5.14k
        if ( i > 0 ) {
2787
3.66k
            auto& prevModule = operations[i-1].first;
2788
3.66k
            auto& prevOp = operations[i].second;
2789
2790
3.66k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.15k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.15k
                if ( curModifier.size() == 0 ) {
2793
823k
                    for (size_t j = 0; j < 512; j++) {
2794
822k
                        curModifier.push_back(1);
2795
822k
                    }
2796
1.60k
                } else {
2797
3.85k
                    for (auto& c : curModifier) {
2798
3.85k
                        c++;
2799
3.85k
                    }
2800
544
                }
2801
2.15k
            }
2802
3.66k
        }
2803
2804
5.14k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.14k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.14k
        const auto& result = results.back();
2811
2812
5.14k
        if ( result.second != std::nullopt ) {
2813
2.27k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.27k
        }
2820
2821
5.14k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
5.14k
        if ( options.disableTests == false ) {
2830
5.14k
            tests::test(op, result.second);
2831
5.14k
        }
2832
2833
5.14k
        postprocess(module, op, result);
2834
5.14k
    }
2835
2836
1.55k
    if ( options.noCompare == false ) {
2837
1.48k
        compare(operations, results, data, size);
2838
1.48k
    }
2839
1.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
126
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
126
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
126
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.28k
    do {
2725
2.28k
        auto op = getOp(&parentDs, data, size);
2726
2.28k
        auto module = getModule(parentDs);
2727
2.28k
        if ( module == nullptr ) {
2728
1.85k
            continue;
2729
1.85k
        }
2730
2731
429
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
429
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
2.27k
    } while ( parentDs.Get<bool>() == true );
2738
2739
126
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
105
#if 1
2745
105
    {
2746
105
        std::set<uint64_t> moduleIDs;
2747
124
        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
105
        std::set<uint64_t> operationModuleIDs;
2759
325
        for (const auto& op : operations) {
2760
325
            operationModuleIDs.insert(op.first->ID);
2761
325
        }
2762
2763
105
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
105
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
105
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
105
        for (const auto& id : addModuleIDs) {
2768
41
            operations.push_back({ modules.at(id), operations[0].second});
2769
41
        }
2770
105
    }
2771
105
#endif
2772
2773
105
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
105
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
471
    for (size_t i = 0; i < operations.size(); i++) {
2781
366
        auto& operation = operations[i];
2782
2783
366
        auto& module = operation.first;
2784
366
        auto& op = operation.second;
2785
2786
366
        if ( i > 0 ) {
2787
304
            auto& prevModule = operations[i-1].first;
2788
304
            auto& prevOp = operations[i].second;
2789
2790
304
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
235
                auto& curModifier = op.modifier.GetVectorPtr();
2792
235
                if ( curModifier.size() == 0 ) {
2793
83.1k
                    for (size_t j = 0; j < 512; j++) {
2794
82.9k
                        curModifier.push_back(1);
2795
82.9k
                    }
2796
162
                } else {
2797
356
                    for (auto& c : curModifier) {
2798
356
                        c++;
2799
356
                    }
2800
73
                }
2801
235
            }
2802
304
        }
2803
2804
366
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
366
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
366
        const auto& result = results.back();
2811
2812
366
        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
366
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
366
        if ( options.disableTests == false ) {
2830
366
            tests::test(op, result.second);
2831
366
        }
2832
2833
366
        postprocess(module, op, result);
2834
366
    }
2835
2836
105
    if ( options.noCompare == false ) {
2837
62
        compare(operations, results, data, size);
2838
62
    }
2839
105
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
101
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
101
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
101
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.41k
    do {
2725
2.41k
        auto op = getOp(&parentDs, data, size);
2726
2.41k
        auto module = getModule(parentDs);
2727
2.41k
        if ( module == nullptr ) {
2728
1.93k
            continue;
2729
1.93k
        }
2730
2731
483
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
483
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
2.41k
    } while ( parentDs.Get<bool>() == true );
2738
2739
101
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
95
#if 1
2745
95
    {
2746
95
        std::set<uint64_t> moduleIDs;
2747
95
        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
95
        std::set<uint64_t> operationModuleIDs;
2759
301
        for (const auto& op : operations) {
2760
301
            operationModuleIDs.insert(op.first->ID);
2761
301
        }
2762
2763
95
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
95
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
95
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
95
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
95
    }
2771
95
#endif
2772
2773
95
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
95
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
418
    for (size_t i = 0; i < operations.size(); i++) {
2781
323
        auto& operation = operations[i];
2782
2783
323
        auto& module = operation.first;
2784
323
        auto& op = operation.second;
2785
2786
323
        if ( i > 0 ) {
2787
280
            auto& prevModule = operations[i-1].first;
2788
280
            auto& prevOp = operations[i].second;
2789
2790
280
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
169
                auto& curModifier = op.modifier.GetVectorPtr();
2792
169
                if ( curModifier.size() == 0 ) {
2793
44.6k
                    for (size_t j = 0; j < 512; j++) {
2794
44.5k
                        curModifier.push_back(1);
2795
44.5k
                    }
2796
87
                } else {
2797
1.26k
                    for (auto& c : curModifier) {
2798
1.26k
                        c++;
2799
1.26k
                    }
2800
82
                }
2801
169
            }
2802
280
        }
2803
2804
323
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
323
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
323
        const auto& result = results.back();
2811
2812
323
        if ( result.second != std::nullopt ) {
2813
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
323
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
323
        if ( options.disableTests == false ) {
2830
323
            tests::test(op, result.second);
2831
323
        }
2832
2833
323
        postprocess(module, op, result);
2834
323
    }
2835
2836
95
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
95
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
140
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
140
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
140
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.83k
    do {
2725
2.83k
        auto op = getOp(&parentDs, data, size);
2726
2.83k
        auto module = getModule(parentDs);
2727
2.83k
        if ( module == nullptr ) {
2728
2.46k
            continue;
2729
2.46k
        }
2730
2731
372
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
372
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
2.83k
    } while ( parentDs.Get<bool>() == true );
2738
2739
140
    if ( operations.empty() == true ) {
2740
37
        return;
2741
37
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
103
#if 1
2745
103
    {
2746
103
        std::set<uint64_t> moduleIDs;
2747
103
        for (const auto& m : modules ) {
2748
100
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
100
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
100
            moduleIDs.insert(moduleID);
2756
100
        }
2757
2758
103
        std::set<uint64_t> operationModuleIDs;
2759
269
        for (const auto& op : operations) {
2760
269
            operationModuleIDs.insert(op.first->ID);
2761
269
        }
2762
2763
103
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
103
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
103
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
103
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
103
    }
2771
103
#endif
2772
2773
103
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
103
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
399
    for (size_t i = 0; i < operations.size(); i++) {
2781
296
        auto& operation = operations[i];
2782
2783
296
        auto& module = operation.first;
2784
296
        auto& op = operation.second;
2785
2786
296
        if ( i > 0 ) {
2787
246
            auto& prevModule = operations[i-1].first;
2788
246
            auto& prevOp = operations[i].second;
2789
2790
246
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
189
                auto& curModifier = op.modifier.GetVectorPtr();
2792
189
                if ( curModifier.size() == 0 ) {
2793
64.6k
                    for (size_t j = 0; j < 512; j++) {
2794
64.5k
                        curModifier.push_back(1);
2795
64.5k
                    }
2796
126
                } else {
2797
342
                    for (auto& c : curModifier) {
2798
342
                        c++;
2799
342
                    }
2800
63
                }
2801
189
            }
2802
246
        }
2803
2804
296
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
296
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
296
        const auto& result = results.back();
2811
2812
296
        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
296
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
296
        if ( options.disableTests == false ) {
2830
296
            tests::test(op, result.second);
2831
296
        }
2832
2833
296
        postprocess(module, op, result);
2834
296
    }
2835
2836
103
    if ( options.noCompare == false ) {
2837
50
        compare(operations, results, data, size);
2838
50
    }
2839
103
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
618
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
618
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
618
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.23k
    do {
2725
3.23k
        auto op = getOp(&parentDs, data, size);
2726
3.23k
        auto module = getModule(parentDs);
2727
3.23k
        if ( module == nullptr ) {
2728
1.90k
            continue;
2729
1.90k
        }
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
2
            break;
2736
2
        }
2737
3.23k
    } while ( parentDs.Get<bool>() == true );
2738
2739
618
    if ( operations.empty() == true ) {
2740
26
        return;
2741
26
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
592
#if 1
2745
592
    {
2746
592
        std::set<uint64_t> moduleIDs;
2747
1.08k
        for (const auto& m : modules ) {
2748
1.08k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.08k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.08k
            moduleIDs.insert(moduleID);
2756
1.08k
        }
2757
2758
592
        std::set<uint64_t> operationModuleIDs;
2759
1.25k
        for (const auto& op : operations) {
2760
1.25k
            operationModuleIDs.insert(op.first->ID);
2761
1.25k
        }
2762
2763
592
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
592
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
592
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
592
        for (const auto& id : addModuleIDs) {
2768
525
            operations.push_back({ modules.at(id), operations[0].second});
2769
525
        }
2770
592
    }
2771
592
#endif
2772
2773
592
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
592
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.36k
    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.23k
            auto& prevModule = operations[i-1].first;
2788
1.23k
            auto& prevOp = operations[i].second;
2789
2790
1.23k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
650
                auto& curModifier = op.modifier.GetVectorPtr();
2792
650
                if ( curModifier.size() == 0 ) {
2793
269k
                    for (size_t j = 0; j < 512; j++) {
2794
268k
                        curModifier.push_back(1);
2795
268k
                    }
2796
525
                } else {
2797
5.17k
                    for (auto& c : curModifier) {
2798
5.17k
                        c++;
2799
5.17k
                    }
2800
125
                }
2801
650
            }
2802
1.23k
        }
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
702
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
702
        }
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
592
    if ( options.noCompare == false ) {
2837
544
        compare(operations, results, data, size);
2838
544
    }
2839
592
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
330
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
330
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
330
    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.16k
            continue;
2729
2.16k
        }
2730
2731
411
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
411
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
52
            break;
2736
52
        }
2737
2.52k
    } while ( parentDs.Get<bool>() == true );
2738
2739
330
    if ( operations.empty() == true ) {
2740
40
        return;
2741
40
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
290
#if 1
2745
290
    {
2746
290
        std::set<uint64_t> moduleIDs;
2747
462
        for (const auto& m : modules ) {
2748
462
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
462
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
462
            moduleIDs.insert(moduleID);
2756
462
        }
2757
2758
290
        std::set<uint64_t> operationModuleIDs;
2759
359
        for (const auto& op : operations) {
2760
359
            operationModuleIDs.insert(op.first->ID);
2761
359
        }
2762
2763
290
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
290
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
290
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
290
        for (const auto& id : addModuleIDs) {
2768
227
            operations.push_back({ modules.at(id), operations[0].second});
2769
227
        }
2770
290
    }
2771
290
#endif
2772
2773
290
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
290
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
876
    for (size_t i = 0; i < operations.size(); i++) {
2781
586
        auto& operation = operations[i];
2782
2783
586
        auto& module = operation.first;
2784
586
        auto& op = operation.second;
2785
2786
586
        if ( i > 0 ) {
2787
355
            auto& prevModule = operations[i-1].first;
2788
355
            auto& prevOp = operations[i].second;
2789
2790
355
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
123
                auto& curModifier = op.modifier.GetVectorPtr();
2792
123
                if ( curModifier.size() == 0 ) {
2793
48.7k
                    for (size_t j = 0; j < 512; j++) {
2794
48.6k
                        curModifier.push_back(1);
2795
48.6k
                    }
2796
95
                } else {
2797
1.11k
                    for (auto& c : curModifier) {
2798
1.11k
                        c++;
2799
1.11k
                    }
2800
28
                }
2801
123
            }
2802
355
        }
2803
2804
586
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
586
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
586
        const auto& result = results.back();
2811
2812
586
        if ( result.second != std::nullopt ) {
2813
279
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
279
        }
2820
2821
586
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
586
        if ( options.disableTests == false ) {
2830
586
            tests::test(op, result.second);
2831
586
        }
2832
2833
586
        postprocess(module, op, result);
2834
586
    }
2835
2836
290
    if ( options.noCompare == false ) {
2837
231
        compare(operations, results, data, size);
2838
231
    }
2839
290
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
100
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
100
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
100
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.76k
    do {
2725
2.76k
        auto op = getOp(&parentDs, data, size);
2726
2.76k
        auto module = getModule(parentDs);
2727
2.76k
        if ( module == nullptr ) {
2728
2.39k
            continue;
2729
2.39k
        }
2730
2731
362
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
362
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
2.75k
    } while ( parentDs.Get<bool>() == true );
2738
2739
100
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
96
#if 1
2745
96
    {
2746
96
        std::set<uint64_t> moduleIDs;
2747
98
        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
96
        std::set<uint64_t> operationModuleIDs;
2759
265
        for (const auto& op : operations) {
2760
265
            operationModuleIDs.insert(op.first->ID);
2761
265
        }
2762
2763
96
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
96
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
96
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
96
        for (const auto& id : addModuleIDs) {
2768
33
            operations.push_back({ modules.at(id), operations[0].second});
2769
33
        }
2770
96
    }
2771
96
#endif
2772
2773
96
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
96
    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
298
        auto& operation = operations[i];
2782
2783
298
        auto& module = operation.first;
2784
298
        auto& op = operation.second;
2785
2786
298
        if ( i > 0 ) {
2787
249
            auto& prevModule = operations[i-1].first;
2788
249
            auto& prevOp = operations[i].second;
2789
2790
249
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
177
                auto& curModifier = op.modifier.GetVectorPtr();
2792
177
                if ( curModifier.size() == 0 ) {
2793
67.7k
                    for (size_t j = 0; j < 512; j++) {
2794
67.5k
                        curModifier.push_back(1);
2795
67.5k
                    }
2796
132
                } else {
2797
1.91k
                    for (auto& c : curModifier) {
2798
1.91k
                        c++;
2799
1.91k
                    }
2800
45
                }
2801
177
            }
2802
249
        }
2803
2804
298
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
298
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
298
        const auto& result = results.back();
2811
2812
298
        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
298
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
298
        if ( options.disableTests == false ) {
2830
298
            tests::test(op, result.second);
2831
298
        }
2832
2833
298
        postprocess(module, op, result);
2834
298
    }
2835
2836
96
    if ( options.noCompare == false ) {
2837
49
        compare(operations, results, data, size);
2838
49
    }
2839
96
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
94
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
94
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
94
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.47k
    do {
2725
1.47k
        auto op = getOp(&parentDs, data, size);
2726
1.47k
        auto module = getModule(parentDs);
2727
1.47k
        if ( module == nullptr ) {
2728
1.07k
            continue;
2729
1.07k
        }
2730
2731
402
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
402
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
1.47k
    } while ( parentDs.Get<bool>() == true );
2738
2739
94
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
77
#if 1
2745
77
    {
2746
77
        std::set<uint64_t> moduleIDs;
2747
77
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
77
        std::set<uint64_t> operationModuleIDs;
2759
284
        for (const auto& op : operations) {
2760
284
            operationModuleIDs.insert(op.first->ID);
2761
284
        }
2762
2763
77
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
77
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
77
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
77
        for (const auto& id : addModuleIDs) {
2768
18
            operations.push_back({ modules.at(id), operations[0].second});
2769
18
        }
2770
77
    }
2771
77
#endif
2772
2773
77
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
77
    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
302
        auto& operation = operations[i];
2782
2783
302
        auto& module = operation.first;
2784
302
        auto& op = operation.second;
2785
2786
302
        if ( i > 0 ) {
2787
265
            auto& prevModule = operations[i-1].first;
2788
265
            auto& prevOp = operations[i].second;
2789
2790
265
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
152
                auto& curModifier = op.modifier.GetVectorPtr();
2792
152
                if ( curModifier.size() == 0 ) {
2793
43.6k
                    for (size_t j = 0; j < 512; j++) {
2794
43.5k
                        curModifier.push_back(1);
2795
43.5k
                    }
2796
85
                } else {
2797
628
                    for (auto& c : curModifier) {
2798
628
                        c++;
2799
628
                    }
2800
67
                }
2801
152
            }
2802
265
        }
2803
2804
302
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
302
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
302
        const auto& result = results.back();
2811
2812
302
        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
302
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
302
        if ( options.disableTests == false ) {
2830
302
            tests::test(op, result.second);
2831
302
        }
2832
2833
302
        postprocess(module, op, result);
2834
302
    }
2835
2836
77
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
77
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.79k
    do {
2725
1.79k
        auto op = getOp(&parentDs, data, size);
2726
1.79k
        auto module = getModule(parentDs);
2727
1.79k
        if ( module == nullptr ) {
2728
1.66k
            continue;
2729
1.66k
        }
2730
2731
137
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
137
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
15
            break;
2736
15
        }
2737
1.78k
    } while ( parentDs.Get<bool>() == true );
2738
2739
149
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
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
182
        for (const auto& m : modules ) {
2748
182
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
182
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
182
            moduleIDs.insert(moduleID);
2756
182
        }
2757
2758
132
        std::set<uint64_t> operationModuleIDs;
2759
132
        for (const auto& op : operations) {
2760
106
            operationModuleIDs.insert(op.first->ID);
2761
106
        }
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
89
            operations.push_back({ modules.at(id), operations[0].second});
2769
89
        }
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
327
    for (size_t i = 0; i < operations.size(); i++) {
2781
195
        auto& operation = operations[i];
2782
2783
195
        auto& module = operation.first;
2784
195
        auto& op = operation.second;
2785
2786
195
        if ( i > 0 ) {
2787
104
            auto& prevModule = operations[i-1].first;
2788
104
            auto& prevOp = operations[i].second;
2789
2790
104
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
13
                auto& curModifier = op.modifier.GetVectorPtr();
2792
13
                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
8
                } else {
2797
113
                    for (auto& c : curModifier) {
2798
113
                        c++;
2799
113
                    }
2800
5
                }
2801
13
            }
2802
104
        }
2803
2804
195
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
195
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
195
        const auto& result = results.back();
2811
2812
195
        if ( result.second != std::nullopt ) {
2813
39
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
39
        }
2820
2821
195
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
195
        if ( options.disableTests == false ) {
2830
195
            tests::test(op, result.second);
2831
195
        }
2832
2833
195
        postprocess(module, op, result);
2834
195
    }
2835
2836
132
    if ( options.noCompare == false ) {
2837
91
        compare(operations, results, data, size);
2838
91
    }
2839
132
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
385
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
385
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
385
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.08k
    do {
2725
3.08k
        auto op = getOp(&parentDs, data, size);
2726
3.08k
        auto module = getModule(parentDs);
2727
3.08k
        if ( module == nullptr ) {
2728
1.87k
            continue;
2729
1.87k
        }
2730
2731
1.21k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.21k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
3.08k
    } while ( parentDs.Get<bool>() == true );
2738
2739
385
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
367
#if 1
2745
367
    {
2746
367
        std::set<uint64_t> moduleIDs;
2747
636
        for (const auto& m : modules ) {
2748
636
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
636
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
636
            moduleIDs.insert(moduleID);
2756
636
        }
2757
2758
367
        std::set<uint64_t> operationModuleIDs;
2759
1.08k
        for (const auto& op : operations) {
2760
1.08k
            operationModuleIDs.insert(op.first->ID);
2761
1.08k
        }
2762
2763
367
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
367
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
367
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
367
        for (const auto& id : addModuleIDs) {
2768
294
            operations.push_back({ modules.at(id), operations[0].second});
2769
294
        }
2770
367
    }
2771
367
#endif
2772
2773
367
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
367
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.74k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.37k
        auto& operation = operations[i];
2782
2783
1.37k
        auto& module = operation.first;
2784
1.37k
        auto& op = operation.second;
2785
2786
1.37k
        if ( i > 0 ) {
2787
1.05k
            auto& prevModule = operations[i-1].first;
2788
1.05k
            auto& prevOp = operations[i].second;
2789
2790
1.05k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
667
                auto& curModifier = op.modifier.GetVectorPtr();
2792
667
                if ( curModifier.size() == 0 ) {
2793
258k
                    for (size_t j = 0; j < 512; j++) {
2794
257k
                        curModifier.push_back(1);
2795
257k
                    }
2796
503
                } else {
2797
23.9k
                    for (auto& c : curModifier) {
2798
23.9k
                        c++;
2799
23.9k
                    }
2800
164
                }
2801
667
            }
2802
1.05k
        }
2803
2804
1.37k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.37k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.37k
        const auto& result = results.back();
2811
2812
1.37k
        if ( result.second != std::nullopt ) {
2813
582
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
582
        }
2820
2821
1.37k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.37k
        if ( options.disableTests == false ) {
2830
1.37k
            tests::test(op, result.second);
2831
1.37k
        }
2832
2833
1.37k
        postprocess(module, op, result);
2834
1.37k
    }
2835
2836
367
    if ( options.noCompare == false ) {
2837
318
        compare(operations, results, data, size);
2838
318
    }
2839
367
}
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
117
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
117
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
117
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.20k
    do {
2725
2.20k
        auto op = getOp(&parentDs, data, size);
2726
2.20k
        auto module = getModule(parentDs);
2727
2.20k
        if ( module == nullptr ) {
2728
1.72k
            continue;
2729
1.72k
        }
2730
2731
486
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
486
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
2.20k
    } while ( parentDs.Get<bool>() == true );
2738
2739
117
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
112
#if 1
2745
112
    {
2746
112
        std::set<uint64_t> moduleIDs;
2747
112
        for (const auto& m : modules ) {
2748
108
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
108
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
108
            moduleIDs.insert(moduleID);
2756
108
        }
2757
2758
112
        std::set<uint64_t> operationModuleIDs;
2759
314
        for (const auto& op : operations) {
2760
314
            operationModuleIDs.insert(op.first->ID);
2761
314
        }
2762
2763
112
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
112
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
112
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
112
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
112
    }
2771
112
#endif
2772
2773
112
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
112
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
454
    for (size_t i = 0; i < operations.size(); i++) {
2781
342
        auto& operation = operations[i];
2782
2783
342
        auto& module = operation.first;
2784
342
        auto& op = operation.second;
2785
2786
342
        if ( i > 0 ) {
2787
288
            auto& prevModule = operations[i-1].first;
2788
288
            auto& prevOp = operations[i].second;
2789
2790
288
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
183
                auto& curModifier = op.modifier.GetVectorPtr();
2792
183
                if ( curModifier.size() == 0 ) {
2793
76.4k
                    for (size_t j = 0; j < 512; j++) {
2794
76.2k
                        curModifier.push_back(1);
2795
76.2k
                    }
2796
149
                } else {
2797
310
                    for (auto& c : curModifier) {
2798
310
                        c++;
2799
310
                    }
2800
34
                }
2801
183
            }
2802
288
        }
2803
2804
342
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
342
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
342
        const auto& result = results.back();
2811
2812
342
        if ( result.second != std::nullopt ) {
2813
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
342
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
342
        if ( options.disableTests == false ) {
2830
342
            tests::test(op, result.second);
2831
342
        }
2832
2833
342
        postprocess(module, op, result);
2834
342
    }
2835
2836
112
    if ( options.noCompare == false ) {
2837
54
        compare(operations, results, data, size);
2838
54
    }
2839
112
}
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
94
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
94
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
94
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.68k
    do {
2725
2.68k
        auto op = getOp(&parentDs, data, size);
2726
2.68k
        auto module = getModule(parentDs);
2727
2.68k
        if ( module == nullptr ) {
2728
2.38k
            continue;
2729
2.38k
        }
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
2
            break;
2736
2
        }
2737
2.68k
    } while ( parentDs.Get<bool>() == true );
2738
2739
94
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
82
#if 1
2745
82
    {
2746
82
        std::set<uint64_t> moduleIDs;
2747
82
        for (const auto& m : modules ) {
2748
76
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
76
            moduleIDs.insert(moduleID);
2756
76
        }
2757
2758
82
        std::set<uint64_t> operationModuleIDs;
2759
221
        for (const auto& op : operations) {
2760
221
            operationModuleIDs.insert(op.first->ID);
2761
221
        }
2762
2763
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
82
        for (const auto& id : addModuleIDs) {
2768
21
            operations.push_back({ modules.at(id), operations[0].second});
2769
21
        }
2770
82
    }
2771
82
#endif
2772
2773
82
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
82
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
324
    for (size_t i = 0; i < operations.size(); i++) {
2781
242
        auto& operation = operations[i];
2782
2783
242
        auto& module = operation.first;
2784
242
        auto& op = operation.second;
2785
2786
242
        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
121
                auto& curModifier = op.modifier.GetVectorPtr();
2792
121
                if ( curModifier.size() == 0 ) {
2793
32.3k
                    for (size_t j = 0; j < 512; j++) {
2794
32.2k
                        curModifier.push_back(1);
2795
32.2k
                    }
2796
63
                } else {
2797
403
                    for (auto& c : curModifier) {
2798
403
                        c++;
2799
403
                    }
2800
58
                }
2801
121
            }
2802
204
        }
2803
2804
242
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
242
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
242
        const auto& result = results.back();
2811
2812
242
        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
242
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
242
        if ( options.disableTests == false ) {
2830
242
            tests::test(op, result.second);
2831
242
        }
2832
2833
242
        postprocess(module, op, result);
2834
242
    }
2835
2836
82
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
764
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
764
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
764
    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
1.58k
            continue;
2729
1.58k
        }
2730
2731
1.11k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.11k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
28
            break;
2736
28
        }
2737
2.66k
    } while ( parentDs.Get<bool>() == true );
2738
2739
764
    if ( operations.empty() == true ) {
2740
49
        return;
2741
49
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
715
#if 1
2745
715
    {
2746
715
        std::set<uint64_t> moduleIDs;
2747
1.30k
        for (const auto& m : modules ) {
2748
1.30k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.30k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.30k
            moduleIDs.insert(moduleID);
2756
1.30k
        }
2757
2758
715
        std::set<uint64_t> operationModuleIDs;
2759
1.05k
        for (const auto& op : operations) {
2760
1.05k
            operationModuleIDs.insert(op.first->ID);
2761
1.05k
        }
2762
2763
715
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
715
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
715
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
715
        for (const auto& id : addModuleIDs) {
2768
641
            operations.push_back({ modules.at(id), operations[0].second});
2769
641
        }
2770
715
    }
2771
715
#endif
2772
2773
715
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
715
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.41k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.69k
        auto& operation = operations[i];
2782
2783
1.69k
        auto& module = operation.first;
2784
1.69k
        auto& op = operation.second;
2785
2786
1.69k
        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
393
                auto& curModifier = op.modifier.GetVectorPtr();
2792
393
                if ( curModifier.size() == 0 ) {
2793
158k
                    for (size_t j = 0; j < 512; j++) {
2794
157k
                        curModifier.push_back(1);
2795
157k
                    }
2796
308
                } else {
2797
7.45k
                    for (auto& c : curModifier) {
2798
7.45k
                        c++;
2799
7.45k
                    }
2800
85
                }
2801
393
            }
2802
1.04k
        }
2803
2804
1.69k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.69k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.69k
        const auto& result = results.back();
2811
2812
1.69k
        if ( result.second != std::nullopt ) {
2813
383
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
383
        }
2820
2821
1.69k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.69k
        if ( options.disableTests == false ) {
2830
1.69k
            tests::test(op, result.second);
2831
1.69k
        }
2832
2833
1.69k
        postprocess(module, op, result);
2834
1.69k
    }
2835
2836
715
    if ( options.noCompare == false ) {
2837
650
        compare(operations, results, data, size);
2838
650
    }
2839
715
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
309
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
309
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
309
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.83k
    do {
2725
1.83k
        auto op = getOp(&parentDs, data, size);
2726
1.83k
        auto module = getModule(parentDs);
2727
1.83k
        if ( module == nullptr ) {
2728
1.37k
            continue;
2729
1.37k
        }
2730
2731
455
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
455
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
1.82k
    } while ( parentDs.Get<bool>() == true );
2738
2739
309
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
290
#if 1
2745
290
    {
2746
290
        std::set<uint64_t> moduleIDs;
2747
482
        for (const auto& m : modules ) {
2748
482
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
482
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
482
            moduleIDs.insert(moduleID);
2756
482
        }
2757
2758
290
        std::set<uint64_t> operationModuleIDs;
2759
398
        for (const auto& op : operations) {
2760
398
            operationModuleIDs.insert(op.first->ID);
2761
398
        }
2762
2763
290
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
290
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
290
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
290
        for (const auto& id : addModuleIDs) {
2768
225
            operations.push_back({ modules.at(id), operations[0].second});
2769
225
        }
2770
290
    }
2771
290
#endif
2772
2773
290
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
290
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
913
    for (size_t i = 0; i < operations.size(); i++) {
2781
623
        auto& operation = operations[i];
2782
2783
623
        auto& module = operation.first;
2784
623
        auto& op = operation.second;
2785
2786
623
        if ( i > 0 ) {
2787
382
            auto& prevModule = operations[i-1].first;
2788
382
            auto& prevOp = operations[i].second;
2789
2790
382
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
132
                auto& curModifier = op.modifier.GetVectorPtr();
2792
132
                if ( curModifier.size() == 0 ) {
2793
43.6k
                    for (size_t j = 0; j < 512; j++) {
2794
43.5k
                        curModifier.push_back(1);
2795
43.5k
                    }
2796
85
                } else {
2797
405
                    for (auto& c : curModifier) {
2798
405
                        c++;
2799
405
                    }
2800
47
                }
2801
132
            }
2802
382
        }
2803
2804
623
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
623
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
623
        const auto& result = results.back();
2811
2812
623
        if ( result.second != std::nullopt ) {
2813
326
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
326
        }
2820
2821
623
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
623
        if ( options.disableTests == false ) {
2830
623
            tests::test(op, result.second);
2831
623
        }
2832
2833
623
        postprocess(module, op, result);
2834
623
    }
2835
2836
290
    if ( options.noCompare == false ) {
2837
241
        compare(operations, results, data, size);
2838
241
    }
2839
290
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
642
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
642
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
642
    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
1.86k
            continue;
2729
1.86k
        }
2730
2731
746
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
746
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
2.59k
    } while ( parentDs.Get<bool>() == true );
2738
2739
642
    if ( operations.empty() == true ) {
2740
39
        return;
2741
39
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
603
#if 1
2745
603
    {
2746
603
        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
603
        std::set<uint64_t> operationModuleIDs;
2759
693
        for (const auto& op : operations) {
2760
693
            operationModuleIDs.insert(op.first->ID);
2761
693
        }
2762
2763
603
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
603
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
603
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
603
        for (const auto& id : addModuleIDs) {
2768
539
            operations.push_back({ modules.at(id), operations[0].second});
2769
539
        }
2770
603
    }
2771
603
#endif
2772
2773
603
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
603
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.83k
    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
681
            auto& prevModule = operations[i-1].first;
2788
681
            auto& prevOp = operations[i].second;
2789
2790
681
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
123
                auto& curModifier = op.modifier.GetVectorPtr();
2792
123
                if ( curModifier.size() == 0 ) {
2793
44.6k
                    for (size_t j = 0; j < 512; j++) {
2794
44.5k
                        curModifier.push_back(1);
2795
44.5k
                    }
2796
87
                } else {
2797
1.14k
                    for (auto& c : curModifier) {
2798
1.14k
                        c++;
2799
1.14k
                    }
2800
36
                }
2801
123
            }
2802
681
        }
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
248
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
248
        }
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
603
    if ( options.noCompare == false ) {
2837
551
        compare(operations, results, data, size);
2838
551
    }
2839
603
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
87
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
87
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
87
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.24k
    do {
2725
2.24k
        auto op = getOp(&parentDs, data, size);
2726
2.24k
        auto module = getModule(parentDs);
2727
2.24k
        if ( module == nullptr ) {
2728
2.10k
            continue;
2729
2.10k
        }
2730
2731
137
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
137
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.23k
    } while ( parentDs.Get<bool>() == true );
2738
2739
87
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
71
#if 1
2745
71
    {
2746
71
        std::set<uint64_t> moduleIDs;
2747
71
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
71
        std::set<uint64_t> operationModuleIDs;
2759
92
        for (const auto& op : operations) {
2760
92
            operationModuleIDs.insert(op.first->ID);
2761
92
        }
2762
2763
71
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
71
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
71
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
71
        for (const auto& id : addModuleIDs) {
2768
25
            operations.push_back({ modules.at(id), operations[0].second});
2769
25
        }
2770
71
    }
2771
71
#endif
2772
2773
71
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
71
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
188
    for (size_t i = 0; i < operations.size(); i++) {
2781
117
        auto& operation = operations[i];
2782
2783
117
        auto& module = operation.first;
2784
117
        auto& op = operation.second;
2785
2786
117
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
1.07k
                    for (auto& c : curModifier) {
2798
1.07k
                        c++;
2799
1.07k
                    }
2800
21
                }
2801
43
            }
2802
83
        }
2803
2804
117
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
117
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
117
        const auto& result = results.back();
2811
2812
117
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
117
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
117
        if ( options.disableTests == false ) {
2830
117
            tests::test(op, result.second);
2831
117
        }
2832
2833
117
        postprocess(module, op, result);
2834
117
    }
2835
2836
71
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
447
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
447
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
447
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.25k
    do {
2725
2.25k
        auto op = getOp(&parentDs, data, size);
2726
2.25k
        auto module = getModule(parentDs);
2727
2.25k
        if ( module == nullptr ) {
2728
1.42k
            continue;
2729
1.42k
        }
2730
2731
835
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
835
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
38
            break;
2736
38
        }
2737
2.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
447
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
434
#if 1
2745
434
    {
2746
434
        std::set<uint64_t> moduleIDs;
2747
796
        for (const auto& m : modules ) {
2748
796
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
796
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
796
            moduleIDs.insert(moduleID);
2756
796
        }
2757
2758
434
        std::set<uint64_t> operationModuleIDs;
2759
793
        for (const auto& op : operations) {
2760
793
            operationModuleIDs.insert(op.first->ID);
2761
793
        }
2762
2763
434
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
434
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
434
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
434
        for (const auto& id : addModuleIDs) {
2768
386
            operations.push_back({ modules.at(id), operations[0].second});
2769
386
        }
2770
434
    }
2771
434
#endif
2772
2773
434
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
434
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.61k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.17k
        auto& operation = operations[i];
2782
2783
1.17k
        auto& module = operation.first;
2784
1.17k
        auto& op = operation.second;
2785
2786
1.17k
        if ( i > 0 ) {
2787
781
            auto& prevModule = operations[i-1].first;
2788
781
            auto& prevOp = operations[i].second;
2789
2790
781
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
379
                auto& curModifier = op.modifier.GetVectorPtr();
2792
379
                if ( curModifier.size() == 0 ) {
2793
120k
                    for (size_t j = 0; j < 512; j++) {
2794
119k
                        curModifier.push_back(1);
2795
119k
                    }
2796
234
                } else {
2797
13.9k
                    for (auto& c : curModifier) {
2798
13.9k
                        c++;
2799
13.9k
                    }
2800
145
                }
2801
379
            }
2802
781
        }
2803
2804
1.17k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.17k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.17k
        const auto& result = results.back();
2811
2812
1.17k
        if ( result.second != std::nullopt ) {
2813
492
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
492
        }
2820
2821
1.17k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.17k
        if ( options.disableTests == false ) {
2830
1.17k
            tests::test(op, result.second);
2831
1.17k
        }
2832
2833
1.17k
        postprocess(module, op, result);
2834
1.17k
    }
2835
2836
434
    if ( options.noCompare == false ) {
2837
398
        compare(operations, results, data, size);
2838
398
    }
2839
434
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
176
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
176
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
176
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.16k
    do {
2725
2.16k
        auto op = getOp(&parentDs, data, size);
2726
2.16k
        auto module = getModule(parentDs);
2727
2.16k
        if ( module == nullptr ) {
2728
1.87k
            continue;
2729
1.87k
        }
2730
2731
282
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
282
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.15k
    } while ( parentDs.Get<bool>() == true );
2738
2739
176
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
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
220
        for (const auto& m : modules ) {
2748
220
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
220
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
220
            moduleIDs.insert(moduleID);
2756
220
        }
2757
2758
158
        std::set<uint64_t> operationModuleIDs;
2759
229
        for (const auto& op : operations) {
2760
229
            operationModuleIDs.insert(op.first->ID);
2761
229
        }
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
99
            operations.push_back({ modules.at(id), operations[0].second});
2769
99
        }
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
486
    for (size_t i = 0; i < operations.size(); i++) {
2781
328
        auto& operation = operations[i];
2782
2783
328
        auto& module = operation.first;
2784
328
        auto& op = operation.second;
2785
2786
328
        if ( i > 0 ) {
2787
218
            auto& prevModule = operations[i-1].first;
2788
218
            auto& prevOp = operations[i].second;
2789
2790
218
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
102
                auto& curModifier = op.modifier.GetVectorPtr();
2792
102
                if ( curModifier.size() == 0 ) {
2793
24.6k
                    for (size_t j = 0; j < 512; j++) {
2794
24.5k
                        curModifier.push_back(1);
2795
24.5k
                    }
2796
54
                } else {
2797
4.96k
                    for (auto& c : curModifier) {
2798
4.96k
                        c++;
2799
4.96k
                    }
2800
54
                }
2801
102
            }
2802
218
        }
2803
2804
328
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
328
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
328
        const auto& result = results.back();
2811
2812
328
        if ( result.second != std::nullopt ) {
2813
48
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
48
        }
2820
2821
328
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
328
        if ( options.disableTests == false ) {
2830
328
            tests::test(op, result.second);
2831
328
        }
2832
2833
328
        postprocess(module, op, result);
2834
328
    }
2835
2836
158
    if ( options.noCompare == false ) {
2837
110
        compare(operations, results, data, size);
2838
110
    }
2839
158
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
90
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
90
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
90
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.89k
    do {
2725
1.89k
        auto op = getOp(&parentDs, data, size);
2726
1.89k
        auto module = getModule(parentDs);
2727
1.89k
        if ( module == nullptr ) {
2728
1.70k
            continue;
2729
1.70k
        }
2730
2731
184
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
184
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.88k
    } while ( parentDs.Get<bool>() == true );
2738
2739
90
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
82
#if 1
2745
82
    {
2746
82
        std::set<uint64_t> moduleIDs;
2747
90
        for (const auto& m : modules ) {
2748
90
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
90
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
90
            moduleIDs.insert(moduleID);
2756
90
        }
2757
2758
82
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
128
            operationModuleIDs.insert(op.first->ID);
2761
128
        }
2762
2763
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
82
        for (const auto& id : addModuleIDs) {
2768
24
            operations.push_back({ modules.at(id), operations[0].second});
2769
24
        }
2770
82
    }
2771
82
#endif
2772
2773
82
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
82
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
234
    for (size_t i = 0; i < operations.size(); i++) {
2781
152
        auto& operation = operations[i];
2782
2783
152
        auto& module = operation.first;
2784
152
        auto& op = operation.second;
2785
2786
152
        if ( i > 0 ) {
2787
107
            auto& prevModule = operations[i-1].first;
2788
107
            auto& prevOp = operations[i].second;
2789
2790
107
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
54
                auto& curModifier = op.modifier.GetVectorPtr();
2792
54
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
28
                } else {
2797
538
                    for (auto& c : curModifier) {
2798
538
                        c++;
2799
538
                    }
2800
26
                }
2801
54
            }
2802
107
        }
2803
2804
152
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
152
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
152
        const auto& result = results.back();
2811
2812
152
        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
152
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
152
        if ( options.disableTests == false ) {
2830
152
            tests::test(op, result.second);
2831
152
        }
2832
2833
152
        postprocess(module, op, result);
2834
152
    }
2835
2836
82
    if ( options.noCompare == false ) {
2837
45
        compare(operations, results, data, size);
2838
45
    }
2839
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
74
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
74
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
74
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.46k
    do {
2725
1.46k
        auto op = getOp(&parentDs, data, size);
2726
1.46k
        auto module = getModule(parentDs);
2727
1.46k
        if ( module == nullptr ) {
2728
1.31k
            continue;
2729
1.31k
        }
2730
2731
147
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
147
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.45k
    } while ( parentDs.Get<bool>() == true );
2738
2739
74
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
70
#if 1
2745
70
    {
2746
70
        std::set<uint64_t> moduleIDs;
2747
70
        for (const auto& m : modules ) {
2748
58
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
58
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
58
            moduleIDs.insert(moduleID);
2756
58
        }
2757
2758
70
        std::set<uint64_t> operationModuleIDs;
2759
88
        for (const auto& op : operations) {
2760
88
            operationModuleIDs.insert(op.first->ID);
2761
88
        }
2762
2763
70
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
70
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
70
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
70
        for (const auto& id : addModuleIDs) {
2768
21
            operations.push_back({ modules.at(id), operations[0].second});
2769
21
        }
2770
70
    }
2771
70
#endif
2772
2773
70
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
70
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
179
    for (size_t i = 0; i < operations.size(); i++) {
2781
109
        auto& operation = operations[i];
2782
2783
109
        auto& module = operation.first;
2784
109
        auto& op = operation.second;
2785
2786
109
        if ( i > 0 ) {
2787
80
            auto& prevModule = operations[i-1].first;
2788
80
            auto& prevOp = operations[i].second;
2789
2790
80
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                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
24
                } else {
2797
348
                    for (auto& c : curModifier) {
2798
348
                        c++;
2799
348
                    }
2800
24
                }
2801
45
            }
2802
80
        }
2803
2804
109
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
109
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
109
        const auto& result = results.back();
2811
2812
109
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
109
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
109
        if ( options.disableTests == false ) {
2830
109
            tests::test(op, result.second);
2831
109
        }
2832
2833
109
        postprocess(module, op, result);
2834
109
    }
2835
2836
70
    if ( options.noCompare == false ) {
2837
29
        compare(operations, results, data, size);
2838
29
    }
2839
70
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
64
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
64
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
64
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.81k
    do {
2725
1.81k
        auto op = getOp(&parentDs, data, size);
2726
1.81k
        auto module = getModule(parentDs);
2727
1.81k
        if ( module == nullptr ) {
2728
1.69k
            continue;
2729
1.69k
        }
2730
2731
124
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
124
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.81k
    } while ( parentDs.Get<bool>() == true );
2738
2739
64
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
60
#if 1
2745
60
    {
2746
60
        std::set<uint64_t> moduleIDs;
2747
60
        for (const auto& m : modules ) {
2748
48
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
48
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
48
            moduleIDs.insert(moduleID);
2756
48
        }
2757
2758
60
        std::set<uint64_t> operationModuleIDs;
2759
80
        for (const auto& op : operations) {
2760
80
            operationModuleIDs.insert(op.first->ID);
2761
80
        }
2762
2763
60
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
60
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
60
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
60
        for (const auto& id : addModuleIDs) {
2768
14
            operations.push_back({ modules.at(id), operations[0].second});
2769
14
        }
2770
60
    }
2771
60
#endif
2772
2773
60
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
60
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
154
    for (size_t i = 0; i < operations.size(); i++) {
2781
94
        auto& operation = operations[i];
2782
2783
94
        auto& module = operation.first;
2784
94
        auto& op = operation.second;
2785
2786
94
        if ( i > 0 ) {
2787
70
            auto& prevModule = operations[i-1].first;
2788
70
            auto& prevOp = operations[i].second;
2789
2790
70
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
40
                auto& curModifier = op.modifier.GetVectorPtr();
2792
40
                if ( curModifier.size() == 0 ) {
2793
7.18k
                    for (size_t j = 0; j < 512; j++) {
2794
7.16k
                        curModifier.push_back(1);
2795
7.16k
                    }
2796
26
                } else {
2797
828
                    for (auto& c : curModifier) {
2798
828
                        c++;
2799
828
                    }
2800
26
                }
2801
40
            }
2802
70
        }
2803
2804
94
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
94
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
94
        const auto& result = results.back();
2811
2812
94
        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
94
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
94
        if ( options.disableTests == false ) {
2830
94
            tests::test(op, result.second);
2831
94
        }
2832
2833
94
        postprocess(module, op, result);
2834
94
    }
2835
2836
60
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
60
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::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
1.61k
    do {
2725
1.61k
        auto op = getOp(&parentDs, data, size);
2726
1.61k
        auto module = getModule(parentDs);
2727
1.61k
        if ( module == nullptr ) {
2728
1.08k
            continue;
2729
1.08k
        }
2730
2731
531
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
531
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
1.59k
    } while ( parentDs.Get<bool>() == true );
2738
2739
267
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
259
#if 1
2745
259
    {
2746
259
        std::set<uint64_t> moduleIDs;
2747
448
        for (const auto& m : modules ) {
2748
448
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
448
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
448
            moduleIDs.insert(moduleID);
2756
448
        }
2757
2758
259
        std::set<uint64_t> operationModuleIDs;
2759
483
        for (const auto& op : operations) {
2760
483
            operationModuleIDs.insert(op.first->ID);
2761
483
        }
2762
2763
259
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
259
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
259
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
259
        for (const auto& id : addModuleIDs) {
2768
209
            operations.push_back({ modules.at(id), operations[0].second});
2769
209
        }
2770
259
    }
2771
259
#endif
2772
2773
259
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
259
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
951
    for (size_t i = 0; i < operations.size(); i++) {
2781
692
        auto& operation = operations[i];
2782
2783
692
        auto& module = operation.first;
2784
692
        auto& op = operation.second;
2785
2786
692
        if ( i > 0 ) {
2787
468
            auto& prevModule = operations[i-1].first;
2788
468
            auto& prevOp = operations[i].second;
2789
2790
468
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
235
                auto& curModifier = op.modifier.GetVectorPtr();
2792
235
                if ( curModifier.size() == 0 ) {
2793
60.5k
                    for (size_t j = 0; j < 512; j++) {
2794
60.4k
                        curModifier.push_back(1);
2795
60.4k
                    }
2796
118
                } else {
2797
789
                    for (auto& c : curModifier) {
2798
789
                        c++;
2799
789
                    }
2800
117
                }
2801
235
            }
2802
468
        }
2803
2804
692
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
692
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
692
        const auto& result = results.back();
2811
2812
692
        if ( result.second != std::nullopt ) {
2813
382
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
382
        }
2820
2821
692
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
692
        if ( options.disableTests == false ) {
2830
692
            tests::test(op, result.second);
2831
692
        }
2832
2833
692
        postprocess(module, op, result);
2834
692
    }
2835
2836
259
    if ( options.noCompare == false ) {
2837
224
        compare(operations, results, data, size);
2838
224
    }
2839
259
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::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
2.89k
    do {
2725
2.89k
        auto op = getOp(&parentDs, data, size);
2726
2.89k
        auto module = getModule(parentDs);
2727
2.89k
        if ( module == nullptr ) {
2728
2.54k
            continue;
2729
2.54k
        }
2730
2731
352
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
352
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.88k
    } while ( parentDs.Get<bool>() == true );
2738
2739
203
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
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
312
        for (const auto& m : modules ) {
2748
312
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
312
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
312
            moduleIDs.insert(moduleID);
2756
312
        }
2757
2758
191
        std::set<uint64_t> operationModuleIDs;
2759
289
        for (const auto& op : operations) {
2760
289
            operationModuleIDs.insert(op.first->ID);
2761
289
        }
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
144
            operations.push_back({ modules.at(id), operations[0].second});
2769
144
        }
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
624
    for (size_t i = 0; i < operations.size(); i++) {
2781
433
        auto& operation = operations[i];
2782
2783
433
        auto& module = operation.first;
2784
433
        auto& op = operation.second;
2785
2786
433
        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
114
                auto& curModifier = op.modifier.GetVectorPtr();
2792
114
                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
62
                } else {
2797
4.19k
                    for (auto& c : curModifier) {
2798
4.19k
                        c++;
2799
4.19k
                    }
2800
62
                }
2801
114
            }
2802
277
        }
2803
2804
433
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
433
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
433
        const auto& result = results.back();
2811
2812
433
        if ( result.second != std::nullopt ) {
2813
141
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
141
        }
2820
2821
433
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
433
        if ( options.disableTests == false ) {
2830
433
            tests::test(op, result.second);
2831
433
        }
2832
2833
433
        postprocess(module, op, result);
2834
433
    }
2835
2836
191
    if ( options.noCompare == false ) {
2837
156
        compare(operations, results, data, size);
2838
156
    }
2839
191
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
72
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
72
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
72
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.54k
    do {
2725
1.54k
        auto op = getOp(&parentDs, data, size);
2726
1.54k
        auto module = getModule(parentDs);
2727
1.54k
        if ( module == nullptr ) {
2728
1.41k
            continue;
2729
1.41k
        }
2730
2731
136
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
136
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.54k
    } while ( parentDs.Get<bool>() == true );
2738
2739
72
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
63
#if 1
2745
63
    {
2746
63
        std::set<uint64_t> moduleIDs;
2747
63
        for (const auto& m : modules ) {
2748
56
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
56
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
56
            moduleIDs.insert(moduleID);
2756
56
        }
2757
2758
63
        std::set<uint64_t> operationModuleIDs;
2759
81
        for (const auto& op : operations) {
2760
81
            operationModuleIDs.insert(op.first->ID);
2761
81
        }
2762
2763
63
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
63
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
63
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
63
        for (const auto& id : addModuleIDs) {
2768
19
            operations.push_back({ modules.at(id), operations[0].second});
2769
19
        }
2770
63
    }
2771
63
#endif
2772
2773
63
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
63
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
163
    for (size_t i = 0; i < operations.size(); i++) {
2781
100
        auto& operation = operations[i];
2782
2783
100
        auto& module = operation.first;
2784
100
        auto& op = operation.second;
2785
2786
100
        if ( i > 0 ) {
2787
72
            auto& prevModule = operations[i-1].first;
2788
72
            auto& prevOp = operations[i].second;
2789
2790
72
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
38
                auto& curModifier = op.modifier.GetVectorPtr();
2792
38
                if ( curModifier.size() == 0 ) {
2793
6.66k
                    for (size_t j = 0; j < 512; j++) {
2794
6.65k
                        curModifier.push_back(1);
2795
6.65k
                    }
2796
25
                } else {
2797
1.29k
                    for (auto& c : curModifier) {
2798
1.29k
                        c++;
2799
1.29k
                    }
2800
25
                }
2801
38
            }
2802
72
        }
2803
2804
100
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
100
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
100
        const auto& result = results.back();
2811
2812
100
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
100
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
100
        if ( options.disableTests == false ) {
2830
100
            tests::test(op, result.second);
2831
100
        }
2832
2833
100
        postprocess(module, op, result);
2834
100
    }
2835
2836
63
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
63
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
75
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
75
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
75
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.06k
    do {
2725
2.06k
        auto op = getOp(&parentDs, data, size);
2726
2.06k
        auto module = getModule(parentDs);
2727
2.06k
        if ( module == nullptr ) {
2728
1.92k
            continue;
2729
1.92k
        }
2730
2731
147
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
147
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.06k
    } while ( parentDs.Get<bool>() == true );
2738
2739
75
    if ( operations.empty() == true ) {
2740
5
        return;
2741
5
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
70
#if 1
2745
70
    {
2746
70
        std::set<uint64_t> moduleIDs;
2747
74
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
70
        std::set<uint64_t> operationModuleIDs;
2759
105
        for (const auto& op : operations) {
2760
105
            operationModuleIDs.insert(op.first->ID);
2761
105
        }
2762
2763
70
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
70
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
70
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
70
        for (const auto& id : addModuleIDs) {
2768
24
            operations.push_back({ modules.at(id), operations[0].second});
2769
24
        }
2770
70
    }
2771
70
#endif
2772
2773
70
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
70
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
199
    for (size_t i = 0; i < operations.size(); i++) {
2781
129
        auto& operation = operations[i];
2782
2783
129
        auto& module = operation.first;
2784
129
        auto& op = operation.second;
2785
2786
129
        if ( i > 0 ) {
2787
92
            auto& prevModule = operations[i-1].first;
2788
92
            auto& prevOp = operations[i].second;
2789
2790
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
49
                auto& curModifier = op.modifier.GetVectorPtr();
2792
49
                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
27
                } else {
2797
2.86k
                    for (auto& c : curModifier) {
2798
2.86k
                        c++;
2799
2.86k
                    }
2800
22
                }
2801
49
            }
2802
92
        }
2803
2804
129
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
129
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
129
        const auto& result = results.back();
2811
2812
129
        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
129
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
129
        if ( options.disableTests == false ) {
2830
129
            tests::test(op, result.second);
2831
129
        }
2832
2833
129
        postprocess(module, op, result);
2834
129
    }
2835
2836
70
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
70
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
533
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
533
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
533
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.25k
    do {
2725
3.25k
        auto op = getOp(&parentDs, data, size);
2726
3.25k
        auto module = getModule(parentDs);
2727
3.25k
        if ( module == nullptr ) {
2728
2.41k
            continue;
2729
2.41k
        }
2730
2731
838
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
838
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
20
            break;
2736
20
        }
2737
3.23k
    } while ( parentDs.Get<bool>() == true );
2738
2739
533
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
525
#if 1
2745
525
    {
2746
525
        std::set<uint64_t> moduleIDs;
2747
980
        for (const auto& m : modules ) {
2748
980
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
980
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
980
            moduleIDs.insert(moduleID);
2756
980
        }
2757
2758
525
        std::set<uint64_t> operationModuleIDs;
2759
781
        for (const auto& op : operations) {
2760
781
            operationModuleIDs.insert(op.first->ID);
2761
781
        }
2762
2763
525
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
525
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
525
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
525
        for (const auto& id : addModuleIDs) {
2768
479
            operations.push_back({ modules.at(id), operations[0].second});
2769
479
        }
2770
525
    }
2771
525
#endif
2772
2773
525
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
525
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.78k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.26k
        auto& operation = operations[i];
2782
2783
1.26k
        auto& module = operation.first;
2784
1.26k
        auto& op = operation.second;
2785
2786
1.26k
        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
274
                auto& curModifier = op.modifier.GetVectorPtr();
2792
274
                if ( curModifier.size() == 0 ) {
2793
98.4k
                    for (size_t j = 0; j < 512; j++) {
2794
98.3k
                        curModifier.push_back(1);
2795
98.3k
                    }
2796
192
                } else {
2797
1.13k
                    for (auto& c : curModifier) {
2798
1.13k
                        c++;
2799
1.13k
                    }
2800
82
                }
2801
274
            }
2802
770
        }
2803
2804
1.26k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.26k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.26k
        const auto& result = results.back();
2811
2812
1.26k
        if ( result.second != std::nullopt ) {
2813
470
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
470
        }
2820
2821
1.26k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.26k
        if ( options.disableTests == false ) {
2830
1.26k
            tests::test(op, result.second);
2831
1.26k
        }
2832
2833
1.26k
        postprocess(module, op, result);
2834
1.26k
    }
2835
2836
525
    if ( options.noCompare == false ) {
2837
490
        compare(operations, results, data, size);
2838
490
    }
2839
525
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::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.25k
    do {
2725
2.25k
        auto op = getOp(&parentDs, data, size);
2726
2.25k
        auto module = getModule(parentDs);
2727
2.25k
        if ( module == nullptr ) {
2728
1.84k
            continue;
2729
1.84k
        }
2730
2731
410
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
410
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
2.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
194
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
188
#if 1
2745
188
    {
2746
188
        std::set<uint64_t> moduleIDs;
2747
312
        for (const auto& m : modules ) {
2748
312
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
312
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
312
            moduleIDs.insert(moduleID);
2756
312
        }
2757
2758
188
        std::set<uint64_t> operationModuleIDs;
2759
356
        for (const auto& op : operations) {
2760
356
            operationModuleIDs.insert(op.first->ID);
2761
356
        }
2762
2763
188
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
188
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
188
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
188
        for (const auto& id : addModuleIDs) {
2768
141
            operations.push_back({ modules.at(id), operations[0].second});
2769
141
        }
2770
188
    }
2771
188
#endif
2772
2773
188
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
188
    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
497
        auto& operation = operations[i];
2782
2783
497
        auto& module = operation.first;
2784
497
        auto& op = operation.second;
2785
2786
497
        if ( i > 0 ) {
2787
341
            auto& prevModule = operations[i-1].first;
2788
341
            auto& prevOp = operations[i].second;
2789
2790
341
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
177
                auto& curModifier = op.modifier.GetVectorPtr();
2792
177
                if ( curModifier.size() == 0 ) {
2793
50.2k
                    for (size_t j = 0; j < 512; j++) {
2794
50.1k
                        curModifier.push_back(1);
2795
50.1k
                    }
2796
98
                } else {
2797
902
                    for (auto& c : curModifier) {
2798
902
                        c++;
2799
902
                    }
2800
79
                }
2801
177
            }
2802
341
        }
2803
2804
497
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
497
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
497
        const auto& result = results.back();
2811
2812
497
        if ( result.second != std::nullopt ) {
2813
97
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
97
        }
2820
2821
497
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
497
        if ( options.disableTests == false ) {
2830
497
            tests::test(op, result.second);
2831
497
        }
2832
2833
497
        postprocess(module, op, result);
2834
497
    }
2835
2836
188
    if ( options.noCompare == false ) {
2837
156
        compare(operations, results, data, size);
2838
156
    }
2839
188
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
107
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
107
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
107
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.21k
    do {
2725
2.21k
        auto op = getOp(&parentDs, data, size);
2726
2.21k
        auto module = getModule(parentDs);
2727
2.21k
        if ( module == nullptr ) {
2728
2.05k
            continue;
2729
2.05k
        }
2730
2731
159
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
159
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.20k
    } while ( parentDs.Get<bool>() == true );
2738
2739
107
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
93
#if 1
2745
93
    {
2746
93
        std::set<uint64_t> moduleIDs;
2747
93
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
93
        std::set<uint64_t> operationModuleIDs;
2759
102
        for (const auto& op : operations) {
2760
102
            operationModuleIDs.insert(op.first->ID);
2761
102
        }
2762
2763
93
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
93
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
93
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
93
        for (const auto& id : addModuleIDs) {
2768
25
            operations.push_back({ modules.at(id), operations[0].second});
2769
25
        }
2770
93
    }
2771
93
#endif
2772
2773
93
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
93
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
220
    for (size_t i = 0; i < operations.size(); i++) {
2781
127
        auto& operation = operations[i];
2782
2783
127
        auto& module = operation.first;
2784
127
        auto& op = operation.second;
2785
2786
127
        if ( i > 0 ) {
2787
92
            auto& prevModule = operations[i-1].first;
2788
92
            auto& prevOp = operations[i].second;
2789
2790
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
2.91k
                    for (auto& c : curModifier) {
2798
2.91k
                        c++;
2799
2.91k
                    }
2800
24
                }
2801
50
            }
2802
92
        }
2803
2804
127
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
127
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
127
        const auto& result = results.back();
2811
2812
127
        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
127
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
127
        if ( options.disableTests == false ) {
2830
127
            tests::test(op, result.second);
2831
127
        }
2832
2833
127
        postprocess(module, op, result);
2834
127
    }
2835
2836
93
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
138
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
138
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
138
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.46k
    do {
2725
1.46k
        auto op = getOp(&parentDs, data, size);
2726
1.46k
        auto module = getModule(parentDs);
2727
1.46k
        if ( module == nullptr ) {
2728
1.30k
            continue;
2729
1.30k
        }
2730
2731
159
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
159
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.45k
    } while ( parentDs.Get<bool>() == true );
2738
2739
138
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
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
64
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
64
            moduleIDs.insert(moduleID);
2756
64
        }
2757
2758
120
        std::set<uint64_t> operationModuleIDs;
2759
120
        for (const auto& op : operations) {
2760
92
            operationModuleIDs.insert(op.first->ID);
2761
92
        }
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
24
            operations.push_back({ modules.at(id), operations[0].second});
2769
24
        }
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
236
    for (size_t i = 0; i < operations.size(); i++) {
2781
116
        auto& operation = operations[i];
2782
2783
116
        auto& module = operation.first;
2784
116
        auto& op = operation.second;
2785
2786
116
        if ( i > 0 ) {
2787
84
            auto& prevModule = operations[i-1].first;
2788
84
            auto& prevOp = operations[i].second;
2789
2790
84
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44
                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
24
                } else {
2797
628
                    for (auto& c : curModifier) {
2798
628
                        c++;
2799
628
                    }
2800
20
                }
2801
44
            }
2802
84
        }
2803
2804
116
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
116
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
116
        const auto& result = results.back();
2811
2812
116
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
116
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
116
        if ( options.disableTests == false ) {
2830
116
            tests::test(op, result.second);
2831
116
        }
2832
2833
116
        postprocess(module, op, result);
2834
116
    }
2835
2836
120
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
120
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
123
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
123
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
123
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.34k
    do {
2725
2.34k
        auto op = getOp(&parentDs, data, size);
2726
2.34k
        auto module = getModule(parentDs);
2727
2.34k
        if ( module == nullptr ) {
2728
2.16k
            continue;
2729
2.16k
        }
2730
2731
183
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
183
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
2.33k
    } while ( parentDs.Get<bool>() == true );
2738
2739
123
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
109
#if 1
2745
109
    {
2746
109
        std::set<uint64_t> moduleIDs;
2747
109
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
109
        std::set<uint64_t> operationModuleIDs;
2759
109
        for (const auto& op : operations) {
2760
106
            operationModuleIDs.insert(op.first->ID);
2761
106
        }
2762
2763
109
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
109
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
109
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
109
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
109
    }
2771
109
#endif
2772
2773
109
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
109
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
242
    for (size_t i = 0; i < operations.size(); i++) {
2781
133
        auto& operation = operations[i];
2782
2783
133
        auto& module = operation.first;
2784
133
        auto& op = operation.second;
2785
2786
133
        if ( i > 0 ) {
2787
94
            auto& prevModule = operations[i-1].first;
2788
94
            auto& prevOp = operations[i].second;
2789
2790
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
47
                auto& curModifier = op.modifier.GetVectorPtr();
2792
47
                if ( curModifier.size() == 0 ) {
2793
15.9k
                    for (size_t j = 0; j < 512; j++) {
2794
15.8k
                        curModifier.push_back(1);
2795
15.8k
                    }
2796
31
                } else {
2797
73
                    for (auto& c : curModifier) {
2798
73
                        c++;
2799
73
                    }
2800
16
                }
2801
47
            }
2802
94
        }
2803
2804
133
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
133
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
133
        const auto& result = results.back();
2811
2812
133
        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
133
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
133
        if ( options.disableTests == false ) {
2830
133
            tests::test(op, result.second);
2831
133
        }
2832
2833
133
        postprocess(module, op, result);
2834
133
    }
2835
2836
109
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
109
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
100
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
100
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
100
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.49k
    do {
2725
1.49k
        auto op = getOp(&parentDs, data, size);
2726
1.49k
        auto module = getModule(parentDs);
2727
1.49k
        if ( module == nullptr ) {
2728
1.35k
            continue;
2729
1.35k
        }
2730
2731
146
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
146
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.48k
    } while ( parentDs.Get<bool>() == true );
2738
2739
100
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
89
#if 1
2745
89
    {
2746
89
        std::set<uint64_t> moduleIDs;
2747
89
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
89
        std::set<uint64_t> operationModuleIDs;
2759
106
        for (const auto& op : operations) {
2760
106
            operationModuleIDs.insert(op.first->ID);
2761
106
        }
2762
2763
89
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
89
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
89
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
89
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
89
    }
2771
89
#endif
2772
2773
89
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
89
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
221
    for (size_t i = 0; i < operations.size(); i++) {
2781
132
        auto& operation = operations[i];
2782
2783
132
        auto& module = operation.first;
2784
132
        auto& op = operation.second;
2785
2786
132
        if ( i > 0 ) {
2787
96
            auto& prevModule = operations[i-1].first;
2788
96
            auto& prevOp = operations[i].second;
2789
2790
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
52
                auto& curModifier = op.modifier.GetVectorPtr();
2792
52
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
29
                } else {
2797
1.00k
                    for (auto& c : curModifier) {
2798
1.00k
                        c++;
2799
1.00k
                    }
2800
23
                }
2801
52
            }
2802
96
        }
2803
2804
132
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
132
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
132
        const auto& result = results.back();
2811
2812
132
        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
132
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
132
        if ( options.disableTests == false ) {
2830
132
            tests::test(op, result.second);
2831
132
        }
2832
2833
132
        postprocess(module, op, result);
2834
132
    }
2835
2836
89
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
89
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
117
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
117
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
117
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.82k
    do {
2725
1.82k
        auto op = getOp(&parentDs, data, size);
2726
1.82k
        auto module = getModule(parentDs);
2727
1.82k
        if ( module == nullptr ) {
2728
1.68k
            continue;
2729
1.68k
        }
2730
2731
136
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
136
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.81k
    } while ( parentDs.Get<bool>() == true );
2738
2739
117
    if ( operations.empty() == true ) {
2740
24
        return;
2741
24
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
93
#if 1
2745
93
    {
2746
93
        std::set<uint64_t> moduleIDs;
2747
93
        for (const auto& m : modules ) {
2748
52
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
52
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
52
            moduleIDs.insert(moduleID);
2756
52
        }
2757
2758
93
        std::set<uint64_t> operationModuleIDs;
2759
93
        for (const auto& op : operations) {
2760
80
            operationModuleIDs.insert(op.first->ID);
2761
80
        }
2762
2763
93
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
93
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
93
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
93
        for (const auto& id : addModuleIDs) {
2768
16
            operations.push_back({ modules.at(id), operations[0].second});
2769
16
        }
2770
93
    }
2771
93
#endif
2772
2773
93
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
93
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
189
    for (size_t i = 0; i < operations.size(); i++) {
2781
96
        auto& operation = operations[i];
2782
2783
96
        auto& module = operation.first;
2784
96
        auto& op = operation.second;
2785
2786
96
        if ( i > 0 ) {
2787
70
            auto& prevModule = operations[i-1].first;
2788
70
            auto& prevOp = operations[i].second;
2789
2790
70
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
38
                auto& curModifier = op.modifier.GetVectorPtr();
2792
38
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
20
                } else {
2797
511
                    for (auto& c : curModifier) {
2798
511
                        c++;
2799
511
                    }
2800
20
                }
2801
38
            }
2802
70
        }
2803
2804
96
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
96
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
96
        const auto& result = results.back();
2811
2812
96
        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
96
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
96
        if ( options.disableTests == false ) {
2830
96
            tests::test(op, result.second);
2831
96
        }
2832
2833
96
        postprocess(module, op, result);
2834
96
    }
2835
2836
93
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
99
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
99
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
99
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.74k
    do {
2725
1.74k
        auto op = getOp(&parentDs, data, size);
2726
1.74k
        auto module = getModule(parentDs);
2727
1.74k
        if ( module == nullptr ) {
2728
1.57k
            continue;
2729
1.57k
        }
2730
2731
165
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
165
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.73k
    } while ( parentDs.Get<bool>() == true );
2738
2739
99
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
88
#if 1
2745
88
    {
2746
88
        std::set<uint64_t> moduleIDs;
2747
88
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
88
        std::set<uint64_t> operationModuleIDs;
2759
96
        for (const auto& op : operations) {
2760
96
            operationModuleIDs.insert(op.first->ID);
2761
96
        }
2762
2763
88
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
88
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
88
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
88
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
88
    }
2771
88
#endif
2772
2773
88
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
88
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
210
    for (size_t i = 0; i < operations.size(); i++) {
2781
122
        auto& operation = operations[i];
2782
2783
122
        auto& module = operation.first;
2784
122
        auto& op = operation.second;
2785
2786
122
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
355
                    for (auto& c : curModifier) {
2798
355
                        c++;
2799
355
                    }
2800
22
                }
2801
44
            }
2802
86
        }
2803
2804
122
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
122
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
122
        const auto& result = results.back();
2811
2812
122
        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
122
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
122
        if ( options.disableTests == false ) {
2830
122
            tests::test(op, result.second);
2831
122
        }
2832
2833
122
        postprocess(module, op, result);
2834
122
    }
2835
2836
88
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
88
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
100
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
100
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
100
    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.99k
            continue;
2729
1.99k
        }
2730
2731
163
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
163
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.15k
    } while ( parentDs.Get<bool>() == true );
2738
2739
100
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
87
#if 1
2745
87
    {
2746
87
        std::set<uint64_t> moduleIDs;
2747
87
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
87
        std::set<uint64_t> operationModuleIDs;
2759
99
        for (const auto& op : operations) {
2760
99
            operationModuleIDs.insert(op.first->ID);
2761
99
        }
2762
2763
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
87
        for (const auto& id : addModuleIDs) {
2768
24
            operations.push_back({ modules.at(id), operations[0].second});
2769
24
        }
2770
87
    }
2771
87
#endif
2772
2773
87
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
87
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
210
    for (size_t i = 0; i < operations.size(); i++) {
2781
123
        auto& operation = operations[i];
2782
2783
123
        auto& module = operation.first;
2784
123
        auto& op = operation.second;
2785
2786
123
        if ( i > 0 ) {
2787
86
            auto& prevModule = operations[i-1].first;
2788
86
            auto& prevOp = operations[i].second;
2789
2790
86
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
27
                } else {
2797
1.80k
                    for (auto& c : curModifier) {
2798
1.80k
                        c++;
2799
1.80k
                    }
2800
27
                }
2801
42
            }
2802
86
        }
2803
2804
123
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
123
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
123
        const auto& result = results.back();
2811
2812
123
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
123
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
123
        if ( options.disableTests == false ) {
2830
123
            tests::test(op, result.second);
2831
123
        }
2832
2833
123
        postprocess(module, op, result);
2834
123
    }
2835
2836
87
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
111
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
111
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
111
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.26k
    do {
2725
1.26k
        auto op = getOp(&parentDs, data, size);
2726
1.26k
        auto module = getModule(parentDs);
2727
1.26k
        if ( module == nullptr ) {
2728
1.03k
            continue;
2729
1.03k
        }
2730
2731
232
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
232
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
1.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
111
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
103
#if 1
2745
103
    {
2746
103
        std::set<uint64_t> moduleIDs;
2747
114
        for (const auto& m : modules ) {
2748
114
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
114
            moduleIDs.insert(moduleID);
2756
114
        }
2757
2758
103
        std::set<uint64_t> operationModuleIDs;
2759
172
        for (const auto& op : operations) {
2760
172
            operationModuleIDs.insert(op.first->ID);
2761
172
        }
2762
2763
103
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
103
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
103
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
103
        for (const auto& id : addModuleIDs) {
2768
47
            operations.push_back({ modules.at(id), operations[0].second});
2769
47
        }
2770
103
    }
2771
103
#endif
2772
2773
103
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
103
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
322
    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
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
99
                auto& curModifier = op.modifier.GetVectorPtr();
2792
99
                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
54
                } else {
2797
323
                    for (auto& c : curModifier) {
2798
323
                        c++;
2799
323
                    }
2800
54
                }
2801
99
            }
2802
162
        }
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
39
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
39
        }
2820
2821
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
103
    if ( options.noCompare == false ) {
2837
57
        compare(operations, results, data, size);
2838
57
    }
2839
103
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
127
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
127
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
127
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.85k
    do {
2725
1.85k
        auto op = getOp(&parentDs, data, size);
2726
1.85k
        auto module = getModule(parentDs);
2727
1.85k
        if ( module == nullptr ) {
2728
1.59k
            continue;
2729
1.59k
        }
2730
2731
257
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
257
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
16
            break;
2736
16
        }
2737
1.83k
    } while ( parentDs.Get<bool>() == true );
2738
2739
127
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
117
#if 1
2745
117
    {
2746
117
        std::set<uint64_t> moduleIDs;
2747
148
        for (const auto& m : modules ) {
2748
148
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
148
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
148
            moduleIDs.insert(moduleID);
2756
148
        }
2757
2758
117
        std::set<uint64_t> operationModuleIDs;
2759
194
        for (const auto& op : operations) {
2760
194
            operationModuleIDs.insert(op.first->ID);
2761
194
        }
2762
2763
117
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
117
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
117
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
117
        for (const auto& id : addModuleIDs) {
2768
60
            operations.push_back({ modules.at(id), operations[0].second});
2769
60
        }
2770
117
    }
2771
117
#endif
2772
2773
117
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
117
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
371
    for (size_t i = 0; i < operations.size(); i++) {
2781
254
        auto& operation = operations[i];
2782
2783
254
        auto& module = operation.first;
2784
254
        auto& op = operation.second;
2785
2786
254
        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
86
                auto& curModifier = op.modifier.GetVectorPtr();
2792
86
                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
1.86k
                    for (auto& c : curModifier) {
2798
1.86k
                        c++;
2799
1.86k
                    }
2800
39
                }
2801
86
            }
2802
180
        }
2803
2804
254
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
254
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
254
        const auto& result = results.back();
2811
2812
254
        if ( result.second != std::nullopt ) {
2813
28
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
28
        }
2820
2821
254
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
254
        if ( options.disableTests == false ) {
2830
254
            tests::test(op, result.second);
2831
254
        }
2832
2833
254
        postprocess(module, op, result);
2834
254
    }
2835
2836
117
    if ( options.noCompare == false ) {
2837
74
        compare(operations, results, data, size);
2838
74
    }
2839
117
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
524
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
524
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
524
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.88k
    do {
2725
2.88k
        auto op = getOp(&parentDs, data, size);
2726
2.88k
        auto module = getModule(parentDs);
2727
2.88k
        if ( module == nullptr ) {
2728
1.87k
            continue;
2729
1.87k
        }
2730
2731
1.01k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.01k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
32
            break;
2736
32
        }
2737
2.85k
    } while ( parentDs.Get<bool>() == true );
2738
2739
524
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
506
#if 1
2745
506
    {
2746
506
        std::set<uint64_t> moduleIDs;
2747
928
        for (const auto& m : modules ) {
2748
928
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
928
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
928
            moduleIDs.insert(moduleID);
2756
928
        }
2757
2758
506
        std::set<uint64_t> operationModuleIDs;
2759
963
        for (const auto& op : operations) {
2760
963
            operationModuleIDs.insert(op.first->ID);
2761
963
        }
2762
2763
506
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
506
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
506
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
506
        for (const auto& id : addModuleIDs) {
2768
450
            operations.push_back({ modules.at(id), operations[0].second});
2769
450
        }
2770
506
    }
2771
506
#endif
2772
2773
506
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
506
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.91k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.41k
        auto& operation = operations[i];
2782
2783
1.41k
        auto& module = operation.first;
2784
1.41k
        auto& op = operation.second;
2785
2786
1.41k
        if ( i > 0 ) {
2787
949
            auto& prevModule = operations[i-1].first;
2788
949
            auto& prevOp = operations[i].second;
2789
2790
949
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
479
                auto& curModifier = op.modifier.GetVectorPtr();
2792
479
                if ( curModifier.size() == 0 ) {
2793
217k
                    for (size_t j = 0; j < 512; j++) {
2794
217k
                        curModifier.push_back(1);
2795
217k
                    }
2796
424
                } else {
2797
869
                    for (auto& c : curModifier) {
2798
869
                        c++;
2799
869
                    }
2800
55
                }
2801
479
            }
2802
949
        }
2803
2804
1.41k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.41k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.41k
        const auto& result = results.back();
2811
2812
1.41k
        if ( result.second != std::nullopt ) {
2813
115
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
115
        }
2820
2821
1.41k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.41k
        if ( options.disableTests == false ) {
2830
1.41k
            tests::test(op, result.second);
2831
1.41k
        }
2832
2833
1.41k
        postprocess(module, op, result);
2834
1.41k
    }
2835
2836
506
    if ( options.noCompare == false ) {
2837
464
        compare(operations, results, data, size);
2838
464
    }
2839
506
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
141
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
141
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
141
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.31k
    do {
2725
1.31k
        auto op = getOp(&parentDs, data, size);
2726
1.31k
        auto module = getModule(parentDs);
2727
1.31k
        if ( module == nullptr ) {
2728
1.10k
            continue;
2729
1.10k
        }
2730
2731
213
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
213
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
1.30k
    } while ( parentDs.Get<bool>() == true );
2738
2739
141
    if ( operations.empty() == true ) {
2740
28
        return;
2741
28
    }
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
134
        for (const auto& m : modules ) {
2748
134
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
134
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
134
            moduleIDs.insert(moduleID);
2756
134
        }
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
54
            operations.push_back({ modules.at(id), operations[0].second});
2769
54
        }
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
325
    for (size_t i = 0; i < operations.size(); i++) {
2781
212
        auto& operation = operations[i];
2782
2783
212
        auto& module = operation.first;
2784
212
        auto& op = operation.second;
2785
2786
212
        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
69
                auto& curModifier = op.modifier.GetVectorPtr();
2792
69
                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
36
                } else {
2797
306
                    for (auto& c : curModifier) {
2798
306
                        c++;
2799
306
                    }
2800
33
                }
2801
69
            }
2802
145
        }
2803
2804
212
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
212
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
212
        const auto& result = results.back();
2811
2812
212
        if ( result.second != std::nullopt ) {
2813
36
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
36
        }
2820
2821
212
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
212
        if ( options.disableTests == false ) {
2830
212
            tests::test(op, result.second);
2831
212
        }
2832
2833
212
        postprocess(module, op, result);
2834
212
    }
2835
2836
113
    if ( options.noCompare == false ) {
2837
67
        compare(operations, results, data, size);
2838
67
    }
2839
113
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
136
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
136
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
136
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.21k
    do {
2725
1.21k
        auto op = getOp(&parentDs, data, size);
2726
1.21k
        auto module = getModule(parentDs);
2727
1.21k
        if ( module == nullptr ) {
2728
1.00k
            continue;
2729
1.00k
        }
2730
2731
212
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
212
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.20k
    } while ( parentDs.Get<bool>() == true );
2738
2739
136
    if ( operations.empty() == true ) {
2740
27
        return;
2741
27
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
109
#if 1
2745
109
    {
2746
109
        std::set<uint64_t> moduleIDs;
2747
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
109
        std::set<uint64_t> operationModuleIDs;
2759
149
        for (const auto& op : operations) {
2760
149
            operationModuleIDs.insert(op.first->ID);
2761
149
        }
2762
2763
109
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
109
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
109
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
109
        for (const auto& id : addModuleIDs) {
2768
51
            operations.push_back({ modules.at(id), operations[0].second});
2769
51
        }
2770
109
    }
2771
109
#endif
2772
2773
109
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
109
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
309
    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
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
77
                auto& curModifier = op.modifier.GetVectorPtr();
2792
77
                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
1.10k
                    for (auto& c : curModifier) {
2798
1.10k
                        c++;
2799
1.10k
                    }
2800
33
                }
2801
77
            }
2802
140
        }
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
23
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
23
        }
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
109
    if ( options.noCompare == false ) {
2837
60
        compare(operations, results, data, size);
2838
60
    }
2839
109
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
93
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
93
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
93
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.72k
    do {
2725
1.72k
        auto op = getOp(&parentDs, data, size);
2726
1.72k
        auto module = getModule(parentDs);
2727
1.72k
        if ( module == nullptr ) {
2728
1.53k
            continue;
2729
1.53k
        }
2730
2731
188
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
188
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
1.71k
    } while ( parentDs.Get<bool>() == true );
2738
2739
93
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
79
#if 1
2745
79
    {
2746
79
        std::set<uint64_t> moduleIDs;
2747
110
        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
79
        std::set<uint64_t> operationModuleIDs;
2759
158
        for (const auto& op : operations) {
2760
158
            operationModuleIDs.insert(op.first->ID);
2761
158
        }
2762
2763
79
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
79
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
79
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
79
        for (const auto& id : addModuleIDs) {
2768
44
            operations.push_back({ modules.at(id), operations[0].second});
2769
44
        }
2770
79
    }
2771
79
#endif
2772
2773
79
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
79
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
281
    for (size_t i = 0; i < operations.size(); i++) {
2781
202
        auto& operation = operations[i];
2782
2783
202
        auto& module = operation.first;
2784
202
        auto& op = operation.second;
2785
2786
202
        if ( i > 0 ) {
2787
147
            auto& prevModule = operations[i-1].first;
2788
147
            auto& prevOp = operations[i].second;
2789
2790
147
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
77
                auto& curModifier = op.modifier.GetVectorPtr();
2792
77
                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
43
                } else {
2797
719
                    for (auto& c : curModifier) {
2798
719
                        c++;
2799
719
                    }
2800
43
                }
2801
77
            }
2802
147
        }
2803
2804
202
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
202
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
202
        const auto& result = results.back();
2811
2812
202
        if ( result.second != std::nullopt ) {
2813
17
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
17
        }
2820
2821
202
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
202
        if ( options.disableTests == false ) {
2830
202
            tests::test(op, result.second);
2831
202
        }
2832
2833
202
        postprocess(module, op, result);
2834
202
    }
2835
2836
79
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
90
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
90
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
90
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.51k
    do {
2725
2.51k
        auto op = getOp(&parentDs, data, size);
2726
2.51k
        auto module = getModule(parentDs);
2727
2.51k
        if ( module == nullptr ) {
2728
2.37k
            continue;
2729
2.37k
        }
2730
2731
139
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
139
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.51k
    } while ( parentDs.Get<bool>() == true );
2738
2739
90
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
77
#if 1
2745
77
    {
2746
77
        std::set<uint64_t> moduleIDs;
2747
77
        for (const auto& m : modules ) {
2748
64
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
64
            moduleIDs.insert(moduleID);
2756
64
        }
2757
2758
77
        std::set<uint64_t> operationModuleIDs;
2759
93
        for (const auto& op : operations) {
2760
93
            operationModuleIDs.insert(op.first->ID);
2761
93
        }
2762
2763
77
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
77
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
77
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
77
        for (const auto& id : addModuleIDs) {
2768
20
            operations.push_back({ modules.at(id), operations[0].second});
2769
20
        }
2770
77
    }
2771
77
#endif
2772
2773
77
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
77
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
190
    for (size_t i = 0; i < operations.size(); i++) {
2781
113
        auto& operation = operations[i];
2782
2783
113
        auto& module = operation.first;
2784
113
        auto& op = operation.second;
2785
2786
113
        if ( i > 0 ) {
2787
81
            auto& prevModule = operations[i-1].first;
2788
81
            auto& prevOp = operations[i].second;
2789
2790
81
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
26
                } else {
2797
775
                    for (auto& c : curModifier) {
2798
775
                        c++;
2799
775
                    }
2800
26
                }
2801
42
            }
2802
81
        }
2803
2804
113
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
113
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
113
        const auto& result = results.back();
2811
2812
113
        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
113
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
113
        if ( options.disableTests == false ) {
2830
113
            tests::test(op, result.second);
2831
113
        }
2832
2833
113
        postprocess(module, op, result);
2834
113
    }
2835
2836
77
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
77
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::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.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.17k
            continue;
2729
2.17k
        }
2730
2731
345
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
345
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
11
            break;
2736
11
        }
2737
2.51k
    } while ( parentDs.Get<bool>() == true );
2738
2739
219
    if ( operations.empty() == true ) {
2740
6
        return;
2741
6
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
213
#if 1
2745
213
    {
2746
213
        std::set<uint64_t> moduleIDs;
2747
302
        for (const auto& m : modules ) {
2748
302
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
302
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
302
            moduleIDs.insert(moduleID);
2756
302
        }
2757
2758
213
        std::set<uint64_t> operationModuleIDs;
2759
283
        for (const auto& op : operations) {
2760
283
            operationModuleIDs.insert(op.first->ID);
2761
283
        }
2762
2763
213
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
213
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
213
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
213
        for (const auto& id : addModuleIDs) {
2768
139
            operations.push_back({ modules.at(id), operations[0].second});
2769
139
        }
2770
213
    }
2771
213
#endif
2772
2773
213
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
213
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
635
    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
271
            auto& prevModule = operations[i-1].first;
2788
271
            auto& prevOp = operations[i].second;
2789
2790
271
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
114
                auto& curModifier = op.modifier.GetVectorPtr();
2792
114
                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
61
                } else {
2797
14.4k
                    for (auto& c : curModifier) {
2798
14.4k
                        c++;
2799
14.4k
                    }
2800
61
                }
2801
114
            }
2802
271
        }
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
17
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
17
        }
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
213
    if ( options.noCompare == false ) {
2837
151
        compare(operations, results, data, size);
2838
151
    }
2839
213
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.68k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.68k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.68k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
14.2k
    do {
2725
14.2k
        auto op = getOp(&parentDs, data, size);
2726
14.2k
        auto module = getModule(parentDs);
2727
14.2k
        if ( module == nullptr ) {
2728
8.34k
            continue;
2729
8.34k
        }
2730
2731
5.94k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.94k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
149
            break;
2736
149
        }
2737
14.1k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.68k
    if ( operations.empty() == true ) {
2740
84
        return;
2741
84
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.59k
#if 1
2745
3.59k
    {
2746
3.59k
        std::set<uint64_t> moduleIDs;
2747
6.78k
        for (const auto& m : modules ) {
2748
6.78k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6.78k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6.78k
            moduleIDs.insert(moduleID);
2756
6.78k
        }
2757
2758
3.59k
        std::set<uint64_t> operationModuleIDs;
2759
5.70k
        for (const auto& op : operations) {
2760
5.70k
            operationModuleIDs.insert(op.first->ID);
2761
5.70k
        }
2762
2763
3.59k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.59k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.59k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.59k
        for (const auto& id : addModuleIDs) {
2768
3.35k
            operations.push_back({ modules.at(id), operations[0].second});
2769
3.35k
        }
2770
3.59k
    }
2771
3.59k
#endif
2772
2773
3.59k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.59k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12.6k
    for (size_t i = 0; i < operations.size(); i++) {
2781
9.05k
        auto& operation = operations[i];
2782
2783
9.05k
        auto& module = operation.first;
2784
9.05k
        auto& op = operation.second;
2785
2786
9.05k
        if ( i > 0 ) {
2787
5.66k
            auto& prevModule = operations[i-1].first;
2788
5.66k
            auto& prevOp = operations[i].second;
2789
2790
5.66k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2.24k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2.24k
                if ( curModifier.size() == 0 ) {
2793
613k
                    for (size_t j = 0; j < 512; j++) {
2794
611k
                        curModifier.push_back(1);
2795
611k
                    }
2796
1.19k
                } else {
2797
49.4k
                    for (auto& c : curModifier) {
2798
49.4k
                        c++;
2799
49.4k
                    }
2800
1.05k
                }
2801
2.24k
            }
2802
5.66k
        }
2803
2804
9.05k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9.05k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9.05k
        const auto& result = results.back();
2811
2812
9.05k
        if ( result.second != std::nullopt ) {
2813
3.35k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.35k
        }
2820
2821
9.05k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
9.05k
        if ( options.disableTests == false ) {
2830
9.05k
            tests::test(op, result.second);
2831
9.05k
        }
2832
2833
9.05k
        postprocess(module, op, result);
2834
9.05k
    }
2835
2836
3.59k
    if ( options.noCompare == false ) {
2837
3.39k
        compare(operations, results, data, size);
2838
3.39k
    }
2839
3.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
112
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
112
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
112
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.94k
    do {
2725
1.94k
        auto op = getOp(&parentDs, data, size);
2726
1.94k
        auto module = getModule(parentDs);
2727
1.94k
        if ( module == nullptr ) {
2728
1.76k
            continue;
2729
1.76k
        }
2730
2731
180
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
180
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.93k
    } while ( parentDs.Get<bool>() == true );
2738
2739
112
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
100
#if 1
2745
100
    {
2746
100
        std::set<uint64_t> moduleIDs;
2747
154
        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
100
        std::set<uint64_t> operationModuleIDs;
2759
154
        for (const auto& op : operations) {
2760
154
            operationModuleIDs.insert(op.first->ID);
2761
154
        }
2762
2763
100
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
100
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
100
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
100
        for (const auto& id : addModuleIDs) {
2768
67
            operations.push_back({ modules.at(id), operations[0].second});
2769
67
        }
2770
100
    }
2771
100
#endif
2772
2773
100
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
100
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
321
    for (size_t i = 0; i < operations.size(); i++) {
2781
221
        auto& operation = operations[i];
2782
2783
221
        auto& module = operation.first;
2784
221
        auto& op = operation.second;
2785
2786
221
        if ( i > 0 ) {
2787
144
            auto& prevModule = operations[i-1].first;
2788
144
            auto& prevOp = operations[i].second;
2789
2790
144
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
59
                auto& curModifier = op.modifier.GetVectorPtr();
2792
59
                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
32
                } else {
2797
34.2k
                    for (auto& c : curModifier) {
2798
34.2k
                        c++;
2799
34.2k
                    }
2800
27
                }
2801
59
            }
2802
144
        }
2803
2804
221
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
221
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
221
        const auto& result = results.back();
2811
2812
221
        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
221
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
221
        if ( options.disableTests == false ) {
2830
221
            tests::test(op, result.second);
2831
221
        }
2832
2833
221
        postprocess(module, op, result);
2834
221
    }
2835
2836
100
    if ( options.noCompare == false ) {
2837
77
        compare(operations, results, data, size);
2838
77
    }
2839
100
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
303
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
303
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
303
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.60k
    do {
2725
1.60k
        auto op = getOp(&parentDs, data, size);
2726
1.60k
        auto module = getModule(parentDs);
2727
1.60k
        if ( module == nullptr ) {
2728
1.04k
            continue;
2729
1.04k
        }
2730
2731
562
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
562
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
33
            break;
2736
33
        }
2737
1.57k
    } while ( parentDs.Get<bool>() == true );
2738
2739
303
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
295
#if 1
2745
295
    {
2746
295
        std::set<uint64_t> moduleIDs;
2747
494
        for (const auto& m : modules ) {
2748
494
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
494
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
494
            moduleIDs.insert(moduleID);
2756
494
        }
2757
2758
295
        std::set<uint64_t> operationModuleIDs;
2759
498
        for (const auto& op : operations) {
2760
498
            operationModuleIDs.insert(op.first->ID);
2761
498
        }
2762
2763
295
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
295
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
295
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
295
        for (const auto& id : addModuleIDs) {
2768
239
            operations.push_back({ modules.at(id), operations[0].second});
2769
239
        }
2770
295
    }
2771
295
#endif
2772
2773
295
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
295
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.03k
    for (size_t i = 0; i < operations.size(); i++) {
2781
737
        auto& operation = operations[i];
2782
2783
737
        auto& module = operation.first;
2784
737
        auto& op = operation.second;
2785
2786
737
        if ( i > 0 ) {
2787
490
            auto& prevModule = operations[i-1].first;
2788
490
            auto& prevOp = operations[i].second;
2789
2790
490
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
240
                auto& curModifier = op.modifier.GetVectorPtr();
2792
240
                if ( curModifier.size() == 0 ) {
2793
112k
                    for (size_t j = 0; j < 512; j++) {
2794
112k
                        curModifier.push_back(1);
2795
112k
                    }
2796
219
                } else {
2797
60.7k
                    for (auto& c : curModifier) {
2798
60.7k
                        c++;
2799
60.7k
                    }
2800
21
                }
2801
240
            }
2802
490
        }
2803
2804
737
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
737
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
737
        const auto& result = results.back();
2811
2812
737
        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
737
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
737
        if ( options.disableTests == false ) {
2830
737
            tests::test(op, result.second);
2831
737
        }
2832
2833
737
        postprocess(module, op, result);
2834
737
    }
2835
2836
295
    if ( options.noCompare == false ) {
2837
247
        compare(operations, results, data, size);
2838
247
    }
2839
295
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
91
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
91
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
91
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.47k
    do {
2725
1.47k
        auto op = getOp(&parentDs, data, size);
2726
1.47k
        auto module = getModule(parentDs);
2727
1.47k
        if ( module == nullptr ) {
2728
1.30k
            continue;
2729
1.30k
        }
2730
2731
169
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
169
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.46k
    } while ( parentDs.Get<bool>() == true );
2738
2739
91
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
82
#if 1
2745
82
    {
2746
82
        std::set<uint64_t> moduleIDs;
2747
82
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
82
        std::set<uint64_t> operationModuleIDs;
2759
104
        for (const auto& op : operations) {
2760
104
            operationModuleIDs.insert(op.first->ID);
2761
104
        }
2762
2763
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
82
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
82
    }
2771
82
#endif
2772
2773
82
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
82
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
214
    for (size_t i = 0; i < operations.size(); i++) {
2781
132
        auto& operation = operations[i];
2782
2783
132
        auto& module = operation.first;
2784
132
        auto& op = operation.second;
2785
2786
132
        if ( i > 0 ) {
2787
92
            auto& prevModule = operations[i-1].first;
2788
92
            auto& prevOp = operations[i].second;
2789
2790
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
46
                auto& curModifier = op.modifier.GetVectorPtr();
2792
46
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
28
                } else {
2797
329
                    for (auto& c : curModifier) {
2798
329
                        c++;
2799
329
                    }
2800
28
                }
2801
46
            }
2802
92
        }
2803
2804
132
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
132
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
132
        const auto& result = results.back();
2811
2812
132
        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
132
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
132
        if ( options.disableTests == false ) {
2830
132
            tests::test(op, result.second);
2831
132
        }
2832
2833
132
        postprocess(module, op, result);
2834
132
    }
2835
2836
82
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
99
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
99
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
99
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.23k
    do {
2725
1.23k
        auto op = getOp(&parentDs, data, size);
2726
1.23k
        auto module = getModule(parentDs);
2727
1.23k
        if ( module == nullptr ) {
2728
1.06k
            continue;
2729
1.06k
        }
2730
2731
173
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
173
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
99
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
86
#if 1
2745
86
    {
2746
86
        std::set<uint64_t> moduleIDs;
2747
110
        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
86
        std::set<uint64_t> operationModuleIDs;
2759
131
        for (const auto& op : operations) {
2760
131
            operationModuleIDs.insert(op.first->ID);
2761
131
        }
2762
2763
86
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
86
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
86
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
86
        for (const auto& id : addModuleIDs) {
2768
42
            operations.push_back({ modules.at(id), operations[0].second});
2769
42
        }
2770
86
    }
2771
86
#endif
2772
2773
86
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
86
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
259
    for (size_t i = 0; i < operations.size(); i++) {
2781
173
        auto& operation = operations[i];
2782
2783
173
        auto& module = operation.first;
2784
173
        auto& op = operation.second;
2785
2786
173
        if ( i > 0 ) {
2787
118
            auto& prevModule = operations[i-1].first;
2788
118
            auto& prevOp = operations[i].second;
2789
2790
118
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
29
                } else {
2797
768
                    for (auto& c : curModifier) {
2798
768
                        c++;
2799
768
                    }
2800
24
                }
2801
53
            }
2802
118
        }
2803
2804
173
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
173
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
173
        const auto& result = results.back();
2811
2812
173
        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
173
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
173
        if ( options.disableTests == false ) {
2830
173
            tests::test(op, result.second);
2831
173
        }
2832
2833
173
        postprocess(module, op, result);
2834
173
    }
2835
2836
86
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
90
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
90
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
90
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.46k
    do {
2725
2.46k
        auto op = getOp(&parentDs, data, size);
2726
2.46k
        auto module = getModule(parentDs);
2727
2.46k
        if ( module == nullptr ) {
2728
2.32k
            continue;
2729
2.32k
        }
2730
2731
138
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
138
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.45k
    } while ( parentDs.Get<bool>() == true );
2738
2739
90
    if ( operations.empty() == true ) {
2740
17
        return;
2741
17
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
73
#if 1
2745
73
    {
2746
73
        std::set<uint64_t> moduleIDs;
2747
73
        for (const auto& m : modules ) {
2748
56
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
56
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
56
            moduleIDs.insert(moduleID);
2756
56
        }
2757
2758
73
        std::set<uint64_t> operationModuleIDs;
2759
87
        for (const auto& op : operations) {
2760
87
            operationModuleIDs.insert(op.first->ID);
2761
87
        }
2762
2763
73
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
73
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
73
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
73
        for (const auto& id : addModuleIDs) {
2768
19
            operations.push_back({ modules.at(id), operations[0].second});
2769
19
        }
2770
73
    }
2771
73
#endif
2772
2773
73
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
73
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
179
    for (size_t i = 0; i < operations.size(); i++) {
2781
106
        auto& operation = operations[i];
2782
2783
106
        auto& module = operation.first;
2784
106
        auto& op = operation.second;
2785
2786
106
        if ( i > 0 ) {
2787
78
            auto& prevModule = operations[i-1].first;
2788
78
            auto& prevOp = operations[i].second;
2789
2790
78
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                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
21
                } else {
2797
1.49k
                    for (auto& c : curModifier) {
2798
1.49k
                        c++;
2799
1.49k
                    }
2800
21
                }
2801
42
            }
2802
78
        }
2803
2804
106
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
106
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
106
        const auto& result = results.back();
2811
2812
106
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
106
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
106
        if ( options.disableTests == false ) {
2830
106
            tests::test(op, result.second);
2831
106
        }
2832
2833
106
        postprocess(module, op, result);
2834
106
    }
2835
2836
73
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
73
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
74
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
74
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
74
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.90k
    do {
2725
1.90k
        auto op = getOp(&parentDs, data, size);
2726
1.90k
        auto module = getModule(parentDs);
2727
1.90k
        if ( module == nullptr ) {
2728
1.76k
            continue;
2729
1.76k
        }
2730
2731
147
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
147
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.90k
    } while ( parentDs.Get<bool>() == true );
2738
2739
74
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
63
#if 1
2745
63
    {
2746
63
        std::set<uint64_t> moduleIDs;
2747
63
        for (const auto& m : modules ) {
2748
62
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
62
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
62
            moduleIDs.insert(moduleID);
2756
62
        }
2757
2758
63
        std::set<uint64_t> operationModuleIDs;
2759
96
        for (const auto& op : operations) {
2760
96
            operationModuleIDs.insert(op.first->ID);
2761
96
        }
2762
2763
63
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
63
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
63
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
63
        for (const auto& id : addModuleIDs) {
2768
18
            operations.push_back({ modules.at(id), operations[0].second});
2769
18
        }
2770
63
    }
2771
63
#endif
2772
2773
63
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
63
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
177
    for (size_t i = 0; i < operations.size(); i++) {
2781
114
        auto& operation = operations[i];
2782
2783
114
        auto& module = operation.first;
2784
114
        auto& op = operation.second;
2785
2786
114
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
25
                } else {
2797
3.47k
                    for (auto& c : curModifier) {
2798
3.47k
                        c++;
2799
3.47k
                    }
2800
25
                }
2801
42
            }
2802
83
        }
2803
2804
114
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
114
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
114
        const auto& result = results.back();
2811
2812
114
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
114
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
114
        if ( options.disableTests == false ) {
2830
114
            tests::test(op, result.second);
2831
114
        }
2832
2833
114
        postprocess(module, op, result);
2834
114
    }
2835
2836
63
    if ( options.noCompare == false ) {
2837
31
        compare(operations, results, data, size);
2838
31
    }
2839
63
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::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.18k
    do {
2725
2.18k
        auto op = getOp(&parentDs, data, size);
2726
2.18k
        auto module = getModule(parentDs);
2727
2.18k
        if ( module == nullptr ) {
2728
1.95k
            continue;
2729
1.95k
        }
2730
2731
227
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
227
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.17k
    } while ( parentDs.Get<bool>() == true );
2738
2739
153
    if ( operations.empty() == true ) {
2740
23
        return;
2741
23
    }
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
92
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
92
            moduleIDs.insert(moduleID);
2756
92
        }
2757
2758
130
        std::set<uint64_t> operationModuleIDs;
2759
130
        for (const auto& op : operations) {
2760
118
            operationModuleIDs.insert(op.first->ID);
2761
118
        }
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
33
            operations.push_back({ modules.at(id), operations[0].second});
2769
33
        }
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
281
    for (size_t i = 0; i < operations.size(); i++) {
2781
151
        auto& operation = operations[i];
2782
2783
151
        auto& module = operation.first;
2784
151
        auto& op = operation.second;
2785
2786
151
        if ( i > 0 ) {
2787
105
            auto& prevModule = operations[i-1].first;
2788
105
            auto& prevOp = operations[i].second;
2789
2790
105
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
47
                auto& curModifier = op.modifier.GetVectorPtr();
2792
47
                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
26
                } else {
2797
409
                    for (auto& c : curModifier) {
2798
409
                        c++;
2799
409
                    }
2800
26
                }
2801
47
            }
2802
105
        }
2803
2804
151
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
151
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
151
        const auto& result = results.back();
2811
2812
151
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
151
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
151
        if ( options.disableTests == false ) {
2830
151
            tests::test(op, result.second);
2831
151
        }
2832
2833
151
        postprocess(module, op, result);
2834
151
    }
2835
2836
130
    if ( options.noCompare == false ) {
2837
46
        compare(operations, results, data, size);
2838
46
    }
2839
130
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
204
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
204
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
204
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.69k
    do {
2725
1.69k
        auto op = getOp(&parentDs, data, size);
2726
1.69k
        auto module = getModule(parentDs);
2727
1.69k
        if ( module == nullptr ) {
2728
1.43k
            continue;
2729
1.43k
        }
2730
2731
266
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
266
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.69k
    } while ( parentDs.Get<bool>() == true );
2738
2739
204
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
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
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
183
        std::set<uint64_t> operationModuleIDs;
2759
183
        for (const auto& op : operations) {
2760
112
            operationModuleIDs.insert(op.first->ID);
2761
112
        }
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
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
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
321
    for (size_t i = 0; i < operations.size(); i++) {
2781
138
        auto& operation = operations[i];
2782
2783
138
        auto& module = operation.first;
2784
138
        auto& op = operation.second;
2785
2786
138
        if ( i > 0 ) {
2787
99
            auto& prevModule = operations[i-1].first;
2788
99
            auto& prevOp = operations[i].second;
2789
2790
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
54
                auto& curModifier = op.modifier.GetVectorPtr();
2792
54
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
28
                } else {
2797
426
                    for (auto& c : curModifier) {
2798
426
                        c++;
2799
426
                    }
2800
26
                }
2801
54
            }
2802
99
        }
2803
2804
138
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
138
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
138
        const auto& result = results.back();
2811
2812
138
        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
138
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
138
        if ( options.disableTests == false ) {
2830
138
            tests::test(op, result.second);
2831
138
        }
2832
2833
138
        postprocess(module, op, result);
2834
138
    }
2835
2836
183
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
183
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_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
1.97k
    do {
2725
1.97k
        auto op = getOp(&parentDs, data, size);
2726
1.97k
        auto module = getModule(parentDs);
2727
1.97k
        if ( module == nullptr ) {
2728
1.76k
            continue;
2729
1.76k
        }
2730
2731
215
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
215
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.96k
    } while ( parentDs.Get<bool>() == true );
2738
2739
160
    if ( operations.empty() == true ) {
2740
18
        return;
2741
18
    }
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
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
142
        std::set<uint64_t> operationModuleIDs;
2759
142
        for (const auto& op : operations) {
2760
98
            operationModuleIDs.insert(op.first->ID);
2761
98
        }
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
23
            operations.push_back({ modules.at(id), operations[0].second});
2769
23
        }
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
263
    for (size_t i = 0; i < operations.size(); i++) {
2781
121
        auto& operation = operations[i];
2782
2783
121
        auto& module = operation.first;
2784
121
        auto& op = operation.second;
2785
2786
121
        if ( i > 0 ) {
2787
87
            auto& prevModule = operations[i-1].first;
2788
87
            auto& prevOp = operations[i].second;
2789
2790
87
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
23
                } else {
2797
603
                    for (auto& c : curModifier) {
2798
603
                        c++;
2799
603
                    }
2800
23
                }
2801
45
            }
2802
87
        }
2803
2804
121
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
121
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
121
        const auto& result = results.back();
2811
2812
121
        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
121
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
121
        if ( options.disableTests == false ) {
2830
121
            tests::test(op, result.second);
2831
121
        }
2832
2833
121
        postprocess(module, op, result);
2834
121
    }
2835
2836
142
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
142
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
123
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
123
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
123
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.73k
    do {
2725
1.73k
        auto op = getOp(&parentDs, data, size);
2726
1.73k
        auto module = getModule(parentDs);
2727
1.73k
        if ( module == nullptr ) {
2728
1.54k
            continue;
2729
1.54k
        }
2730
2731
196
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
196
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.73k
    } while ( parentDs.Get<bool>() == true );
2738
2739
123
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
107
#if 1
2745
107
    {
2746
107
        std::set<uint64_t> moduleIDs;
2747
107
        for (const auto& m : modules ) {
2748
76
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
76
            moduleIDs.insert(moduleID);
2756
76
        }
2757
2758
107
        std::set<uint64_t> operationModuleIDs;
2759
108
        for (const auto& op : operations) {
2760
108
            operationModuleIDs.insert(op.first->ID);
2761
108
        }
2762
2763
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
107
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
107
    }
2771
107
#endif
2772
2773
107
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
107
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
237
    for (size_t i = 0; i < operations.size(); i++) {
2781
130
        auto& operation = operations[i];
2782
2783
130
        auto& module = operation.first;
2784
130
        auto& op = operation.second;
2785
2786
130
        if ( i > 0 ) {
2787
92
            auto& prevModule = operations[i-1].first;
2788
92
            auto& prevOp = operations[i].second;
2789
2790
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
48
                auto& curModifier = op.modifier.GetVectorPtr();
2792
48
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
311
                    for (auto& c : curModifier) {
2798
311
                        c++;
2799
311
                    }
2800
22
                }
2801
48
            }
2802
92
        }
2803
2804
130
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
130
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
130
        const auto& result = results.back();
2811
2812
130
        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
130
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
130
        if ( options.disableTests == false ) {
2830
130
            tests::test(op, result.second);
2831
130
        }
2832
2833
130
        postprocess(module, op, result);
2834
130
    }
2835
2836
107
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
107
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
96
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
96
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
96
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.17k
    do {
2725
2.17k
        auto op = getOp(&parentDs, data, size);
2726
2.17k
        auto module = getModule(parentDs);
2727
2.17k
        if ( module == nullptr ) {
2728
2.00k
            continue;
2729
2.00k
        }
2730
2731
168
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
168
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.16k
    } while ( parentDs.Get<bool>() == true );
2738
2739
96
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
87
#if 1
2745
87
    {
2746
87
        std::set<uint64_t> moduleIDs;
2747
87
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
87
        std::set<uint64_t> operationModuleIDs;
2759
105
        for (const auto& op : operations) {
2760
105
            operationModuleIDs.insert(op.first->ID);
2761
105
        }
2762
2763
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
87
        for (const auto& id : addModuleIDs) {
2768
26
            operations.push_back({ modules.at(id), operations[0].second});
2769
26
        }
2770
87
    }
2771
87
#endif
2772
2773
87
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
87
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
218
    for (size_t i = 0; i < operations.size(); i++) {
2781
131
        auto& operation = operations[i];
2782
2783
131
        auto& module = operation.first;
2784
131
        auto& op = operation.second;
2785
2786
131
        if ( i > 0 ) {
2787
94
            auto& prevModule = operations[i-1].first;
2788
94
            auto& prevOp = operations[i].second;
2789
2790
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
51
                auto& curModifier = op.modifier.GetVectorPtr();
2792
51
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
33
                } else {
2797
3.24k
                    for (auto& c : curModifier) {
2798
3.24k
                        c++;
2799
3.24k
                    }
2800
33
                }
2801
51
            }
2802
94
        }
2803
2804
131
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
131
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
131
        const auto& result = results.back();
2811
2812
131
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
131
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
131
        if ( options.disableTests == false ) {
2830
131
            tests::test(op, result.second);
2831
131
        }
2832
2833
131
        postprocess(module, op, result);
2834
131
    }
2835
2836
87
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
89
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
89
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
89
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.52k
    do {
2725
1.52k
        auto op = getOp(&parentDs, data, size);
2726
1.52k
        auto module = getModule(parentDs);
2727
1.52k
        if ( module == nullptr ) {
2728
1.36k
            continue;
2729
1.36k
        }
2730
2731
162
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
162
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.52k
    } while ( parentDs.Get<bool>() == true );
2738
2739
89
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
82
#if 1
2745
82
    {
2746
82
        std::set<uint64_t> moduleIDs;
2747
82
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
82
        std::set<uint64_t> operationModuleIDs;
2759
97
        for (const auto& op : operations) {
2760
97
            operationModuleIDs.insert(op.first->ID);
2761
97
        }
2762
2763
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
82
        for (const auto& id : addModuleIDs) {
2768
23
            operations.push_back({ modules.at(id), operations[0].second});
2769
23
        }
2770
82
    }
2771
82
#endif
2772
2773
82
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
82
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
202
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
85
            auto& prevModule = operations[i-1].first;
2788
85
            auto& prevOp = operations[i].second;
2789
2790
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
27
                } else {
2797
1.57k
                    for (auto& c : curModifier) {
2798
1.57k
                        c++;
2799
1.57k
                    }
2800
27
                }
2801
44
            }
2802
85
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
82
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
113
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
113
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
113
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.71k
    do {
2725
1.71k
        auto op = getOp(&parentDs, data, size);
2726
1.71k
        auto module = getModule(parentDs);
2727
1.71k
        if ( module == nullptr ) {
2728
1.52k
            continue;
2729
1.52k
        }
2730
2731
191
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
191
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.70k
    } while ( parentDs.Get<bool>() == true );
2738
2739
113
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
98
#if 1
2745
98
    {
2746
98
        std::set<uint64_t> moduleIDs;
2747
98
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
98
        std::set<uint64_t> operationModuleIDs;
2759
100
        for (const auto& op : operations) {
2760
100
            operationModuleIDs.insert(op.first->ID);
2761
100
        }
2762
2763
98
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
98
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
98
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
98
        for (const auto& id : addModuleIDs) {
2768
20
            operations.push_back({ modules.at(id), operations[0].second});
2769
20
        }
2770
98
    }
2771
98
#endif
2772
2773
98
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
98
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
218
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
85
            auto& prevModule = operations[i-1].first;
2788
85
            auto& prevOp = operations[i].second;
2789
2790
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
47
                auto& curModifier = op.modifier.GetVectorPtr();
2792
47
                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
26
                } else {
2797
652
                    for (auto& c : curModifier) {
2798
652
                        c++;
2799
652
                    }
2800
26
                }
2801
47
            }
2802
85
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
98
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
80
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
80
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
80
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.55k
    do {
2725
1.55k
        auto op = getOp(&parentDs, data, size);
2726
1.55k
        auto module = getModule(parentDs);
2727
1.55k
        if ( module == nullptr ) {
2728
1.41k
            continue;
2729
1.41k
        }
2730
2731
138
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
138
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.54k
    } while ( parentDs.Get<bool>() == true );
2738
2739
80
    if ( operations.empty() == true ) {
2740
15
        return;
2741
15
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
65
#if 1
2745
65
    {
2746
65
        std::set<uint64_t> moduleIDs;
2747
65
        for (const auto& m : modules ) {
2748
64
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
64
            moduleIDs.insert(moduleID);
2756
64
        }
2757
2758
65
        std::set<uint64_t> operationModuleIDs;
2759
96
        for (const auto& op : operations) {
2760
96
            operationModuleIDs.insert(op.first->ID);
2761
96
        }
2762
2763
65
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
65
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
65
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
65
        for (const auto& id : addModuleIDs) {
2768
20
            operations.push_back({ modules.at(id), operations[0].second});
2769
20
        }
2770
65
    }
2771
65
#endif
2772
2773
65
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
65
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
181
    for (size_t i = 0; i < operations.size(); i++) {
2781
116
        auto& operation = operations[i];
2782
2783
116
        auto& module = operation.first;
2784
116
        auto& op = operation.second;
2785
2786
116
        if ( i > 0 ) {
2787
84
            auto& prevModule = operations[i-1].first;
2788
84
            auto& prevOp = operations[i].second;
2789
2790
84
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
46
                auto& curModifier = op.modifier.GetVectorPtr();
2792
46
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
24
                } else {
2797
400
                    for (auto& c : curModifier) {
2798
400
                        c++;
2799
400
                    }
2800
24
                }
2801
46
            }
2802
84
        }
2803
2804
116
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
116
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
116
        const auto& result = results.back();
2811
2812
116
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
116
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
116
        if ( options.disableTests == false ) {
2830
116
            tests::test(op, result.second);
2831
116
        }
2832
2833
116
        postprocess(module, op, result);
2834
116
    }
2835
2836
65
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
65
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
98
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
98
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
98
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
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
2.20k
            continue;
2729
2.20k
        }
2730
2731
162
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
162
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
2.35k
    } while ( parentDs.Get<bool>() == true );
2738
2739
98
    if ( operations.empty() == true ) {
2740
11
        return;
2741
11
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
87
#if 1
2745
87
    {
2746
87
        std::set<uint64_t> moduleIDs;
2747
87
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
87
        std::set<uint64_t> operationModuleIDs;
2759
101
        for (const auto& op : operations) {
2760
101
            operationModuleIDs.insert(op.first->ID);
2761
101
        }
2762
2763
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
87
        for (const auto& id : addModuleIDs) {
2768
25
            operations.push_back({ modules.at(id), operations[0].second});
2769
25
        }
2770
87
    }
2771
87
#endif
2772
2773
87
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
87
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
213
    for (size_t i = 0; i < operations.size(); i++) {
2781
126
        auto& operation = operations[i];
2782
2783
126
        auto& module = operation.first;
2784
126
        auto& op = operation.second;
2785
2786
126
        if ( i > 0 ) {
2787
92
            auto& prevModule = operations[i-1].first;
2788
92
            auto& prevOp = operations[i].second;
2789
2790
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
55
                auto& curModifier = op.modifier.GetVectorPtr();
2792
55
                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
28
                } else {
2797
889
                    for (auto& c : curModifier) {
2798
889
                        c++;
2799
889
                    }
2800
28
                }
2801
55
            }
2802
92
        }
2803
2804
126
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
126
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
126
        const auto& result = results.back();
2811
2812
126
        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
126
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
126
        if ( options.disableTests == false ) {
2830
126
            tests::test(op, result.second);
2831
126
        }
2832
2833
126
        postprocess(module, op, result);
2834
126
    }
2835
2836
87
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
102
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
102
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
102
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.25k
    do {
2725
2.25k
        auto op = getOp(&parentDs, data, size);
2726
2.25k
        auto module = getModule(parentDs);
2727
2.25k
        if ( module == nullptr ) {
2728
2.08k
            continue;
2729
2.08k
        }
2730
2731
173
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
173
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.25k
    } while ( parentDs.Get<bool>() == true );
2738
2739
102
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
86
#if 1
2745
86
    {
2746
86
        std::set<uint64_t> moduleIDs;
2747
86
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
86
        std::set<uint64_t> operationModuleIDs;
2759
102
        for (const auto& op : operations) {
2760
102
            operationModuleIDs.insert(op.first->ID);
2761
102
        }
2762
2763
86
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
86
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
86
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
86
        for (const auto& id : addModuleIDs) {
2768
21
            operations.push_back({ modules.at(id), operations[0].second});
2769
21
        }
2770
86
    }
2771
86
#endif
2772
2773
86
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
86
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
209
    for (size_t i = 0; i < operations.size(); i++) {
2781
123
        auto& operation = operations[i];
2782
2783
123
        auto& module = operation.first;
2784
123
        auto& op = operation.second;
2785
2786
123
        if ( i > 0 ) {
2787
88
            auto& prevModule = operations[i-1].first;
2788
88
            auto& prevOp = operations[i].second;
2789
2790
88
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
47
                auto& curModifier = op.modifier.GetVectorPtr();
2792
47
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
28
                } else {
2797
1.00k
                    for (auto& c : curModifier) {
2798
1.00k
                        c++;
2799
1.00k
                    }
2800
19
                }
2801
47
            }
2802
88
        }
2803
2804
123
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
123
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
123
        const auto& result = results.back();
2811
2812
123
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
123
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
123
        if ( options.disableTests == false ) {
2830
123
            tests::test(op, result.second);
2831
123
        }
2832
2833
123
        postprocess(module, op, result);
2834
123
    }
2835
2836
86
    if ( options.noCompare == false ) {
2837
35
        compare(operations, results, data, size);
2838
35
    }
2839
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
83
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
83
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
83
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.16k
    do {
2725
2.16k
        auto op = getOp(&parentDs, data, size);
2726
2.16k
        auto module = getModule(parentDs);
2727
2.16k
        if ( module == nullptr ) {
2728
1.98k
            continue;
2729
1.98k
        }
2730
2731
175
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
175
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
2.15k
    } while ( parentDs.Get<bool>() == true );
2738
2739
83
    if ( operations.empty() == true ) {
2740
8
        return;
2741
8
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
75
#if 1
2745
75
    {
2746
75
        std::set<uint64_t> moduleIDs;
2747
75
        for (const auto& m : modules ) {
2748
64
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
64
            moduleIDs.insert(moduleID);
2756
64
        }
2757
2758
75
        std::set<uint64_t> operationModuleIDs;
2759
93
        for (const auto& op : operations) {
2760
93
            operationModuleIDs.insert(op.first->ID);
2761
93
        }
2762
2763
75
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
75
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
75
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
75
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
75
    }
2771
75
#endif
2772
2773
75
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
75
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
190
    for (size_t i = 0; i < operations.size(); i++) {
2781
115
        auto& operation = operations[i];
2782
2783
115
        auto& module = operation.first;
2784
115
        auto& op = operation.second;
2785
2786
115
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
251
                    for (auto& c : curModifier) {
2798
251
                        c++;
2799
251
                    }
2800
21
                }
2801
43
            }
2802
83
        }
2803
2804
115
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
115
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
115
        const auto& result = results.back();
2811
2812
115
        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
115
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
115
        if ( options.disableTests == false ) {
2830
115
            tests::test(op, result.second);
2831
115
        }
2832
2833
115
        postprocess(module, op, result);
2834
115
    }
2835
2836
75
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
75
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
128
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
128
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
128
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.49k
    do {
2725
1.49k
        auto op = getOp(&parentDs, data, size);
2726
1.49k
        auto module = getModule(parentDs);
2727
1.49k
        if ( module == nullptr ) {
2728
1.30k
            continue;
2729
1.30k
        }
2730
2731
192
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
192
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.48k
    } while ( parentDs.Get<bool>() == true );
2738
2739
128
    if ( operations.empty() == true ) {
2740
21
        return;
2741
21
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
107
#if 1
2745
107
    {
2746
107
        std::set<uint64_t> moduleIDs;
2747
107
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
107
        std::set<uint64_t> operationModuleIDs;
2759
115
        for (const auto& op : operations) {
2760
115
            operationModuleIDs.insert(op.first->ID);
2761
115
        }
2762
2763
107
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
107
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
107
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
107
        for (const auto& id : addModuleIDs) {
2768
27
            operations.push_back({ modules.at(id), operations[0].second});
2769
27
        }
2770
107
    }
2771
107
#endif
2772
2773
107
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
107
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
249
    for (size_t i = 0; i < operations.size(); i++) {
2781
142
        auto& operation = operations[i];
2782
2783
142
        auto& module = operation.first;
2784
142
        auto& op = operation.second;
2785
2786
142
        if ( i > 0 ) {
2787
103
            auto& prevModule = operations[i-1].first;
2788
103
            auto& prevOp = operations[i].second;
2789
2790
103
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
54
                auto& curModifier = op.modifier.GetVectorPtr();
2792
54
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
38
                } else {
2797
848
                    for (auto& c : curModifier) {
2798
848
                        c++;
2799
848
                    }
2800
38
                }
2801
54
            }
2802
103
        }
2803
2804
142
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
142
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
142
        const auto& result = results.back();
2811
2812
142
        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
142
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
142
        if ( options.disableTests == false ) {
2830
142
            tests::test(op, result.second);
2831
142
        }
2832
2833
142
        postprocess(module, op, result);
2834
142
    }
2835
2836
107
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
107
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
95
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
95
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
95
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.75k
    do {
2725
1.75k
        auto op = getOp(&parentDs, data, size);
2726
1.75k
        auto module = getModule(parentDs);
2727
1.75k
        if ( module == nullptr ) {
2728
1.59k
            continue;
2729
1.59k
        }
2730
2731
160
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
160
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
1.74k
    } while ( parentDs.Get<bool>() == true );
2738
2739
95
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
82
#if 1
2745
82
    {
2746
82
        std::set<uint64_t> moduleIDs;
2747
82
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
82
        std::set<uint64_t> operationModuleIDs;
2759
110
        for (const auto& op : operations) {
2760
110
            operationModuleIDs.insert(op.first->ID);
2761
110
        }
2762
2763
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
82
        for (const auto& id : addModuleIDs) {
2768
20
            operations.push_back({ modules.at(id), operations[0].second});
2769
20
        }
2770
82
    }
2771
82
#endif
2772
2773
82
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
82
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
212
    for (size_t i = 0; i < operations.size(); i++) {
2781
130
        auto& operation = operations[i];
2782
2783
130
        auto& module = operation.first;
2784
130
        auto& op = operation.second;
2785
2786
130
        if ( i > 0 ) {
2787
96
            auto& prevModule = operations[i-1].first;
2788
96
            auto& prevOp = operations[i].second;
2789
2790
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                if ( curModifier.size() == 0 ) {
2793
12.8k
                    for (size_t j = 0; j < 512; j++) {
2794
12.8k
                        curModifier.push_back(1);
2795
12.8k
                    }
2796
28
                } else {
2797
3.14k
                    for (auto& c : curModifier) {
2798
3.14k
                        c++;
2799
3.14k
                    }
2800
28
                }
2801
53
            }
2802
96
        }
2803
2804
130
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
130
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
130
        const auto& result = results.back();
2811
2812
130
        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
130
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
130
        if ( options.disableTests == false ) {
2830
130
            tests::test(op, result.second);
2831
130
        }
2832
2833
130
        postprocess(module, op, result);
2834
130
    }
2835
2836
82
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
107
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
107
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
107
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.68k
    do {
2725
1.68k
        auto op = getOp(&parentDs, data, size);
2726
1.68k
        auto module = getModule(parentDs);
2727
1.68k
        if ( module == nullptr ) {
2728
1.52k
            continue;
2729
1.52k
        }
2730
2731
166
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
166
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
1.67k
    } while ( parentDs.Get<bool>() == true );
2738
2739
107
    if ( operations.empty() == true ) {
2740
16
        return;
2741
16
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
91
#if 1
2745
91
    {
2746
91
        std::set<uint64_t> moduleIDs;
2747
91
        for (const auto& m : modules ) {
2748
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
91
        std::set<uint64_t> operationModuleIDs;
2759
105
        for (const auto& op : operations) {
2760
105
            operationModuleIDs.insert(op.first->ID);
2761
105
        }
2762
2763
91
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
91
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
91
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
91
        for (const auto& id : addModuleIDs) {
2768
24
            operations.push_back({ modules.at(id), operations[0].second});
2769
24
        }
2770
91
    }
2771
91
#endif
2772
2773
91
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
91
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
220
    for (size_t i = 0; i < operations.size(); i++) {
2781
129
        auto& operation = operations[i];
2782
2783
129
        auto& module = operation.first;
2784
129
        auto& op = operation.second;
2785
2786
129
        if ( i > 0 ) {
2787
95
            auto& prevModule = operations[i-1].first;
2788
95
            auto& prevOp = operations[i].second;
2789
2790
95
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                if ( curModifier.size() == 0 ) {
2793
17.9k
                    for (size_t j = 0; j < 512; j++) {
2794
17.9k
                        curModifier.push_back(1);
2795
17.9k
                    }
2796
35
                } else {
2797
326
                    for (auto& c : curModifier) {
2798
326
                        c++;
2799
326
                    }
2800
18
                }
2801
53
            }
2802
95
        }
2803
2804
129
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
129
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
129
        const auto& result = results.back();
2811
2812
129
        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
129
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
129
        if ( options.disableTests == false ) {
2830
129
            tests::test(op, result.second);
2831
129
        }
2832
2833
129
        postprocess(module, op, result);
2834
129
    }
2835
2836
91
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
91
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
130
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
130
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
130
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.56k
    do {
2725
1.56k
        auto op = getOp(&parentDs, data, size);
2726
1.56k
        auto module = getModule(parentDs);
2727
1.56k
        if ( module == nullptr ) {
2728
1.37k
            continue;
2729
1.37k
        }
2730
2731
189
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
189
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.55k
    } while ( parentDs.Get<bool>() == true );
2738
2739
130
    if ( operations.empty() == true ) {
2740
22
        return;
2741
22
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
108
#if 1
2745
108
    {
2746
108
        std::set<uint64_t> moduleIDs;
2747
108
        for (const auto& m : modules ) {
2748
88
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
88
            moduleIDs.insert(moduleID);
2756
88
        }
2757
2758
108
        std::set<uint64_t> operationModuleIDs;
2759
113
        for (const auto& op : operations) {
2760
113
            operationModuleIDs.insert(op.first->ID);
2761
113
        }
2762
2763
108
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
108
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
108
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
108
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
108
    }
2771
108
#endif
2772
2773
108
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
108
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
249
    for (size_t i = 0; i < operations.size(); i++) {
2781
141
        auto& operation = operations[i];
2782
2783
141
        auto& module = operation.first;
2784
141
        auto& op = operation.second;
2785
2786
141
        if ( i > 0 ) {
2787
97
            auto& prevModule = operations[i-1].first;
2788
97
            auto& prevOp = operations[i].second;
2789
2790
97
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
47
                auto& curModifier = op.modifier.GetVectorPtr();
2792
47
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
974
                    for (auto& c : curModifier) {
2798
974
                        c++;
2799
974
                    }
2800
21
                }
2801
47
            }
2802
97
        }
2803
2804
141
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
141
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
141
        const auto& result = results.back();
2811
2812
141
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
141
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
141
        if ( options.disableTests == false ) {
2830
141
            tests::test(op, result.second);
2831
141
        }
2832
2833
141
        postprocess(module, op, result);
2834
141
    }
2835
2836
108
    if ( options.noCompare == false ) {
2837
44
        compare(operations, results, data, size);
2838
44
    }
2839
108
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
85
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
85
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
85
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.49k
    do {
2725
1.49k
        auto op = getOp(&parentDs, data, size);
2726
1.49k
        auto module = getModule(parentDs);
2727
1.49k
        if ( module == nullptr ) {
2728
1.34k
            continue;
2729
1.34k
        }
2730
2731
148
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
148
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.49k
    } while ( parentDs.Get<bool>() == true );
2738
2739
85
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
76
#if 1
2745
76
    {
2746
76
        std::set<uint64_t> moduleIDs;
2747
76
        for (const auto& m : modules ) {
2748
74
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
74
            moduleIDs.insert(moduleID);
2756
74
        }
2757
2758
76
        std::set<uint64_t> operationModuleIDs;
2759
105
        for (const auto& op : operations) {
2760
105
            operationModuleIDs.insert(op.first->ID);
2761
105
        }
2762
2763
76
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
76
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
76
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
76
        for (const auto& id : addModuleIDs) {
2768
20
            operations.push_back({ modules.at(id), operations[0].second});
2769
20
        }
2770
76
    }
2771
76
#endif
2772
2773
76
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
76
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
201
    for (size_t i = 0; i < operations.size(); i++) {
2781
125
        auto& operation = operations[i];
2782
2783
125
        auto& module = operation.first;
2784
125
        auto& op = operation.second;
2785
2786
125
        if ( i > 0 ) {
2787
88
            auto& prevModule = operations[i-1].first;
2788
88
            auto& prevOp = operations[i].second;
2789
2790
88
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
870
                    for (auto& c : curModifier) {
2798
870
                        c++;
2799
870
                    }
2800
21
                }
2801
43
            }
2802
88
        }
2803
2804
125
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
125
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
125
        const auto& result = results.back();
2811
2812
125
        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
125
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
125
        if ( options.disableTests == false ) {
2830
125
            tests::test(op, result.second);
2831
125
        }
2832
2833
125
        postprocess(module, op, result);
2834
125
    }
2835
2836
76
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
95
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
95
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
95
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.81k
    do {
2725
1.81k
        auto op = getOp(&parentDs, data, size);
2726
1.81k
        auto module = getModule(parentDs);
2727
1.81k
        if ( module == nullptr ) {
2728
1.65k
            continue;
2729
1.65k
        }
2730
2731
152
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
152
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.80k
    } while ( parentDs.Get<bool>() == true );
2738
2739
95
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
81
#if 1
2745
81
    {
2746
81
        std::set<uint64_t> moduleIDs;
2747
81
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
81
        std::set<uint64_t> operationModuleIDs;
2759
96
        for (const auto& op : operations) {
2760
96
            operationModuleIDs.insert(op.first->ID);
2761
96
        }
2762
2763
81
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
81
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
81
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
81
        for (const auto& id : addModuleIDs) {
2768
25
            operations.push_back({ modules.at(id), operations[0].second});
2769
25
        }
2770
81
    }
2771
81
#endif
2772
2773
81
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
81
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
202
    for (size_t i = 0; i < operations.size(); i++) {
2781
121
        auto& operation = operations[i];
2782
2783
121
        auto& module = operation.first;
2784
121
        auto& op = operation.second;
2785
2786
121
        if ( i > 0 ) {
2787
85
            auto& prevModule = operations[i-1].first;
2788
85
            auto& prevOp = operations[i].second;
2789
2790
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
26
                } else {
2797
275
                    for (auto& c : curModifier) {
2798
275
                        c++;
2799
275
                    }
2800
26
                }
2801
43
            }
2802
85
        }
2803
2804
121
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
121
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
121
        const auto& result = results.back();
2811
2812
121
        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
121
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
121
        if ( options.disableTests == false ) {
2830
121
            tests::test(op, result.second);
2831
121
        }
2832
2833
121
        postprocess(module, op, result);
2834
121
    }
2835
2836
81
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
102
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
102
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
102
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.49k
    do {
2725
1.49k
        auto op = getOp(&parentDs, data, size);
2726
1.49k
        auto module = getModule(parentDs);
2727
1.49k
        if ( module == nullptr ) {
2728
1.34k
            continue;
2729
1.34k
        }
2730
2731
157
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
157
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.49k
    } while ( parentDs.Get<bool>() == true );
2738
2739
102
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
92
#if 1
2745
92
    {
2746
92
        std::set<uint64_t> moduleIDs;
2747
92
        for (const auto& m : modules ) {
2748
52
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
52
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
52
            moduleIDs.insert(moduleID);
2756
52
        }
2757
2758
92
        std::set<uint64_t> operationModuleIDs;
2759
92
        for (const auto& op : operations) {
2760
86
            operationModuleIDs.insert(op.first->ID);
2761
86
        }
2762
2763
92
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
92
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
92
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
92
        for (const auto& id : addModuleIDs) {
2768
16
            operations.push_back({ modules.at(id), operations[0].second});
2769
16
        }
2770
92
    }
2771
92
#endif
2772
2773
92
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
92
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
194
    for (size_t i = 0; i < operations.size(); i++) {
2781
102
        auto& operation = operations[i];
2782
2783
102
        auto& module = operation.first;
2784
102
        auto& op = operation.second;
2785
2786
102
        if ( i > 0 ) {
2787
76
            auto& prevModule = operations[i-1].first;
2788
76
            auto& prevOp = operations[i].second;
2789
2790
76
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
42
                auto& curModifier = op.modifier.GetVectorPtr();
2792
42
                if ( curModifier.size() == 0 ) {
2793
11.7k
                    for (size_t j = 0; j < 512; j++) {
2794
11.7k
                        curModifier.push_back(1);
2795
11.7k
                    }
2796
23
                } else {
2797
590
                    for (auto& c : curModifier) {
2798
590
                        c++;
2799
590
                    }
2800
19
                }
2801
42
            }
2802
76
        }
2803
2804
102
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
102
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
102
        const auto& result = results.back();
2811
2812
102
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
102
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
102
        if ( options.disableTests == false ) {
2830
102
            tests::test(op, result.second);
2831
102
        }
2832
2833
102
        postprocess(module, op, result);
2834
102
    }
2835
2836
92
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
106
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
106
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
106
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.59k
    do {
2725
1.59k
        auto op = getOp(&parentDs, data, size);
2726
1.59k
        auto module = getModule(parentDs);
2727
1.59k
        if ( module == nullptr ) {
2728
1.43k
            continue;
2729
1.43k
        }
2730
2731
159
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
159
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
1.58k
    } while ( parentDs.Get<bool>() == true );
2738
2739
106
    if ( operations.empty() == true ) {
2740
13
        return;
2741
13
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
93
#if 1
2745
93
    {
2746
93
        std::set<uint64_t> moduleIDs;
2747
93
        for (const auto& m : modules ) {
2748
90
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
90
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
90
            moduleIDs.insert(moduleID);
2756
90
        }
2757
2758
93
        std::set<uint64_t> operationModuleIDs;
2759
93
        for (const auto& op : operations) {
2760
93
            operationModuleIDs.insert(op.first->ID);
2761
93
        }
2762
2763
93
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
93
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
93
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
93
        for (const auto& id : addModuleIDs) {
2768
36
            operations.push_back({ modules.at(id), operations[0].second});
2769
36
        }
2770
93
    }
2771
93
#endif
2772
2773
93
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
93
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
222
    for (size_t i = 0; i < operations.size(); i++) {
2781
129
        auto& operation = operations[i];
2782
2783
129
        auto& module = operation.first;
2784
129
        auto& op = operation.second;
2785
2786
129
        if ( i > 0 ) {
2787
84
            auto& prevModule = operations[i-1].first;
2788
84
            auto& prevOp = operations[i].second;
2789
2790
84
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
33
                auto& curModifier = op.modifier.GetVectorPtr();
2792
33
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
18
                } else {
2797
1.33k
                    for (auto& c : curModifier) {
2798
1.33k
                        c++;
2799
1.33k
                    }
2800
15
                }
2801
33
            }
2802
84
        }
2803
2804
129
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
129
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
129
        const auto& result = results.back();
2811
2812
129
        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
129
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
129
        if ( options.disableTests == false ) {
2830
129
            tests::test(op, result.second);
2831
129
        }
2832
2833
129
        postprocess(module, op, result);
2834
129
    }
2835
2836
93
    if ( options.noCompare == false ) {
2837
45
        compare(operations, results, data, size);
2838
45
    }
2839
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
111
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
111
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
111
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.91k
    do {
2725
1.91k
        auto op = getOp(&parentDs, data, size);
2726
1.91k
        auto module = getModule(parentDs);
2727
1.91k
        if ( module == nullptr ) {
2728
1.75k
            continue;
2729
1.75k
        }
2730
2731
157
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
157
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.90k
    } while ( parentDs.Get<bool>() == true );
2738
2739
111
    if ( operations.empty() == true ) {
2740
19
        return;
2741
19
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
92
#if 1
2745
92
    {
2746
92
        std::set<uint64_t> moduleIDs;
2747
92
        for (const auto& m : modules ) {
2748
92
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
92
            moduleIDs.insert(moduleID);
2756
92
        }
2757
2758
92
        std::set<uint64_t> operationModuleIDs;
2759
110
        for (const auto& op : operations) {
2760
110
            operationModuleIDs.insert(op.first->ID);
2761
110
        }
2762
2763
92
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
92
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
92
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
92
        for (const auto& id : addModuleIDs) {
2768
33
            operations.push_back({ modules.at(id), operations[0].second});
2769
33
        }
2770
92
    }
2771
92
#endif
2772
2773
92
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
92
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
235
    for (size_t i = 0; i < operations.size(); i++) {
2781
143
        auto& operation = operations[i];
2782
2783
143
        auto& module = operation.first;
2784
143
        auto& op = operation.second;
2785
2786
143
        if ( i > 0 ) {
2787
97
            auto& prevModule = operations[i-1].first;
2788
97
            auto& prevOp = operations[i].second;
2789
2790
97
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
24
                } else {
2797
576
                    for (auto& c : curModifier) {
2798
576
                        c++;
2799
576
                    }
2800
24
                }
2801
43
            }
2802
97
        }
2803
2804
143
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
143
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
143
        const auto& result = results.back();
2811
2812
143
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
143
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
143
        if ( options.disableTests == false ) {
2830
143
            tests::test(op, result.second);
2831
143
        }
2832
2833
143
        postprocess(module, op, result);
2834
143
    }
2835
2836
92
    if ( options.noCompare == false ) {
2837
46
        compare(operations, results, data, size);
2838
46
    }
2839
92
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
139
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
139
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
139
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.41k
    do {
2725
2.41k
        auto op = getOp(&parentDs, data, size);
2726
2.41k
        auto module = getModule(parentDs);
2727
2.41k
        if ( module == nullptr ) {
2728
2.18k
            continue;
2729
2.18k
        }
2730
2731
235
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
235
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
2.40k
    } while ( parentDs.Get<bool>() == true );
2738
2739
139
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
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
168
        for (const auto& m : modules ) {
2748
168
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
168
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
168
            moduleIDs.insert(moduleID);
2756
168
        }
2757
2758
129
        std::set<uint64_t> operationModuleIDs;
2759
166
        for (const auto& op : operations) {
2760
166
            operationModuleIDs.insert(op.first->ID);
2761
166
        }
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
69
            operations.push_back({ modules.at(id), operations[0].second});
2769
69
        }
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
364
    for (size_t i = 0; i < operations.size(); i++) {
2781
235
        auto& operation = operations[i];
2782
2783
235
        auto& module = operation.first;
2784
235
        auto& op = operation.second;
2785
2786
235
        if ( i > 0 ) {
2787
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
58
                auto& curModifier = op.modifier.GetVectorPtr();
2792
58
                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
30
                } else {
2797
1.22k
                    for (auto& c : curModifier) {
2798
1.22k
                        c++;
2799
1.22k
                    }
2800
28
                }
2801
58
            }
2802
151
        }
2803
2804
235
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
235
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
235
        const auto& result = results.back();
2811
2812
235
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
235
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
235
        if ( options.disableTests == false ) {
2830
235
            tests::test(op, result.second);
2831
235
        }
2832
2833
235
        postprocess(module, op, result);
2834
235
    }
2835
2836
129
    if ( options.noCompare == false ) {
2837
84
        compare(operations, results, data, size);
2838
84
    }
2839
129
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
96
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
96
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
96
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.87k
    do {
2725
1.87k
        auto op = getOp(&parentDs, data, size);
2726
1.87k
        auto module = getModule(parentDs);
2727
1.87k
        if ( module == nullptr ) {
2728
1.70k
            continue;
2729
1.70k
        }
2730
2731
165
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
165
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.86k
    } while ( parentDs.Get<bool>() == true );
2738
2739
96
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
89
#if 1
2745
89
    {
2746
89
        std::set<uint64_t> moduleIDs;
2747
94
        for (const auto& m : modules ) {
2748
94
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
94
            moduleIDs.insert(moduleID);
2756
94
        }
2757
2758
89
        std::set<uint64_t> operationModuleIDs;
2759
110
        for (const auto& op : operations) {
2760
110
            operationModuleIDs.insert(op.first->ID);
2761
110
        }
2762
2763
89
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
89
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
89
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
89
        for (const auto& id : addModuleIDs) {
2768
36
            operations.push_back({ modules.at(id), operations[0].second});
2769
36
        }
2770
89
    }
2771
89
#endif
2772
2773
89
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
89
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
235
    for (size_t i = 0; i < operations.size(); i++) {
2781
146
        auto& operation = operations[i];
2782
2783
146
        auto& module = operation.first;
2784
146
        auto& op = operation.second;
2785
2786
146
        if ( i > 0 ) {
2787
99
            auto& prevModule = operations[i-1].first;
2788
99
            auto& prevOp = operations[i].second;
2789
2790
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
46
                auto& curModifier = op.modifier.GetVectorPtr();
2792
46
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
30
                } else {
2797
287
                    for (auto& c : curModifier) {
2798
287
                        c++;
2799
287
                    }
2800
30
                }
2801
46
            }
2802
99
        }
2803
2804
146
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
146
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
146
        const auto& result = results.back();
2811
2812
146
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
146
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
146
        if ( options.disableTests == false ) {
2830
146
            tests::test(op, result.second);
2831
146
        }
2832
2833
146
        postprocess(module, op, result);
2834
146
    }
2835
2836
89
    if ( options.noCompare == false ) {
2837
47
        compare(operations, results, data, size);
2838
47
    }
2839
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
127
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
127
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
127
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.28k
    do {
2725
2.28k
        auto op = getOp(&parentDs, data, size);
2726
2.28k
        auto module = getModule(parentDs);
2727
2.28k
        if ( module == nullptr ) {
2728
2.05k
            continue;
2729
2.05k
        }
2730
2731
231
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
231
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
2.27k
    } while ( parentDs.Get<bool>() == true );
2738
2739
127
    if ( operations.empty() == true ) {
2740
9
        return;
2741
9
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
118
#if 1
2745
118
    {
2746
118
        std::set<uint64_t> moduleIDs;
2747
146
        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
118
        std::set<uint64_t> operationModuleIDs;
2759
161
        for (const auto& op : operations) {
2760
161
            operationModuleIDs.insert(op.first->ID);
2761
161
        }
2762
2763
118
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
118
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
118
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
118
        for (const auto& id : addModuleIDs) {
2768
63
            operations.push_back({ modules.at(id), operations[0].second});
2769
63
        }
2770
118
    }
2771
118
#endif
2772
2773
118
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
118
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
342
    for (size_t i = 0; i < operations.size(); i++) {
2781
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
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
70
                auto& curModifier = op.modifier.GetVectorPtr();
2792
70
                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
4.51k
                    for (auto& c : curModifier) {
2798
4.51k
                        c++;
2799
4.51k
                    }
2800
26
                }
2801
70
            }
2802
151
        }
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
118
    if ( options.noCompare == false ) {
2837
73
        compare(operations, results, data, size);
2838
73
    }
2839
118
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
69
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
69
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
69
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.59k
    do {
2725
1.59k
        auto op = getOp(&parentDs, data, size);
2726
1.59k
        auto module = getModule(parentDs);
2727
1.59k
        if ( module == nullptr ) {
2728
1.45k
            continue;
2729
1.45k
        }
2730
2731
139
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
139
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.58k
    } while ( parentDs.Get<bool>() == true );
2738
2739
69
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
65
#if 1
2745
65
    {
2746
65
        std::set<uint64_t> moduleIDs;
2747
65
        for (const auto& m : modules ) {
2748
60
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60
            moduleIDs.insert(moduleID);
2756
60
        }
2757
2758
65
        std::set<uint64_t> operationModuleIDs;
2759
84
        for (const auto& op : operations) {
2760
84
            operationModuleIDs.insert(op.first->ID);
2761
84
        }
2762
2763
65
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
65
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
65
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
65
        for (const auto& id : addModuleIDs) {
2768
22
            operations.push_back({ modules.at(id), operations[0].second});
2769
22
        }
2770
65
    }
2771
65
#endif
2772
2773
65
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
65
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
171
    for (size_t i = 0; i < operations.size(); i++) {
2781
106
        auto& operation = operations[i];
2782
2783
106
        auto& module = operation.first;
2784
106
        auto& op = operation.second;
2785
2786
106
        if ( i > 0 ) {
2787
76
            auto& prevModule = operations[i-1].first;
2788
76
            auto& prevOp = operations[i].second;
2789
2790
76
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
37
                auto& curModifier = op.modifier.GetVectorPtr();
2792
37
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
20
                } else {
2797
1.82k
                    for (auto& c : curModifier) {
2798
1.82k
                        c++;
2799
1.82k
                    }
2800
17
                }
2801
37
            }
2802
76
        }
2803
2804
106
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
106
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
106
        const auto& result = results.back();
2811
2812
106
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
106
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
106
        if ( options.disableTests == false ) {
2830
106
            tests::test(op, result.second);
2831
106
        }
2832
2833
106
        postprocess(module, op, result);
2834
106
    }
2835
2836
65
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
65
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
131
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
131
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
131
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.88k
    do {
2725
1.88k
        auto op = getOp(&parentDs, data, size);
2726
1.88k
        auto module = getModule(parentDs);
2727
1.88k
        if ( module == nullptr ) {
2728
1.67k
            continue;
2729
1.67k
        }
2730
2731
216
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
216
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
10
            break;
2736
10
        }
2737
1.87k
    } while ( parentDs.Get<bool>() == true );
2738
2739
131
    if ( operations.empty() == true ) {
2740
14
        return;
2741
14
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
117
#if 1
2745
117
    {
2746
117
        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
117
        std::set<uint64_t> operationModuleIDs;
2759
141
        for (const auto& op : operations) {
2760
141
            operationModuleIDs.insert(op.first->ID);
2761
141
        }
2762
2763
117
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
117
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
117
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
117
        for (const auto& id : addModuleIDs) {
2768
46
            operations.push_back({ modules.at(id), operations[0].second});
2769
46
        }
2770
117
    }
2771
117
#endif
2772
2773
117
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
117
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
304
    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
127
            auto& prevModule = operations[i-1].first;
2788
127
            auto& prevOp = operations[i].second;
2789
2790
127
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
56
                auto& curModifier = op.modifier.GetVectorPtr();
2792
56
                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
30
                } else {
2797
1.59k
                    for (auto& c : curModifier) {
2798
1.59k
                        c++;
2799
1.59k
                    }
2800
26
                }
2801
56
            }
2802
127
        }
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
117
    if ( options.noCompare == false ) {
2837
60
        compare(operations, results, data, size);
2838
60
    }
2839
117
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
99
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
99
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
99
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.57k
    do {
2725
1.57k
        auto op = getOp(&parentDs, data, size);
2726
1.57k
        auto module = getModule(parentDs);
2727
1.57k
        if ( module == nullptr ) {
2728
1.43k
            continue;
2729
1.43k
        }
2730
2731
144
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
144
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
1.56k
    } while ( parentDs.Get<bool>() == true );
2738
2739
99
    if ( operations.empty() == true ) {
2740
7
        return;
2741
7
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
92
#if 1
2745
92
    {
2746
92
        std::set<uint64_t> moduleIDs;
2747
92
        for (const auto& m : modules ) {
2748
84
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
84
            moduleIDs.insert(moduleID);
2756
84
        }
2757
2758
92
        std::set<uint64_t> operationModuleIDs;
2759
101
        for (const auto& op : operations) {
2760
101
            operationModuleIDs.insert(op.first->ID);
2761
101
        }
2762
2763
92
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
92
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
92
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
92
        for (const auto& id : addModuleIDs) {
2768
31
            operations.push_back({ modules.at(id), operations[0].second});
2769
31
        }
2770
92
    }
2771
92
#endif
2772
2773
92
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
92
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
224
    for (size_t i = 0; i < operations.size(); i++) {
2781
132
        auto& operation = operations[i];
2782
2783
132
        auto& module = operation.first;
2784
132
        auto& op = operation.second;
2785
2786
132
        if ( i > 0 ) {
2787
90
            auto& prevModule = operations[i-1].first;
2788
90
            auto& prevOp = operations[i].second;
2789
2790
90
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
41
                auto& curModifier = op.modifier.GetVectorPtr();
2792
41
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
348
                    for (auto& c : curModifier) {
2798
348
                        c++;
2799
348
                    }
2800
19
                }
2801
41
            }
2802
90
        }
2803
2804
132
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
132
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
132
        const auto& result = results.back();
2811
2812
132
        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
132
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
132
        if ( options.disableTests == false ) {
2830
132
            tests::test(op, result.second);
2831
132
        }
2832
2833
132
        postprocess(module, op, result);
2834
132
    }
2835
2836
92
    if ( options.noCompare == false ) {
2837
42
        compare(operations, results, data, size);
2838
42
    }
2839
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
164
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
164
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
164
    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.35k
            continue;
2729
2.35k
        }
2730
2731
251
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
251
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
2.59k
    } while ( parentDs.Get<bool>() == true );
2738
2739
164
    if ( operations.empty() == true ) {
2740
12
        return;
2741
12
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
152
#if 1
2745
152
    {
2746
152
        std::set<uint64_t> moduleIDs;
2747
152
        for (const auto& m : modules ) {
2748
114
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
114
            moduleIDs.insert(moduleID);
2756
114
        }
2757
2758
152
        std::set<uint64_t> operationModuleIDs;
2759
152
        for (const auto& op : operations) {
2760
144
            operationModuleIDs.insert(op.first->ID);
2761
144
        }
2762
2763
152
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
152
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
152
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
152
        for (const auto& id : addModuleIDs) {
2768
42
            operations.push_back({ modules.at(id), operations[0].second});
2769
42
        }
2770
152
    }
2771
152
#endif
2772
2773
152
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
152
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
338
    for (size_t i = 0; i < operations.size(); i++) {
2781
186
        auto& operation = operations[i];
2782
2783
186
        auto& module = operation.first;
2784
186
        auto& op = operation.second;
2785
2786
186
        if ( i > 0 ) {
2787
129
            auto& prevModule = operations[i-1].first;
2788
129
            auto& prevOp = operations[i].second;
2789
2790
129
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
65
                auto& curModifier = op.modifier.GetVectorPtr();
2792
65
                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
36
                } else {
2797
35.4k
                    for (auto& c : curModifier) {
2798
35.4k
                        c++;
2799
35.4k
                    }
2800
36
                }
2801
65
            }
2802
129
        }
2803
2804
186
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
186
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
186
        const auto& result = results.back();
2811
2812
186
        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
186
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
186
        if ( options.disableTests == false ) {
2830
186
            tests::test(op, result.second);
2831
186
        }
2832
2833
186
        postprocess(module, op, result);
2834
186
    }
2835
2836
152
    if ( options.noCompare == false ) {
2837
57
        compare(operations, results, data, size);
2838
57
    }
2839
152
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
80
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
80
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
80
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.37k
    do {
2725
1.37k
        auto op = getOp(&parentDs, data, size);
2726
1.37k
        auto module = getModule(parentDs);
2727
1.37k
        if ( module == nullptr ) {
2728
1.23k
            continue;
2729
1.23k
        }
2730
2731
143
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
143
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
1.36k
    } while ( parentDs.Get<bool>() == true );
2738
2739
80
    if ( operations.empty() == true ) {
2740
4
        return;
2741
4
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
76
#if 1
2745
76
    {
2746
76
        std::set<uint64_t> moduleIDs;
2747
76
        for (const auto& m : modules ) {
2748
52
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
52
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
52
            moduleIDs.insert(moduleID);
2756
52
        }
2757
2758
76
        std::set<uint64_t> operationModuleIDs;
2759
79
        for (const auto& op : operations) {
2760
79
            operationModuleIDs.insert(op.first->ID);
2761
79
        }
2762
2763
76
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
76
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
76
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
76
        for (const auto& id : addModuleIDs) {
2768
17
            operations.push_back({ modules.at(id), operations[0].second});
2769
17
        }
2770
76
    }
2771
76
#endif
2772
2773
76
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
76
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
172
    for (size_t i = 0; i < operations.size(); i++) {
2781
96
        auto& operation = operations[i];
2782
2783
96
        auto& module = operation.first;
2784
96
        auto& op = operation.second;
2785
2786
96
        if ( i > 0 ) {
2787
70
            auto& prevModule = operations[i-1].first;
2788
70
            auto& prevOp = operations[i].second;
2789
2790
70
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
38
                auto& curModifier = op.modifier.GetVectorPtr();
2792
38
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
21
                } else {
2797
406
                    for (auto& c : curModifier) {
2798
406
                        c++;
2799
406
                    }
2800
21
                }
2801
38
            }
2802
70
        }
2803
2804
96
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
96
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
96
        const auto& result = results.back();
2811
2812
96
        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
96
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
96
        if ( options.disableTests == false ) {
2830
96
            tests::test(op, result.second);
2831
96
        }
2832
2833
96
        postprocess(module, op, result);
2834
96
    }
2835
2836
76
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
76
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
96
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
96
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
96
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.67k
    do {
2725
1.67k
        auto op = getOp(&parentDs, data, size);
2726
1.67k
        auto module = getModule(parentDs);
2727
1.67k
        if ( module == nullptr ) {
2728
1.50k
            continue;
2729
1.50k
        }
2730
2731
164
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
164
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
1.66k
    } while ( parentDs.Get<bool>() == true );
2738
2739
96
    if ( operations.empty() == true ) {
2740
10
        return;
2741
10
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
86
#if 1
2745
86
    {
2746
86
        std::set<uint64_t> moduleIDs;
2747
86
        for (const auto& m : modules ) {
2748
80
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
80
            moduleIDs.insert(moduleID);
2756
80
        }
2757
2758
86
        std::set<uint64_t> operationModuleIDs;
2759
103
        for (const auto& op : operations) {
2760
103
            operationModuleIDs.insert(op.first->ID);
2761
103
        }
2762
2763
86
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
86
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
86
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
86
        for (const auto& id : addModuleIDs) {
2768
28
            operations.push_back({ modules.at(id), operations[0].second});
2769
28
        }
2770
86
    }
2771
86
#endif
2772
2773
86
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
86
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
217
    for (size_t i = 0; i < operations.size(); i++) {
2781
131
        auto& operation = operations[i];
2782
2783
131
        auto& module = operation.first;
2784
131
        auto& op = operation.second;
2785
2786
131
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44
                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
27
                } else {
2797
1.31k
                    for (auto& c : curModifier) {
2798
1.31k
                        c++;
2799
1.31k
                    }
2800
17
                }
2801
44
            }
2802
91
        }
2803
2804
131
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
131
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
131
        const auto& result = results.back();
2811
2812
131
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
131
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
131
        if ( options.disableTests == false ) {
2830
131
            tests::test(op, result.second);
2831
131
        }
2832
2833
131
        postprocess(module, op, result);
2834
131
    }
2835
2836
86
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
86
}
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 */