Coverage Report

Created: 2022-08-24 06:37

/src/cryptofuzz-sp-math-all/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
269k
#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
778
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
778
    (void)module;
53
778
    (void)op;
54
55
778
    if ( result.second != std::nullopt ) {
56
542
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
542
    }
58
778
}
59
60
778
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
778
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
778
    return module->OpDigest(op);
64
778
}
65
66
/* Specialization for operation::HMAC */
67
643
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
643
    (void)module;
69
643
    (void)op;
70
71
643
    if ( result.second != std::nullopt ) {
72
355
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
355
    }
74
643
}
75
76
643
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
643
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
643
    return module->OpHMAC(op);
80
643
}
81
82
/* Specialization for operation::UMAC */
83
64
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
64
    (void)module;
85
64
    (void)op;
86
87
64
    if ( result.second != std::nullopt ) {
88
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
0
    }
90
64
}
91
92
64
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
64
    return module->OpUMAC(op);
94
64
}
95
96
/* Specialization for operation::CMAC */
97
97
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
97
    (void)module;
99
97
    (void)op;
100
101
97
    if ( result.second != std::nullopt ) {
102
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
0
    }
104
97
}
105
106
97
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
97
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
97
    return module->OpCMAC(op);
110
97
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
791
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
791
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
791
    if ( result.second != std::nullopt ) {
119
287
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
287
        if ( result.second->tag != std::nullopt ) {
121
14
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
14
        }
123
287
    }
124
125
791
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
287
        using fuzzing::datasource::ID;
127
128
287
        bool tryDecrypt = true;
129
130
287
        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
287
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
287
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
287
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
287
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
287
                    op.cleartext.GetSize() + 32,
171
172
287
                    op.aad,
173
174
                    /* Empty modifier */
175
287
                    {});
176
177
287
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
287
            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
287
            } 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
287
        }
208
287
    }
209
791
}
210
211
791
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
791
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
791
    return module->OpSymmetricEncrypt(op);
215
791
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
847
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
847
    (void)module;
220
847
    (void)op;
221
222
847
    if ( result.second != std::nullopt ) {
223
156
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
156
    }
225
847
}
226
227
847
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
847
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
847
    return module->OpSymmetricDecrypt(op);
231
847
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
154
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
154
    (void)module;
236
154
    (void)op;
237
238
154
    if ( result.second != std::nullopt ) {
239
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
0
    }
241
154
}
242
243
154
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
154
    return module->OpKDF_SCRYPT(op);
245
154
}
246
247
/* Specialization for operation::KDF_HKDF */
248
190
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
190
    (void)module;
250
190
    (void)op;
251
252
190
    if ( result.second != std::nullopt ) {
253
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
0
    }
255
190
}
256
257
190
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
190
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
190
    return module->OpKDF_HKDF(op);
261
190
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
161
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
161
    (void)module;
266
161
    (void)op;
267
268
161
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
161
}
272
273
161
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
161
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
161
    return module->OpKDF_PBKDF(op);
277
161
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
220
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
220
    (void)module;
282
220
    (void)op;
283
284
220
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
220
}
288
289
220
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
220
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
220
    return module->OpKDF_PBKDF1(op);
293
220
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
95
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
95
    (void)module;
298
95
    (void)op;
299
300
95
    if ( result.second != std::nullopt ) {
301
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
0
    }
303
95
}
304
305
95
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
95
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
95
    return module->OpKDF_PBKDF2(op);
309
95
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
40
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
40
    (void)module;
314
40
    (void)op;
315
316
40
    if ( result.second != std::nullopt ) {
317
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
0
    }
319
40
}
320
321
40
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
40
    return module->OpKDF_ARGON2(op);
323
40
}
324
325
/* Specialization for operation::KDF_SSH */
326
112
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
112
    (void)module;
328
112
    (void)op;
329
330
112
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
112
}
334
335
112
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
112
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
112
    return module->OpKDF_SSH(op);
339
112
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
175
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
175
    (void)module;
344
175
    (void)op;
345
346
175
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
175
}
350
351
175
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
175
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
175
    return module->OpKDF_TLS1_PRF(op);
355
175
}
356
357
/* Specialization for operation::KDF_X963 */
358
209
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
209
    (void)module;
360
209
    (void)op;
361
362
209
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
209
}
366
367
209
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
209
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
209
    return module->OpKDF_X963(op);
371
209
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
7
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
7
    (void)module;
376
7
    (void)op;
377
378
7
    if ( result.second != std::nullopt ) {
379
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
0
    }
381
7
}
382
383
7
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
7
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
7
    return module->OpKDF_BCRYPT(op);
387
7
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
169
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
169
    (void)module;
392
169
    (void)op;
393
394
169
    if ( result.second != std::nullopt ) {
395
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
0
    }
397
169
}
398
399
169
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
169
    if ( op.mech.mode == true ) {
401
81
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
81
    }
403
404
169
    return module->OpKDF_SP_800_108(op);
405
169
}
406
407
408
/* Specialization for operation::ECC_PrivateToPublic */
409
12.9k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
410
12.9k
    (void)module;
411
412
12.9k
    if ( result.second != std::nullopt  ) {
413
5.77k
        const auto curveID = op.curveType.Get();
414
5.77k
        const auto privkey = op.priv.ToTrimmedString();
415
5.77k
        const auto pub_x = result.second->first.ToTrimmedString();
416
5.77k
        const auto pub_y = result.second->second.ToTrimmedString();
417
418
5.77k
        Pool_CurvePrivkey.Set({ curveID, privkey });
419
5.77k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
420
5.77k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
421
422
5.77k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
423
5.77k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
424
5.77k
    }
425
12.9k
}
426
427
12.9k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
428
12.9k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
429
430
12.9k
    const size_t size = op.priv.ToTrimmedString().size();
431
432
12.9k
    if ( size == 0 || size > 4096 ) {
433
117
        return std::nullopt;
434
117
    }
435
436
12.7k
    return module->OpECC_PrivateToPublic(op);
437
12.9k
}
438
439
/* Specialization for operation::ECC_ValidatePubkey */
440
12.9k
template<> void ExecutorBase<bool, operation::ECC_ValidatePubkey>::postprocess(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op, const ExecutorBase<bool, operation::ECC_ValidatePubkey>::ResultPair& result) const {
441
12.9k
    (void)module;
442
12.9k
    (void)op;
443
12.9k
    (void)result;
444
12.9k
}
445
446
12.9k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
447
12.9k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
448
449
12.9k
    return module->OpECC_ValidatePubkey(op);
450
12.9k
}
451
452
/* Specialization for operation::ECC_GenerateKeyPair */
453
454
/* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */
455
template <>
456
5.01k
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
457
5.01k
    (void)operations;
458
5.01k
    (void)results;
459
5.01k
    (void)data;
460
5.01k
    (void)size;
461
5.01k
}
462
463
14.8k
template<> void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op, const ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::ResultPair& result) const {
464
14.8k
    (void)module;
465
466
14.8k
    if ( result.second != std::nullopt  ) {
467
6.24k
        const auto curveID = op.curveType.Get();
468
6.24k
        const auto privkey = result.second->priv.ToTrimmedString();
469
6.24k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
470
6.24k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
471
472
6.24k
        Pool_CurvePrivkey.Set({ curveID, privkey });
473
6.24k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
474
6.24k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
475
6.24k
    }
476
14.8k
}
477
478
14.8k
template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const {
479
14.8k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
480
481
14.8k
    return module->OpECC_GenerateKeyPair(op);
482
14.8k
}
483
484
/* Specialization for operation::ECDSA_Sign */
485
17.0k
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 {
486
17.0k
    (void)module;
487
488
17.0k
    if ( result.second != std::nullopt  ) {
489
8.16k
        const auto curveID = op.curveType.Get();
490
8.16k
        const auto cleartext = op.cleartext.ToHex();
491
8.16k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
492
8.16k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
493
8.16k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
494
8.16k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
495
496
8.16k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
497
8.16k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
498
8.16k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
499
500
8.16k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
501
8.16k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
502
8.16k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
503
8.16k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
504
505
8.16k
        {
506
8.16k
            auto opVerify = operation::ECDSA_Verify(
507
8.16k
                    op,
508
8.16k
                    *(result.second),
509
8.16k
                    op.modifier);
510
511
8.16k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
512
8.16k
            CF_ASSERT(
513
8.16k
                    verifyResult == std::nullopt ||
514
8.16k
                    *verifyResult == true,
515
8.16k
                    "Cannot verify generated signature");
516
8.16k
        }
517
8.16k
    }
518
17.0k
}
519
520
17.0k
template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const {
521
17.0k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
522
17.0k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
523
524
16.3k
    const size_t size = op.priv.ToTrimmedString().size();
525
526
16.3k
    if ( size == 0 || size > 4096 ) {
527
4
        return std::nullopt;
528
4
    }
529
530
16.3k
    return module->OpECDSA_Sign(op);
531
16.3k
}
532
533
/* Specialization for operation::ECGDSA_Sign */
534
41
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 {
535
41
    (void)module;
536
537
41
    if ( result.second != std::nullopt  ) {
538
0
        const auto curveID = op.curveType.Get();
539
0
        const auto cleartext = op.cleartext.ToHex();
540
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
541
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
542
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
543
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
544
545
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
546
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
547
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
548
549
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
550
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
551
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
552
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
553
0
    }
554
41
}
555
556
41
template<> std::optional<component::ECGDSA_Signature> ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op) const {
557
41
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
558
41
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
559
560
41
    const size_t size = op.priv.ToTrimmedString().size();
561
562
41
    if ( size == 0 || size > 4096 ) {
563
1
        return std::nullopt;
564
1
    }
565
566
40
    return module->OpECGDSA_Sign(op);
567
41
}
568
569
/* Specialization for operation::ECRDSA_Sign */
570
59
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 {
571
59
    (void)module;
572
573
59
    if ( result.second != std::nullopt  ) {
574
0
        const auto curveID = op.curveType.Get();
575
0
        const auto cleartext = op.cleartext.ToHex();
576
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
577
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
578
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
579
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
580
581
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
582
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
583
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
584
585
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
586
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
587
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
588
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
589
0
    }
590
59
}
591
592
59
template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const {
593
59
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
594
59
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
595
596
59
    const size_t size = op.priv.ToTrimmedString().size();
597
598
59
    if ( size == 0 || size > 4096 ) {
599
0
        return std::nullopt;
600
0
    }
601
602
59
    return module->OpECRDSA_Sign(op);
603
59
}
604
605
/* Specialization for operation::Schnorr_Sign */
606
48
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 {
607
48
    (void)module;
608
609
48
    if ( result.second != std::nullopt  ) {
610
0
        const auto curveID = op.curveType.Get();
611
0
        const auto cleartext = op.cleartext.ToHex();
612
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
613
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
614
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
615
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
616
617
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
618
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
619
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
620
621
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
622
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
623
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
624
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
625
0
    }
626
48
}
627
628
48
template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const {
629
48
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
630
48
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
631
632
48
    const size_t size = op.priv.ToTrimmedString().size();
633
634
48
    if ( size == 0 || size > 4096 ) {
635
0
        return std::nullopt;
636
0
    }
637
638
48
    return module->OpSchnorr_Sign(op);
639
48
}
640
641
/* Specialization for operation::ECDSA_Verify */
642
10.6k
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 {
643
10.6k
    (void)module;
644
10.6k
    (void)op;
645
10.6k
    (void)result;
646
10.6k
}
647
648
10.6k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
649
10.6k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
650
10.6k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
651
652
    /* Intentionally do not constrain the size of the public key or
653
     * signature (like we do for BignumCalc).
654
     *
655
     * If any large public key or signature causes a time-out (or
656
     * worse), this is something that needs attention;
657
     * because verifiers sometimes process untrusted public keys,
658
     * signatures or both, they should be resistant to bugs
659
     * arising from large inputs.
660
     */
661
662
10.1k
    return module->OpECDSA_Verify(op);
663
10.6k
}
664
665
/* Specialization for operation::ECGDSA_Verify */
666
44
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 {
667
44
    (void)module;
668
44
    (void)op;
669
44
    (void)result;
670
44
}
671
672
44
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
673
44
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
674
44
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
675
676
    /* Intentionally do not constrain the size of the public key or
677
     * signature (like we do for BignumCalc).
678
     *
679
     * If any large public key or signature causes a time-out (or
680
     * worse), this is something that needs attention;
681
     * because verifiers sometimes process untrusted public keys,
682
     * signatures or both, they should be resistant to bugs
683
     * arising from large inputs.
684
     */
685
686
44
    return module->OpECGDSA_Verify(op);
687
44
}
688
689
/* Specialization for operation::ECRDSA_Verify */
690
37
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 {
691
37
    (void)module;
692
37
    (void)op;
693
37
    (void)result;
694
37
}
695
696
37
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
697
37
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
698
37
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
699
700
    /* Intentionally do not constrain the size of the public key or
701
     * signature (like we do for BignumCalc).
702
     *
703
     * If any large public key or signature causes a time-out (or
704
     * worse), this is something that needs attention;
705
     * because verifiers sometimes process untrusted public keys,
706
     * signatures or both, they should be resistant to bugs
707
     * arising from large inputs.
708
     */
709
710
37
    return module->OpECRDSA_Verify(op);
711
37
}
712
713
/* Specialization for operation::Schnorr_Verify */
714
31
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 {
715
31
    (void)module;
716
31
    (void)op;
717
31
    (void)result;
718
31
}
719
720
31
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
721
31
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
722
31
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
723
724
    /* Intentionally do not constrain the size of the public key or
725
     * signature (like we do for BignumCalc).
726
     *
727
     * If any large public key or signature causes a time-out (or
728
     * worse), this is something that needs attention;
729
     * because verifiers sometimes process untrusted public keys,
730
     * signatures or both, they should be resistant to bugs
731
     * arising from large inputs.
732
     */
733
734
31
    return module->OpSchnorr_Verify(op);
735
31
}
736
737
47
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 {
738
47
    (void)module;
739
47
    (void)op;
740
47
    (void)result;
741
47
}
742
743
47
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
744
47
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
47
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
47
    return module->OpECDSA_Recover(op);
748
47
}
749
750
/* Specialization for operation::ECDH_Derive */
751
1.67k
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 {
752
1.67k
    (void)module;
753
1.67k
    (void)op;
754
1.67k
    (void)result;
755
1.67k
}
756
757
1.67k
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
758
1.67k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
760
1.67k
    return module->OpECDH_Derive(op);
761
1.67k
}
762
763
/* Specialization for operation::ECIES_Encrypt */
764
2.86k
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 {
765
2.86k
    (void)module;
766
2.86k
    (void)op;
767
2.86k
    (void)result;
768
2.86k
}
769
770
2.86k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
771
2.86k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
772
773
2.86k
    return module->OpECIES_Encrypt(op);
774
2.86k
}
775
776
/* Specialization for operation::ECIES_Decrypt */
777
2.28k
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 {
778
2.28k
    (void)module;
779
2.28k
    (void)op;
780
2.28k
    (void)result;
781
2.28k
}
782
783
2.28k
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
784
2.28k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
785
786
2.28k
    return module->OpECIES_Decrypt(op);
787
2.28k
}
788
789
/* Specialization for operation::ECC_Point_Add */
790
5.03k
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 {
791
5.03k
    (void)module;
792
793
5.03k
    if ( result.second != std::nullopt  ) {
794
273
        const auto curveID = op.curveType.Get();
795
273
        const auto x = result.second->first.ToTrimmedString();
796
273
        const auto y = result.second->second.ToTrimmedString();
797
798
273
        Pool_CurveECC_Point.Set({ curveID, x, y });
799
800
273
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
801
273
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
802
273
    }
803
5.03k
}
804
805
5.03k
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 {
806
5.03k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
808
5.03k
    return module->OpECC_Point_Add(op);
809
5.03k
}
810
811
/* Specialization for operation::ECC_Point_Mul */
812
8.45k
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 {
813
8.45k
    (void)module;
814
815
8.45k
    if ( result.second != std::nullopt  ) {
816
1.10k
        const auto curveID = op.curveType.Get();
817
1.10k
        const auto x = result.second->first.ToTrimmedString();
818
1.10k
        const auto y = result.second->second.ToTrimmedString();
819
820
1.10k
        Pool_CurveECC_Point.Set({ curveID, x, y });
821
822
1.10k
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
823
1.10k
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
824
1.10k
    }
825
8.45k
}
826
827
8.45k
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 {
828
8.45k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
829
830
8.45k
    return module->OpECC_Point_Mul(op);
831
8.45k
}
832
833
/* Specialization for operation::ECC_Point_Neg */
834
31
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 {
835
31
    (void)module;
836
837
31
    if ( result.second != std::nullopt  ) {
838
0
        const auto curveID = op.curveType.Get();
839
0
        const auto x = result.second->first.ToTrimmedString();
840
0
        const auto y = result.second->second.ToTrimmedString();
841
842
0
        Pool_CurveECC_Point.Set({ curveID, x, y });
843
844
0
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
845
0
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
846
0
    }
847
31
}
848
849
31
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 {
850
31
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
851
852
31
    return module->OpECC_Point_Neg(op);
853
31
}
854
855
/* Specialization for operation::ECC_Point_Dbl */
856
49
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 {
857
49
    (void)module;
858
859
49
    if ( result.second != std::nullopt  ) {
860
0
        const auto curveID = op.curveType.Get();
861
0
        const auto x = result.second->first.ToTrimmedString();
862
0
        const auto y = result.second->second.ToTrimmedString();
863
864
0
        Pool_CurveECC_Point.Set({ curveID, x, y });
865
866
0
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
867
0
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
868
0
    }
869
49
}
870
871
49
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 {
872
49
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
873
874
49
    return module->OpECC_Point_Dbl(op);
875
49
}
876
877
/* Specialization for operation::DH_Derive */
878
5.33k
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 {
879
5.33k
    (void)module;
880
5.33k
    (void)op;
881
5.33k
    (void)result;
882
5.33k
}
883
884
5.33k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
885
5.33k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
886
5.28k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
887
5.22k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
888
5.17k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
889
890
5.11k
    return module->OpDH_Derive(op);
891
5.17k
}
892
893
/* Specialization for operation::DH_GenerateKeyPair */
894
11.4k
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 {
895
11.4k
    (void)result;
896
11.4k
    (void)op;
897
11.4k
    (void)module;
898
899
11.4k
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
900
809
        const auto priv = result.second->first.ToTrimmedString();
901
809
        const auto pub = result.second->second.ToTrimmedString();
902
903
809
        Pool_DH_PrivateKey.Set(priv);
904
809
        Pool_DH_PublicKey.Set(pub);
905
809
    }
906
11.4k
}
907
908
11.4k
template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const {
909
11.4k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
910
11.4k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
911
912
11.3k
    return module->OpDH_GenerateKeyPair(op);
913
11.4k
}
914
915
/* Specialization for operation::BignumCalc */
916
147k
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 {
917
147k
    (void)module;
918
147k
    (void)op;
919
920
147k
    if ( result.second != std::nullopt  ) {
921
53.3k
        const auto bignum = result.second->ToTrimmedString();
922
923
53.3k
        if ( bignum.size() <= config::kMaxBignumSize ) {
924
53.1k
            Pool_Bignum.Set(bignum);
925
53.1k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
926
1.55k
                Pool_Bignum_Primes.Set(bignum);
927
1.55k
            }
928
53.1k
        }
929
53.3k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
930
966
            if ( bignum == "1" ) {
931
358
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
932
358
            }
933
966
        }
934
53.3k
    }
935
147k
}
936
937
147k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
938
147k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
939
940
    /* Prevent timeouts */
941
147k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
942
147k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
943
147k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
944
147k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
945
946
147k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
947
85
        return std::nullopt;
948
85
    }
949
950
146k
    switch ( op.calcOp.Get() ) {
951
712
        case    CF_CALCOP("SetBit(A,B)"):
952
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
953
712
            if ( op.bn1.GetSize() > 4 ) {
954
49
                return std::nullopt;
955
49
            }
956
663
            break;
957
663
        case    CF_CALCOP("Exp(A,B)"):
958
211
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
959
140
                return std::nullopt;
960
140
            }
961
71
            break;
962
98
        case    CF_CALCOP("ModLShift(A,B,C)"):
963
98
            if ( op.bn1.GetSize() > 4 ) {
964
52
                return std::nullopt;
965
52
            }
966
46
            break;
967
951
        case    CF_CALCOP("Exp2(A)"):
968
951
            if ( op.bn0.GetSize() > 4 ) {
969
118
                return std::nullopt;
970
118
            }
971
833
            break;
972
146k
    }
973
974
146k
    return module->OpBignumCalc(op);
975
146k
}
976
977
/* Specialization for operation::BignumCalc_Fp2 */
978
90
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 {
979
90
    (void)module;
980
90
    (void)op;
981
982
90
    if ( result.second != std::nullopt  ) {
983
0
        const auto bignum_first = result.second->first.ToTrimmedString();
984
0
        const auto bignum_second = result.second->second.ToTrimmedString();
985
986
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
987
0
            Pool_Bignum.Set(bignum_first);
988
0
        }
989
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
990
0
            Pool_Bignum.Set(bignum_second);
991
0
        }
992
0
    }
993
90
}
994
995
90
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
996
90
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
997
998
    /* Prevent timeouts */
999
90
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1000
90
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1001
84
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1002
78
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1003
73
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1004
72
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1005
65
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1006
65
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1007
1008
65
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1009
0
        return std::nullopt;
1010
0
    }
1011
1012
65
    return module->OpBignumCalc_Fp2(op);
1013
65
}
1014
1015
/* Specialization for operation::BignumCalc_Fp12 */
1016
303
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 {
1017
303
    (void)module;
1018
303
    (void)op;
1019
1020
303
    if ( result.second != std::nullopt  ) {
1021
0
        Pool_Fp12.Set({
1022
0
                result.second->bn1.ToTrimmedString(),
1023
0
                result.second->bn2.ToTrimmedString(),
1024
0
                result.second->bn3.ToTrimmedString(),
1025
0
                result.second->bn4.ToTrimmedString(),
1026
0
                result.second->bn5.ToTrimmedString(),
1027
0
                result.second->bn6.ToTrimmedString(),
1028
0
                result.second->bn7.ToTrimmedString(),
1029
0
                result.second->bn8.ToTrimmedString(),
1030
0
                result.second->bn9.ToTrimmedString(),
1031
0
                result.second->bn10.ToTrimmedString(),
1032
0
                result.second->bn11.ToTrimmedString(),
1033
0
                result.second->bn12.ToTrimmedString()
1034
0
        });
1035
        /* TODO */
1036
#if 0
1037
        const auto bignum_first = result.second->first.ToTrimmedString();
1038
        const auto bignum_second = result.second->second.ToTrimmedString();
1039
1040
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1041
            Pool_Bignum.Set(bignum_first);
1042
        }
1043
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1044
            Pool_Bignum.Set(bignum_second);
1045
        }
1046
#endif
1047
0
    }
1048
303
}
1049
1050
303
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1051
303
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1052
1053
    /* Prevent timeouts */
1054
303
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1055
302
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1056
302
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1057
302
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1058
302
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1059
294
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1060
292
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1061
285
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1062
285
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1063
285
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1064
284
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1065
284
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1066
1067
273
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1068
273
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1069
272
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1070
266
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1071
262
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1072
260
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1073
260
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1074
258
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1075
248
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1076
248
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1077
248
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1078
245
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1079
1080
239
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1081
234
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1082
228
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1083
228
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1084
220
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1085
216
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1086
216
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1087
215
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1088
215
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1089
210
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1090
203
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1091
197
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1092
1093
192
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1094
182
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1095
182
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1096
170
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1097
164
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1098
161
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1099
155
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1100
152
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1101
151
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1102
141
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1103
131
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1104
130
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1105
1106
128
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1107
0
        return std::nullopt;
1108
0
    }
1109
1110
128
    return module->OpBignumCalc_Fp12(op);
1111
128
}
1112
1113
/* Specialization for operation::BLS_PrivateToPublic */
1114
76
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 {
1115
76
    (void)module;
1116
1117
76
    if ( result.second != std::nullopt  ) {
1118
0
        const auto curveID = op.curveType.Get();
1119
0
        const auto g1_x = result.second->first.ToTrimmedString();
1120
0
        const auto g1_y = result.second->second.ToTrimmedString();
1121
1122
0
        G1AddToPool(curveID, g1_x, g1_y);
1123
1124
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1125
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1126
0
    }
1127
76
}
1128
1129
76
template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const {
1130
76
    const size_t size = op.priv.ToTrimmedString().size();
1131
1132
76
    if ( size == 0 || size > 4096 ) {
1133
1
        return std::nullopt;
1134
1
    }
1135
1136
75
    return module->OpBLS_PrivateToPublic(op);
1137
76
}
1138
1139
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1140
54
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 {
1141
54
    (void)module;
1142
54
    if ( result.second != std::nullopt  ) {
1143
0
        const auto curveID = op.curveType.Get();
1144
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1145
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1146
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1147
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1148
1149
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1150
1151
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1152
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1153
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1154
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1155
0
    }
1156
54
}
1157
1158
54
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const {
1159
54
    const size_t size = op.priv.ToTrimmedString().size();
1160
1161
54
    if ( size == 0 || size > 4096 ) {
1162
0
        return std::nullopt;
1163
0
    }
1164
1165
54
    return module->OpBLS_PrivateToPublic_G2(op);
1166
54
}
1167
1168
/* Specialization for operation::BLS_Sign */
1169
61
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 {
1170
61
    (void)module;
1171
1172
61
    if ( result.second != std::nullopt  ) {
1173
0
        const auto curveID = op.curveType.Get();
1174
0
        const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : "";
1175
0
        const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : "";
1176
0
        const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : "";
1177
0
        const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : "";
1178
0
        const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : "";
1179
0
        const auto dest = op.dest.ToHex();
1180
0
        const auto aug = op.aug.ToHex();
1181
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
1182
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
1183
0
        const auto sig_v = result.second->signature.first.first.ToTrimmedString();
1184
0
        const auto sig_w = result.second->signature.first.second.ToTrimmedString();
1185
0
        const auto sig_x = result.second->signature.second.first.ToTrimmedString();
1186
0
        const auto sig_y = result.second->signature.second.second.ToTrimmedString();
1187
1188
0
        G1AddToPool(curveID, pub_x, pub_y);
1189
0
        G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y);
1190
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});
1191
1192
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
1193
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
1194
0
        if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); }
1195
0
        if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); }
1196
0
        if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); }
1197
0
        if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); }
1198
0
    }
1199
61
}
1200
1201
61
template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const {
1202
61
    const size_t size = op.priv.ToTrimmedString().size();
1203
1204
61
    if ( size == 0 || size > 4096 ) {
1205
0
        return std::nullopt;
1206
0
    }
1207
1208
61
    return module->OpBLS_Sign(op);
1209
61
}
1210
1211
/* Specialization for operation::BLS_Verify */
1212
40
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 {
1213
40
    (void)module;
1214
40
    (void)op;
1215
40
    (void)result;
1216
40
}
1217
1218
40
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const {
1219
#if 0
1220
    const std::vector<size_t> sizes = {
1221
        op.pub.first.ToTrimmedString().size(),
1222
        op.pub.second.ToTrimmedString().size(),
1223
        op.signature.first.ToTrimmedString().size(),
1224
        op.signature.second.ToTrimmedString().size(),
1225
    };
1226
1227
    for (const auto& size : sizes) {
1228
        if ( size == 0 || size > 4096 ) {
1229
            return std::nullopt;
1230
        }
1231
    }
1232
#endif
1233
1234
40
    return module->OpBLS_Verify(op);
1235
40
}
1236
1237
/* Specialization for operation::BLS_BatchSign */
1238
48
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 {
1239
48
    (void)module;
1240
48
    (void)op;
1241
1242
48
    if ( result.second != std::nullopt  ) {
1243
0
        std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub;
1244
0
        for (const auto& mp : result.second->msgpub) {
1245
0
            msgpub.push_back(
1246
0
                    std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{
1247
0
                        {
1248
0
                            mp.first.first.ToTrimmedString(),
1249
0
                            mp.first.second.ToTrimmedString()
1250
0
                        },
1251
0
                        {
1252
0
                            mp.second.first.first.ToTrimmedString(),
1253
0
                            mp.second.first.second.ToTrimmedString(),
1254
0
                            mp.second.second.first.ToTrimmedString(),
1255
0
                            mp.second.second.second.ToTrimmedString()
1256
0
                        }
1257
0
                    }
1258
0
            );
1259
0
            G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString());
1260
0
            Pool_CurveBLSG2.Set({
1261
0
                    CF_ECC_CURVE("BLS12_381"),
1262
0
                    mp.second.first.first.ToTrimmedString(),
1263
0
                    mp.second.first.second.ToTrimmedString(),
1264
0
                    mp.second.second.first.ToTrimmedString(),
1265
0
                    mp.second.second.second.ToTrimmedString()
1266
0
            });
1267
0
        }
1268
0
        Pool_BLS_BatchSignature.Set({msgpub});
1269
0
    }
1270
48
}
1271
1272
48
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1273
48
    return module->OpBLS_BatchSign(op);
1274
48
}
1275
1276
/* Specialization for operation::BLS_BatchVerify */
1277
16
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 {
1278
16
    (void)module;
1279
16
    (void)op;
1280
16
    (void)result;
1281
16
}
1282
1283
16
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1284
16
    return module->OpBLS_BatchVerify(op);
1285
16
}
1286
1287
/* Specialization for operation::BLS_Aggregate_G1 */
1288
40
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 {
1289
40
    (void)module;
1290
40
    (void)op;
1291
40
    (void)result;
1292
40
}
1293
1294
40
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1295
40
    return module->OpBLS_Aggregate_G1(op);
1296
40
}
1297
1298
/* Specialization for operation::BLS_Aggregate_G2 */
1299
50
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 {
1300
50
    (void)module;
1301
50
    (void)op;
1302
50
    (void)result;
1303
50
}
1304
1305
50
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1306
50
    return module->OpBLS_Aggregate_G2(op);
1307
50
}
1308
1309
/* Specialization for operation::BLS_Pairing */
1310
43
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 {
1311
43
    (void)module;
1312
43
    (void)op;
1313
1314
43
    if ( result.second != std::nullopt  ) {
1315
0
        Pool_Fp12.Set({
1316
0
                result.second->bn1.ToTrimmedString(),
1317
0
                result.second->bn2.ToTrimmedString(),
1318
0
                result.second->bn3.ToTrimmedString(),
1319
0
                result.second->bn4.ToTrimmedString(),
1320
0
                result.second->bn5.ToTrimmedString(),
1321
0
                result.second->bn6.ToTrimmedString(),
1322
0
                result.second->bn7.ToTrimmedString(),
1323
0
                result.second->bn8.ToTrimmedString(),
1324
0
                result.second->bn9.ToTrimmedString(),
1325
0
                result.second->bn10.ToTrimmedString(),
1326
0
                result.second->bn11.ToTrimmedString(),
1327
0
                result.second->bn12.ToTrimmedString()
1328
0
        });
1329
0
    }
1330
43
}
1331
1332
43
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1333
43
    return module->OpBLS_Pairing(op);
1334
43
}
1335
1336
/* Specialization for operation::BLS_MillerLoop */
1337
47
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 {
1338
47
    (void)module;
1339
47
    (void)op;
1340
1341
47
    if ( result.second != std::nullopt  ) {
1342
0
        Pool_Fp12.Set({
1343
0
                result.second->bn1.ToTrimmedString(),
1344
0
                result.second->bn2.ToTrimmedString(),
1345
0
                result.second->bn3.ToTrimmedString(),
1346
0
                result.second->bn4.ToTrimmedString(),
1347
0
                result.second->bn5.ToTrimmedString(),
1348
0
                result.second->bn6.ToTrimmedString(),
1349
0
                result.second->bn7.ToTrimmedString(),
1350
0
                result.second->bn8.ToTrimmedString(),
1351
0
                result.second->bn9.ToTrimmedString(),
1352
0
                result.second->bn10.ToTrimmedString(),
1353
0
                result.second->bn11.ToTrimmedString(),
1354
0
                result.second->bn12.ToTrimmedString()
1355
0
        });
1356
0
    }
1357
47
}
1358
1359
47
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1360
47
    return module->OpBLS_MillerLoop(op);
1361
47
}
1362
1363
/* Specialization for operation::BLS_FinalExp */
1364
47
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 {
1365
47
    (void)module;
1366
47
    (void)op;
1367
1368
47
    if ( result.second != std::nullopt  ) {
1369
0
        Pool_Fp12.Set({
1370
0
                result.second->bn1.ToTrimmedString(),
1371
0
                result.second->bn2.ToTrimmedString(),
1372
0
                result.second->bn3.ToTrimmedString(),
1373
0
                result.second->bn4.ToTrimmedString(),
1374
0
                result.second->bn5.ToTrimmedString(),
1375
0
                result.second->bn6.ToTrimmedString(),
1376
0
                result.second->bn7.ToTrimmedString(),
1377
0
                result.second->bn8.ToTrimmedString(),
1378
0
                result.second->bn9.ToTrimmedString(),
1379
0
                result.second->bn10.ToTrimmedString(),
1380
0
                result.second->bn11.ToTrimmedString(),
1381
0
                result.second->bn12.ToTrimmedString()
1382
0
        });
1383
0
    }
1384
47
}
1385
1386
47
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1387
47
    return module->OpBLS_FinalExp(op);
1388
47
}
1389
1390
/* Specialization for operation::BLS_HashToG1 */
1391
52
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 {
1392
52
    (void)module;
1393
1394
52
    if ( result.second != std::nullopt  ) {
1395
0
        const auto curveID = op.curveType.Get();
1396
0
        const auto g1_x = result.second->first.ToTrimmedString();
1397
0
        const auto g1_y = result.second->second.ToTrimmedString();
1398
1399
0
        G1AddToPool(curveID, g1_x, g1_y);
1400
1401
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1402
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1403
0
    }
1404
52
}
1405
1406
52
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1407
52
    return module->OpBLS_HashToG1(op);
1408
52
}
1409
1410
/* Specialization for operation::BLS_MapToG1 */
1411
43
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 {
1412
43
    (void)module;
1413
1414
43
    if ( result.second != std::nullopt  ) {
1415
0
        const auto curveID = op.curveType.Get();
1416
0
        const auto g1_x = result.second->first.ToTrimmedString();
1417
0
        const auto g1_y = result.second->second.ToTrimmedString();
1418
1419
0
        G1AddToPool(curveID, g1_x, g1_y);
1420
1421
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1422
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1423
0
    }
1424
43
}
1425
1426
43
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1427
43
    return module->OpBLS_MapToG1(op);
1428
43
}
1429
1430
/* Specialization for operation::BLS_MapToG2 */
1431
30
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 {
1432
30
    (void)module;
1433
1434
30
    if ( result.second != std::nullopt  ) {
1435
0
        const auto curveID = op.curveType.Get();
1436
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1437
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1438
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1439
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1440
1441
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1442
1443
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1444
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1445
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1446
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1447
0
    }
1448
30
}
1449
1450
30
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1451
30
    return module->OpBLS_MapToG2(op);
1452
30
}
1453
1454
/* Specialization for operation::BLS_IsG1OnCurve */
1455
60
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 {
1456
60
    (void)module;
1457
60
    (void)op;
1458
60
    (void)result;
1459
60
}
1460
1461
60
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1462
60
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1463
60
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1464
1465
60
    return module->OpBLS_IsG1OnCurve(op);
1466
60
}
1467
1468
/* Specialization for operation::BLS_IsG2OnCurve */
1469
83
template<> void ExecutorBase<bool, operation::BLS_IsG2OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG2OnCurve>::ResultPair& result) const {
1470
83
    (void)module;
1471
83
    (void)op;
1472
83
    (void)result;
1473
83
}
1474
1475
83
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1476
83
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1477
83
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1478
75
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1479
67
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1480
1481
67
    return module->OpBLS_IsG2OnCurve(op);
1482
67
}
1483
1484
/* Specialization for operation::BLS_GenerateKeyPair */
1485
26
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 {
1486
26
    (void)module;
1487
1488
26
    if ( result.second != std::nullopt  ) {
1489
0
        const auto curveID = op.curveType.Get();
1490
0
        const auto priv = result.second->priv.ToTrimmedString();
1491
0
        const auto g1_x = result.second->pub.first.ToTrimmedString();
1492
0
        const auto g1_y = result.second->pub.second.ToTrimmedString();
1493
1494
0
        G1AddToPool(curveID, g1_x, g1_y);
1495
1496
0
        if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); }
1497
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1498
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1499
0
    }
1500
26
}
1501
1502
26
template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const {
1503
26
    return module->OpBLS_GenerateKeyPair(op);
1504
26
}
1505
1506
/* Specialization for operation::BLS_Decompress_G1 */
1507
34
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 {
1508
34
    (void)module;
1509
1510
34
    if ( result.second != std::nullopt  ) {
1511
0
        const auto curveID = op.curveType.Get();
1512
0
        const auto g1_x = result.second->first.ToTrimmedString();
1513
0
        const auto g1_y = result.second->second.ToTrimmedString();
1514
1515
0
        G1AddToPool(curveID, g1_x, g1_y);
1516
1517
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1518
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1519
0
    }
1520
34
}
1521
1522
34
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const {
1523
34
    return module->OpBLS_Decompress_G1(op);
1524
34
}
1525
1526
/* Specialization for operation::BLS_Compress_G1 */
1527
38
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 {
1528
38
    (void)module;
1529
1530
38
    if ( result.second != std::nullopt  ) {
1531
0
        const auto compressed = result.second->ToTrimmedString();
1532
1533
0
        if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); }
1534
0
    }
1535
38
}
1536
1537
38
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const {
1538
38
    return module->OpBLS_Compress_G1(op);
1539
38
}
1540
1541
/* Specialization for operation::BLS_Decompress_G2 */
1542
41
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 {
1543
41
    (void)module;
1544
1545
41
    if ( result.second != std::nullopt  ) {
1546
0
        const auto curveID = op.curveType.Get();
1547
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1548
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1549
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1550
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1551
1552
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1553
1554
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1555
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1556
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1557
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1558
0
    }
1559
41
}
1560
1561
41
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1562
41
    return module->OpBLS_Decompress_G2(op);
1563
41
}
1564
1565
/* Specialization for operation::BLS_Compress_G2 */
1566
32
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 {
1567
32
    (void)module;
1568
1569
32
    if ( result.second != std::nullopt  ) {
1570
0
        const auto curveID = op.curveType.Get();
1571
0
        const auto g1_x = result.second->first.ToTrimmedString();
1572
0
        const auto g1_y = result.second->second.ToTrimmedString();
1573
1574
0
        G1AddToPool(curveID, g1_x, g1_y);
1575
1576
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1577
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1578
0
    }
1579
32
}
1580
1581
32
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const {
1582
32
    return module->OpBLS_Compress_G2(op);
1583
32
}
1584
1585
/* Specialization for operation::BLS_G1_Add */
1586
84
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 {
1587
84
    (void)module;
1588
1589
84
    if ( result.second != std::nullopt  ) {
1590
0
        const auto curveID = op.curveType.Get();
1591
0
        const auto g1_x = result.second->first.ToTrimmedString();
1592
0
        const auto g1_y = result.second->second.ToTrimmedString();
1593
1594
0
        G1AddToPool(curveID, g1_x, g1_y);
1595
1596
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1597
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1598
0
    }
1599
84
}
1600
1601
84
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const {
1602
84
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1603
84
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1604
74
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1605
70
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1606
1607
64
    return module->OpBLS_G1_Add(op);
1608
70
}
1609
1610
/* Specialization for operation::BLS_G1_Mul */
1611
76
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 {
1612
76
    (void)module;
1613
1614
76
    if ( result.second != std::nullopt  ) {
1615
0
        const auto curveID = op.curveType.Get();
1616
0
        const auto g1_x = result.second->first.ToTrimmedString();
1617
0
        const auto g1_y = result.second->second.ToTrimmedString();
1618
1619
0
        G1AddToPool(curveID, g1_x, g1_y);
1620
1621
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1622
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1623
0
    }
1624
76
}
1625
1626
76
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1627
76
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1628
76
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1629
76
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1630
1631
76
    return module->OpBLS_G1_Mul(op);
1632
76
}
1633
1634
/* Specialization for operation::BLS_G1_IsEq */
1635
97
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 {
1636
97
    (void)module;
1637
97
    (void)op;
1638
97
    (void)result;
1639
97
}
1640
1641
97
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
1642
97
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1643
91
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1644
85
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1645
81
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1646
1647
81
    return module->OpBLS_G1_IsEq(op);
1648
81
}
1649
1650
/* Specialization for operation::BLS_G1_Neg */
1651
58
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 {
1652
58
    (void)module;
1653
1654
58
    if ( result.second != std::nullopt  ) {
1655
0
        const auto curveID = op.curveType.Get();
1656
0
        const auto g1_x = result.second->first.ToTrimmedString();
1657
0
        const auto g1_y = result.second->second.ToTrimmedString();
1658
1659
0
        G1AddToPool(curveID, g1_x, g1_y);
1660
1661
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1662
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1663
0
    }
1664
58
}
1665
1666
58
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const {
1667
58
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1668
56
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1669
1670
56
    return module->OpBLS_G1_Neg(op);
1671
56
}
1672
1673
/* Specialization for operation::BLS_G2_Add */
1674
95
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 {
1675
95
    (void)module;
1676
1677
95
    if ( result.second != std::nullopt  ) {
1678
0
        const auto curveID = op.curveType.Get();
1679
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1680
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1681
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1682
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1683
1684
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1685
1686
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1687
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1688
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1689
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1690
0
    }
1691
95
}
1692
1693
95
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
1694
95
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1695
95
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1696
92
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1697
92
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1698
92
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1699
92
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1700
92
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1701
85
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1702
1703
85
    return module->OpBLS_G2_Add(op);
1704
85
}
1705
1706
/* Specialization for operation::BLS_G2_Mul */
1707
71
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 {
1708
71
    (void)module;
1709
1710
71
    if ( result.second != std::nullopt  ) {
1711
0
        const auto curveID = op.curveType.Get();
1712
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1713
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1714
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1715
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1716
1717
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1718
1719
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1720
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1721
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1722
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1723
0
    }
1724
71
}
1725
1726
71
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const {
1727
71
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1728
71
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1729
71
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1730
71
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1731
66
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1732
1733
56
    return module->OpBLS_G2_Mul(op);
1734
66
}
1735
1736
/* Specialization for operation::BLS_G2_IsEq */
1737
86
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 {
1738
86
    (void)module;
1739
86
    (void)op;
1740
86
    (void)result;
1741
86
}
1742
1743
86
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
1744
86
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1745
86
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1746
86
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1747
86
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1748
86
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1749
85
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1750
85
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1751
76
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1752
1753
71
    return module->OpBLS_G2_IsEq(op);
1754
76
}
1755
1756
/* Specialization for operation::BLS_G2_Neg */
1757
69
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 {
1758
69
    (void)module;
1759
1760
69
    if ( result.second != std::nullopt  ) {
1761
0
        const auto curveID = op.curveType.Get();
1762
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1763
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1764
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1765
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1766
1767
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1768
1769
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1770
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1771
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1772
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1773
0
    }
1774
69
}
1775
1776
69
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const {
1777
69
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1778
69
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1779
68
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1780
68
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1781
1782
67
    return module->OpBLS_G2_Neg(op);
1783
68
}
1784
1785
/* Specialization for operation::Misc */
1786
44
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
1787
44
    (void)module;
1788
44
    (void)op;
1789
44
    (void)result;
1790
44
}
1791
1792
44
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
1793
44
    return module->OpMisc(op);
1794
44
}
1795
1796
/* Specialization for operation::BLS_HashToG2 */
1797
55
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 {
1798
55
    (void)module;
1799
1800
55
    if ( result.second != std::nullopt  ) {
1801
0
        const auto curveID = op.curveType.Get();
1802
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1803
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1804
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1805
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1806
1807
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1808
1809
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1810
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1811
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1812
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1813
0
    }
1814
55
}
1815
1816
55
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
1817
55
    return module->OpBLS_HashToG2(op);
1818
55
}
1819
1820
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1821
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
1822
108
{ }
1823
102
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
1824
102
    this->modulo = component::Bignum(modulo);
1825
102
}
1826
1827
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) :
1828
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1829
6
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
1830
6
}
1831
1832
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) :
1833
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1834
6
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
1835
6
}
1836
1837
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) :
1838
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1839
6
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
1840
6
}
1841
1842
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) :
1843
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1844
6
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
1845
6
}
1846
1847
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1848
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1849
6
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
1850
6
}
1851
1852
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) :
1853
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1854
6
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
1855
6
}
1856
1857
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) :
1858
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1859
6
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
1860
6
}
1861
1862
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) :
1863
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1864
6
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
1865
6
}
1866
1867
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) :
1868
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1869
6
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
1870
6
}
1871
1872
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) :
1873
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1874
6
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
1875
6
}
1876
1877
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) :
1878
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1879
6
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
1880
6
}
1881
1882
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1883
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1884
6
    CF_NORET(SetModulo("18446744073709551616"));
1885
6
}
1886
1887
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1888
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1889
6
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
1890
6
}
1891
1892
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1893
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1894
6
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
1895
6
}
1896
1897
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1898
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1899
6
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
1900
6
}
1901
1902
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1903
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1904
6
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
1905
6
}
1906
1907
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) :
1908
6
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
1909
6
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
1910
6
}
1911
1912
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1913
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
1914
6
{ }
1915
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
1916
0
    this->modulo = component::Bignum(modulo);
1917
0
}
1918
1919
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1920
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
1921
6
{ }
1922
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
1923
0
    this->modulo = component::Bignum(modulo);
1924
0
}
1925
1926
template <class ResultType, class OperationType>
1927
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
1928
    operationID(operationID),
1929
    modules(modules),
1930
    options(options)
1931
540
{
1932
540
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
108
{
1932
108
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
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
1931
6
{
1932
6
}
1933
1934
/* Specialization for operation::SR25519_Verify */
1935
57
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 {
1936
57
    (void)module;
1937
57
    (void)op;
1938
57
    (void)result;
1939
57
}
1940
1941
57
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
1942
57
    return module->OpSR25519_Verify(op);
1943
57
}
1944
1945
template <class ResultType, class OperationType>
1946
540
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
540
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
1946
108
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
108
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
1946
6
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
1947
6
}
1948
1949
/* Filter away the values in the set that are std::nullopt */
1950
template <class ResultType, class OperationType>
1951
98.0k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
98.0k
    ResultSet ret;
1953
1954
230k
    for (const auto& result : results) {
1955
230k
        if ( result.second == std::nullopt ) {
1956
149k
            continue;
1957
149k
        }
1958
1959
80.5k
        ret.push_back(result);
1960
80.5k
    }
1961
1962
98.0k
    return ret;
1963
98.0k
}
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
1951
113
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
113
    ResultSet ret;
1953
1954
596
    for (const auto& result : results) {
1955
596
        if ( result.second == std::nullopt ) {
1956
202
            continue;
1957
202
        }
1958
1959
394
        ret.push_back(result);
1960
394
    }
1961
1962
113
    return ret;
1963
113
}
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
1951
111
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
111
    ResultSet ret;
1953
1954
510
    for (const auto& result : results) {
1955
510
        if ( result.second == std::nullopt ) {
1956
254
            continue;
1957
254
        }
1958
1959
256
        ret.push_back(result);
1960
256
    }
1961
1962
111
    return ret;
1963
111
}
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
1951
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
12
    ResultSet ret;
1953
1954
63
    for (const auto& result : results) {
1955
63
        if ( result.second == std::nullopt ) {
1956
63
            continue;
1957
63
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
12
    return ret;
1963
12
}
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
1951
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
18
    ResultSet ret;
1953
1954
87
    for (const auto& result : results) {
1955
87
        if ( result.second == std::nullopt ) {
1956
87
            continue;
1957
87
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
18
    return ret;
1963
18
}
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
1951
130
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
130
    ResultSet ret;
1953
1954
577
    for (const auto& result : results) {
1955
577
        if ( result.second == std::nullopt ) {
1956
336
            continue;
1957
336
        }
1958
1959
241
        ret.push_back(result);
1960
241
    }
1961
1962
130
    return ret;
1963
130
}
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
1951
131
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
131
    ResultSet ret;
1953
1954
701
    for (const auto& result : results) {
1955
701
        if ( result.second == std::nullopt ) {
1956
563
            continue;
1957
563
        }
1958
1959
138
        ret.push_back(result);
1960
138
    }
1961
1962
131
    return ret;
1963
131
}
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
1951
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
20
    ResultSet ret;
1953
1954
146
    for (const auto& result : results) {
1955
146
        if ( result.second == std::nullopt ) {
1956
146
            continue;
1957
146
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
20
    return ret;
1963
20
}
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
1951
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
26
    ResultSet ret;
1953
1954
171
    for (const auto& result : results) {
1955
171
        if ( result.second == std::nullopt ) {
1956
171
            continue;
1957
171
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
26
    return ret;
1963
26
}
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
1951
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
23
    ResultSet ret;
1953
1954
163
    for (const auto& result : results) {
1955
163
        if ( result.second == std::nullopt ) {
1956
163
            continue;
1957
163
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
23
    return ret;
1963
23
}
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
1951
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
23
    ResultSet ret;
1953
1954
147
    for (const auto& result : results) {
1955
147
        if ( result.second == std::nullopt ) {
1956
147
            continue;
1957
147
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
23
    return ret;
1963
23
}
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
1951
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
27
    ResultSet ret;
1953
1954
210
    for (const auto& result : results) {
1955
210
        if ( result.second == std::nullopt ) {
1956
210
            continue;
1957
210
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
27
    return ret;
1963
27
}
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
1951
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
18
    ResultSet ret;
1953
1954
90
    for (const auto& result : results) {
1955
90
        if ( result.second == std::nullopt ) {
1956
90
            continue;
1957
90
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
18
    return ret;
1963
18
}
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
1951
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
11
    ResultSet ret;
1953
1954
26
    for (const auto& result : results) {
1955
26
        if ( result.second == std::nullopt ) {
1956
26
            continue;
1957
26
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
11
    return ret;
1963
11
}
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
1951
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
20
    ResultSet ret;
1953
1954
92
    for (const auto& result : results) {
1955
92
        if ( result.second == std::nullopt ) {
1956
92
            continue;
1957
92
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
20
    return ret;
1963
20
}
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
1951
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
27
    ResultSet ret;
1953
1954
199
    for (const auto& result : results) {
1955
199
        if ( result.second == std::nullopt ) {
1956
199
            continue;
1957
199
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
27
    return ret;
1963
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
1951
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
3
    ResultSet ret;
1953
1954
6
    for (const auto& result : results) {
1955
6
        if ( result.second == std::nullopt ) {
1956
6
            continue;
1957
6
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
3
    return ret;
1963
3
}
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
1951
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
24
    ResultSet ret;
1953
1954
153
    for (const auto& result : results) {
1955
153
        if ( result.second == std::nullopt ) {
1956
153
            continue;
1957
153
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
24
    return ret;
1963
24
}
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
1951
5.62k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
5.62k
    ResultSet ret;
1953
1954
12.8k
    for (const auto& result : results) {
1955
12.8k
        if ( result.second == std::nullopt ) {
1956
7.10k
            continue;
1957
7.10k
        }
1958
1959
5.77k
        ret.push_back(result);
1960
5.77k
    }
1961
1962
5.62k
    return ret;
1963
5.62k
}
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
1951
5.31k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
5.31k
    ResultSet ret;
1953
1954
12.9k
    for (const auto& result : results) {
1955
12.9k
        if ( result.second == std::nullopt ) {
1956
6.50k
            continue;
1957
6.50k
        }
1958
1959
6.45k
        ret.push_back(result);
1960
6.45k
    }
1961
1962
5.31k
    return ret;
1963
5.31k
}
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::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
1951
5.88k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
5.88k
    ResultSet ret;
1953
1954
16.9k
    for (const auto& result : results) {
1955
16.9k
        if ( result.second == std::nullopt ) {
1956
8.82k
            continue;
1957
8.82k
        }
1958
1959
8.16k
        ret.push_back(result);
1960
8.16k
    }
1961
1962
5.88k
    return ret;
1963
5.88k
}
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
1951
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
14
    ResultSet ret;
1953
1954
37
    for (const auto& result : results) {
1955
37
        if ( result.second == std::nullopt ) {
1956
37
            continue;
1957
37
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
14
    return ret;
1963
14
}
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
1951
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
15
    ResultSet ret;
1953
1954
50
    for (const auto& result : results) {
1955
50
        if ( result.second == std::nullopt ) {
1956
50
            continue;
1957
50
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
15
    return ret;
1963
15
}
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
1951
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
14
    ResultSet ret;
1953
1954
42
    for (const auto& result : results) {
1955
42
        if ( result.second == std::nullopt ) {
1956
42
            continue;
1957
42
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
14
    return ret;
1963
14
}
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
1951
4.08k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
4.08k
    ResultSet ret;
1953
1954
10.6k
    for (const auto& result : results) {
1955
10.6k
        if ( result.second == std::nullopt ) {
1956
7.18k
            continue;
1957
7.18k
        }
1958
1959
3.50k
        ret.push_back(result);
1960
3.50k
    }
1961
1962
4.08k
    return ret;
1963
4.08k
}
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
1951
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
12
    ResultSet ret;
1953
1954
37
    for (const auto& result : results) {
1955
37
        if ( result.second == std::nullopt ) {
1956
37
            continue;
1957
37
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
12
    return ret;
1963
12
}
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
1951
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
11
    ResultSet ret;
1953
1954
30
    for (const auto& result : results) {
1955
30
        if ( result.second == std::nullopt ) {
1956
30
            continue;
1957
30
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
11
    return ret;
1963
11
}
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
1951
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
10
    ResultSet ret;
1953
1954
29
    for (const auto& result : results) {
1955
29
        if ( result.second == std::nullopt ) {
1956
29
            continue;
1957
29
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
10
    return ret;
1963
10
}
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
1951
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
15
    ResultSet ret;
1953
1954
41
    for (const auto& result : results) {
1955
41
        if ( result.second == std::nullopt ) {
1956
41
            continue;
1957
41
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
15
    return ret;
1963
15
}
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
1951
508
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
508
    ResultSet ret;
1953
1954
1.67k
    for (const auto& result : results) {
1955
1.67k
        if ( result.second == std::nullopt ) {
1956
1.46k
            continue;
1957
1.46k
        }
1958
1959
210
        ret.push_back(result);
1960
210
    }
1961
1962
508
    return ret;
1963
508
}
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
Line
Count
Source
1951
825
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
825
    ResultSet ret;
1953
1954
2.85k
    for (const auto& result : results) {
1955
2.85k
        if ( result.second == std::nullopt ) {
1956
2.56k
            continue;
1957
2.56k
        }
1958
1959
295
        ret.push_back(result);
1960
295
    }
1961
1962
825
    return ret;
1963
825
}
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
1951
685
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
685
    ResultSet ret;
1953
1954
2.27k
    for (const auto& result : results) {
1955
2.27k
        if ( result.second == std::nullopt ) {
1956
2.26k
            continue;
1957
2.26k
        }
1958
1959
11
        ret.push_back(result);
1960
11
    }
1961
1962
685
    return ret;
1963
685
}
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
1951
1.85k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
1.85k
    ResultSet ret;
1953
1954
5.03k
    for (const auto& result : results) {
1955
5.03k
        if ( result.second == std::nullopt ) {
1956
4.76k
            continue;
1957
4.76k
        }
1958
1959
273
        ret.push_back(result);
1960
273
    }
1961
1962
1.85k
    return ret;
1963
1.85k
}
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
1951
3.45k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
3.45k
    ResultSet ret;
1953
1954
8.44k
    for (const auto& result : results) {
1955
8.44k
        if ( result.second == std::nullopt ) {
1956
7.34k
            continue;
1957
7.34k
        }
1958
1959
1.10k
        ret.push_back(result);
1960
1.10k
    }
1961
1962
3.45k
    return ret;
1963
3.45k
}
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
1951
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
11
    ResultSet ret;
1953
1954
28
    for (const auto& result : results) {
1955
28
        if ( result.second == std::nullopt ) {
1956
28
            continue;
1957
28
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
11
    return ret;
1963
11
}
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
1951
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
14
    ResultSet ret;
1953
1954
41
    for (const auto& result : results) {
1955
41
        if ( result.second == std::nullopt ) {
1956
41
            continue;
1957
41
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
14
    return ret;
1963
14
}
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
1951
2.01k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
2.01k
    ResultSet ret;
1953
1954
5.29k
    for (const auto& result : results) {
1955
5.29k
        if ( result.second == std::nullopt ) {
1956
4.25k
            continue;
1957
4.25k
        }
1958
1959
1.04k
        ret.push_back(result);
1960
1.04k
    }
1961
1962
2.01k
    return ret;
1963
2.01k
}
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
1951
66.4k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
66.4k
    ResultSet ret;
1953
1954
145k
    for (const auto& result : results) {
1955
145k
        if ( result.second == std::nullopt ) {
1956
92.8k
            continue;
1957
92.8k
        }
1958
1959
52.6k
        ret.push_back(result);
1960
52.6k
    }
1961
1962
66.4k
    return ret;
1963
66.4k
}
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
1951
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
20
    ResultSet ret;
1953
1954
54
    for (const auto& result : results) {
1955
54
        if ( result.second == std::nullopt ) {
1956
54
            continue;
1957
54
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
20
    return ret;
1963
20
}
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
1951
56
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
56
    ResultSet ret;
1953
1954
179
    for (const auto& result : results) {
1955
179
        if ( result.second == std::nullopt ) {
1956
179
            continue;
1957
179
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
56
    return ret;
1963
56
}
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
1951
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
19
    ResultSet ret;
1953
1954
55
    for (const auto& result : results) {
1955
55
        if ( result.second == std::nullopt ) {
1956
55
            continue;
1957
55
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
19
    return ret;
1963
19
}
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
1951
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
14
    ResultSet ret;
1953
1954
38
    for (const auto& result : results) {
1955
38
        if ( result.second == std::nullopt ) {
1956
38
            continue;
1957
38
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
14
    return ret;
1963
14
}
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
1951
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
13
    ResultSet ret;
1953
1954
44
    for (const auto& result : results) {
1955
44
        if ( result.second == std::nullopt ) {
1956
44
            continue;
1957
44
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
13
    return ret;
1963
13
}
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
1951
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
11
    ResultSet ret;
1953
1954
34
    for (const auto& result : results) {
1955
34
        if ( result.second == std::nullopt ) {
1956
34
            continue;
1957
34
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
11
    return ret;
1963
11
}
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
1951
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
15
    ResultSet ret;
1953
1954
38
    for (const auto& result : results) {
1955
38
        if ( result.second == std::nullopt ) {
1956
38
            continue;
1957
38
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
15
    return ret;
1963
15
}
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
1951
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
6
    ResultSet ret;
1953
1954
15
    for (const auto& result : results) {
1955
15
        if ( result.second == std::nullopt ) {
1956
15
            continue;
1957
15
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
6
    return ret;
1963
6
}
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
1951
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
13
    ResultSet ret;
1953
1954
39
    for (const auto& result : results) {
1955
39
        if ( result.second == std::nullopt ) {
1956
39
            continue;
1957
39
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
13
    return ret;
1963
13
}
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
1951
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
16
    ResultSet ret;
1953
1954
49
    for (const auto& result : results) {
1955
49
        if ( result.second == std::nullopt ) {
1956
49
            continue;
1957
49
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
16
    return ret;
1963
16
}
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
1951
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
14
    ResultSet ret;
1953
1954
38
    for (const auto& result : results) {
1955
38
        if ( result.second == std::nullopt ) {
1956
38
            continue;
1957
38
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
14
    return ret;
1963
14
}
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
1951
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
15
    ResultSet ret;
1953
1954
43
    for (const auto& result : results) {
1955
43
        if ( result.second == std::nullopt ) {
1956
43
            continue;
1957
43
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
15
    return ret;
1963
15
}
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
1951
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
13
    ResultSet ret;
1953
1954
40
    for (const auto& result : results) {
1955
40
        if ( result.second == std::nullopt ) {
1956
40
            continue;
1957
40
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
13
    return ret;
1963
13
}
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
1951
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
16
    ResultSet ret;
1953
1954
45
    for (const auto& result : results) {
1955
45
        if ( result.second == std::nullopt ) {
1956
45
            continue;
1957
45
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
16
    return ret;
1963
16
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
1951
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
15
    ResultSet ret;
1953
1954
47
    for (const auto& result : results) {
1955
47
        if ( result.second == std::nullopt ) {
1956
47
            continue;
1957
47
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
15
    return ret;
1963
15
}
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
1951
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
11
    ResultSet ret;
1953
1954
32
    for (const auto& result : results) {
1955
32
        if ( result.second == std::nullopt ) {
1956
32
            continue;
1957
32
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
11
    return ret;
1963
11
}
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
1951
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
11
    ResultSet ret;
1953
1954
27
    for (const auto& result : results) {
1955
27
        if ( result.second == std::nullopt ) {
1956
27
            continue;
1957
27
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
11
    return ret;
1963
11
}
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
1951
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
18
    ResultSet ret;
1953
1954
50
    for (const auto& result : results) {
1955
50
        if ( result.second == std::nullopt ) {
1956
50
            continue;
1957
50
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
18
    return ret;
1963
18
}
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
1951
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
16
    ResultSet ret;
1953
1954
44
    for (const auto& result : results) {
1955
44
        if ( result.second == std::nullopt ) {
1956
44
            continue;
1957
44
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
16
    return ret;
1963
16
}
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
1951
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
10
    ResultSet ret;
1953
1954
23
    for (const auto& result : results) {
1955
23
        if ( result.second == std::nullopt ) {
1956
23
            continue;
1957
23
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
10
    return ret;
1963
10
}
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
1951
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
12
    ResultSet ret;
1953
1954
31
    for (const auto& result : results) {
1955
31
        if ( result.second == std::nullopt ) {
1956
31
            continue;
1957
31
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
12
    return ret;
1963
12
}
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
1951
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
11
    ResultSet ret;
1953
1954
35
    for (const auto& result : results) {
1955
35
        if ( result.second == std::nullopt ) {
1956
35
            continue;
1957
35
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
11
    return ret;
1963
11
}
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
1951
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
13
    ResultSet ret;
1953
1954
38
    for (const auto& result : results) {
1955
38
        if ( result.second == std::nullopt ) {
1956
38
            continue;
1957
38
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
13
    return ret;
1963
13
}
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
1951
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
7
    ResultSet ret;
1953
1954
23
    for (const auto& result : results) {
1955
23
        if ( result.second == std::nullopt ) {
1956
23
            continue;
1957
23
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
7
    return ret;
1963
7
}
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
1951
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
16
    ResultSet ret;
1953
1954
49
    for (const auto& result : results) {
1955
49
        if ( result.second == std::nullopt ) {
1956
49
            continue;
1957
49
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
16
    return ret;
1963
16
}
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
1951
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
12
    ResultSet ret;
1953
1954
41
    for (const auto& result : results) {
1955
41
        if ( result.second == std::nullopt ) {
1956
41
            continue;
1957
41
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
12
    return ret;
1963
12
}
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
1951
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
23
    ResultSet ret;
1953
1954
64
    for (const auto& result : results) {
1955
64
        if ( result.second == std::nullopt ) {
1956
64
            continue;
1957
64
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
23
    return ret;
1963
23
}
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
1951
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
13
    ResultSet ret;
1953
1954
37
    for (const auto& result : results) {
1955
37
        if ( result.second == std::nullopt ) {
1956
37
            continue;
1957
37
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
13
    return ret;
1963
13
}
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
1951
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
18
    ResultSet ret;
1953
1954
55
    for (const auto& result : results) {
1955
55
        if ( result.second == std::nullopt ) {
1956
55
            continue;
1957
55
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
18
    return ret;
1963
18
}
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
1951
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
14
    ResultSet ret;
1953
1954
41
    for (const auto& result : results) {
1955
41
        if ( result.second == std::nullopt ) {
1956
41
            continue;
1957
41
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
14
    return ret;
1963
14
}
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
1951
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
17
    ResultSet ret;
1953
1954
46
    for (const auto& result : results) {
1955
46
        if ( result.second == std::nullopt ) {
1956
46
            continue;
1957
46
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
17
    return ret;
1963
17
}
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
1951
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
11
    ResultSet ret;
1953
1954
29
    for (const auto& result : results) {
1955
29
        if ( result.second == std::nullopt ) {
1956
29
            continue;
1957
29
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
11
    return ret;
1963
11
}
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
1951
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
15
    ResultSet ret;
1953
1954
43
    for (const auto& result : results) {
1955
43
        if ( result.second == std::nullopt ) {
1956
43
            continue;
1957
43
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
15
    return ret;
1963
15
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
1951
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
1952
18
    ResultSet ret;
1953
1954
49
    for (const auto& result : results) {
1955
49
        if ( result.second == std::nullopt ) {
1956
49
            continue;
1957
49
        }
1958
1959
0
        ret.push_back(result);
1960
0
    }
1961
1962
18
    return ret;
1963
18
}
1964
1965
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
1966
template <>
1967
6.25k
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 {
1968
6.25k
    (void)operations;
1969
6.25k
    (void)results;
1970
6.25k
    (void)data;
1971
6.25k
    (void)size;
1972
6.25k
}
1973
1974
template <class ResultType, class OperationType>
1975
5.54k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
5.54k
    (void)operation;
1977
1978
5.54k
    return false;
1979
5.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
1975
78
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
78
    (void)operation;
1977
1978
78
    return false;
1979
78
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
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
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::dontCompare(cryptofuzz::operation::KDF_PBKDF2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::dontCompare(cryptofuzz::operation::KDF_SSH const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::dontCompare(cryptofuzz::operation::KDF_X963 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
1975
1.88k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
1.88k
    (void)operation;
1977
1978
1.88k
    return false;
1979
1.88k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
1975
2.25k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
2.25k
    (void)operation;
1977
1978
2.25k
    return false;
1979
2.25k
}
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
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::dontCompare(cryptofuzz::operation::ECDSA_Verify const&) const
Line
Count
Source
1975
636
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
636
    (void)operation;
1977
1978
636
    return false;
1979
636
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const
Line
Count
Source
1975
51
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
51
    (void)operation;
1977
1978
51
    return false;
1979
51
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const
Line
Count
Source
1975
48
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
48
    (void)operation;
1977
1978
48
    return false;
1979
48
}
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
1975
68
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
68
    (void)operation;
1977
1978
68
    return false;
1979
68
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
1975
258
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
258
    (void)operation;
1977
1978
258
    return false;
1979
258
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
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
1975
272
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
1976
272
    (void)operation;
1977
1978
272
    return false;
1979
272
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
1980
1981
template <>
1982
15.3k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
1983
15.3k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
1984
15.2k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
1985
1986
15.2k
    return false;
1987
15.2k
}
1988
1989
template <>
1990
1.99k
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
1991
1.99k
    if (
1992
1.99k
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
1993
1.99k
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
1994
700
        if ( operation.UseRandomNonce() ) {
1995
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
1996
357
            return true;
1997
357
        }
1998
700
    }
1999
2000
1.63k
    return false;
2001
1.99k
}
2002
2003
template <>
2004
0
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2005
0
    if (
2006
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2007
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2008
0
        if ( operation.UseRandomNonce() ) {
2009
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2010
0
            return true;
2011
0
        }
2012
0
    }
2013
2014
0
    return false;
2015
0
}
2016
2017
template <>
2018
0
bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const {
2019
0
    if (
2020
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2021
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2022
0
        if ( operation.UseRandomNonce() ) {
2023
            /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */
2024
0
            return true;
2025
0
        }
2026
0
    }
2027
2028
0
    return false;
2029
0
}
2030
2031
/* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */
2032
template <>
2033
56
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2034
56
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2035
2036
56
    return false;
2037
56
}
2038
2039
template <>
2040
22
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2041
22
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2042
2043
22
    return false;
2044
22
}
2045
2046
template <>
2047
0
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2048
0
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2049
2050
0
    return false;
2051
0
}
2052
2053
template <>
2054
59
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2055
59
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2056
2057
59
    return false;
2058
59
}
2059
2060
template <class ResultType, class OperationType>
2061
101k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
101k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
3.28k
        return;
2065
3.28k
    }
2066
2067
98.0k
    const auto filtered = filter(results);
2068
2069
98.0k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
75.0k
        return;
2072
75.0k
    }
2073
2074
22.9k
    if ( dontCompare(operations[0].second) == true ) {
2075
435
        return;
2076
435
    }
2077
2078
55.8k
    for (size_t i = 1; i < filtered.size(); i++) {
2079
33.3k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
33.3k
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
33.3k
        const bool equal = *prev == *cur;
2083
2084
33.3k
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
33.3k
    }
2101
22.5k
}
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
2061
295
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
295
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
182
        return;
2065
182
    }
2066
2067
113
    const auto filtered = filter(results);
2068
2069
113
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
35
        return;
2072
35
    }
2073
2074
78
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
394
    for (size_t i = 1; i < filtered.size(); i++) {
2079
316
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
316
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
316
        const bool equal = *prev == *cur;
2083
2084
316
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
316
    }
2101
78
}
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
2061
244
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
244
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
133
        return;
2065
133
    }
2066
2067
111
    const auto filtered = filter(results);
2068
2069
111
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
52
        return;
2072
52
    }
2073
2074
59
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
236
    for (size_t i = 1; i < filtered.size(); i++) {
2079
177
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
177
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
177
        const bool equal = *prev == *cur;
2083
2084
177
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
177
    }
2101
59
}
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
2061
13
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
13
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
1
        return;
2065
1
    }
2066
2067
12
    const auto filtered = filter(results);
2068
2069
12
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
12
        return;
2072
12
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2061
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 {
2062
28
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
10
        return;
2065
10
    }
2066
2067
18
    const auto filtered = filter(results);
2068
2069
18
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
18
        return;
2072
18
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
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
2061
344
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
344
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
214
        return;
2065
214
    }
2066
2067
130
    const auto filtered = filter(results);
2068
2069
130
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
74
        return;
2072
74
    }
2073
2074
56
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
241
    for (size_t i = 1; i < filtered.size(); i++) {
2079
185
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
185
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
185
        const bool equal = *prev == *cur;
2083
2084
185
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
185
    }
2101
56
}
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
2061
277
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
277
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
146
        return;
2065
146
    }
2066
2067
131
    const auto filtered = filter(results);
2068
2069
131
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
109
        return;
2072
109
    }
2073
2074
22
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
138
    for (size_t i = 1; i < filtered.size(); i++) {
2079
116
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
116
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
116
        const bool equal = *prev == *cur;
2083
2084
116
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
116
    }
2101
22
}
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
2061
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 {
2062
28
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
8
        return;
2065
8
    }
2066
2067
20
    const auto filtered = filter(results);
2068
2069
20
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
20
        return;
2072
20
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2061
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 {
2062
45
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
19
        return;
2065
19
    }
2066
2067
26
    const auto filtered = filter(results);
2068
2069
26
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
26
        return;
2072
26
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
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
2061
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 {
2062
35
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
12
        return;
2065
12
    }
2066
2067
23
    const auto filtered = filter(results);
2068
2069
23
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
23
        return;
2072
23
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
37
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
14
        return;
2065
14
    }
2066
2067
23
    const auto filtered = filter(results);
2068
2069
23
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
23
        return;
2072
23
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
37
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
10
        return;
2065
10
    }
2066
2067
27
    const auto filtered = filter(results);
2068
2069
27
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
27
        return;
2072
27
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
23
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
23
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
5
        return;
2065
5
    }
2066
2067
18
    const auto filtered = filter(results);
2068
2069
18
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
18
        return;
2072
18
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
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
2061
25
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
25
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
14
        return;
2065
14
    }
2066
2067
11
    const auto filtered = filter(results);
2068
2069
11
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
11
        return;
2072
11
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2061
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 {
2062
40
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
20
        return;
2065
20
    }
2066
2067
20
    const auto filtered = filter(results);
2068
2069
20
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
20
        return;
2072
20
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
37
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
10
        return;
2065
10
    }
2066
2067
27
    const auto filtered = filter(results);
2068
2069
27
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
27
        return;
2072
27
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
4
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
4
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
1
        return;
2065
1
    }
2066
2067
3
    const auto filtered = filter(results);
2068
2069
3
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
3
        return;
2072
3
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2061
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 {
2062
40
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
16
        return;
2065
16
    }
2066
2067
24
    const auto filtered = filter(results);
2068
2069
24
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
24
        return;
2072
24
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
5.64k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
5.64k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
21
        return;
2065
21
    }
2066
2067
5.62k
    const auto filtered = filter(results);
2068
2069
5.62k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
3.73k
        return;
2072
3.73k
    }
2073
2074
1.88k
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
4.31k
    for (size_t i = 1; i < filtered.size(); i++) {
2079
2.42k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
2.42k
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
2.42k
        const bool equal = *prev == *cur;
2083
2084
2.42k
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
2.42k
    }
2101
1.88k
}
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
2061
5.32k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
5.32k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
10
        return;
2065
10
    }
2066
2067
5.31k
    const auto filtered = filter(results);
2068
2069
5.31k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
3.06k
        return;
2072
3.06k
    }
2073
2074
2.25k
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
5.36k
    for (size_t i = 1; i < filtered.size(); i++) {
2079
3.11k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
3.11k
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
3.11k
        const bool equal = *prev == *cur;
2083
2084
3.11k
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
3.11k
    }
2101
2.25k
}
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
2061
5.90k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
5.90k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
16
        return;
2065
16
    }
2066
2067
5.88k
    const auto filtered = filter(results);
2068
2069
5.88k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
3.89k
        return;
2072
3.89k
    }
2073
2074
1.99k
    if ( dontCompare(operations[0].second) == true ) {
2075
357
        return;
2076
357
    }
2077
2078
5.08k
    for (size_t i = 1; i < filtered.size(); i++) {
2079
3.45k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
3.45k
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
3.45k
        const bool equal = *prev == *cur;
2083
2084
3.45k
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
3.45k
    }
2101
1.63k
}
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
2061
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
18
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
4
        return;
2065
4
    }
2066
2067
14
    const auto filtered = filter(results);
2068
2069
14
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
14
        return;
2072
14
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
24
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
9
        return;
2065
9
    }
2066
2067
15
    const auto filtered = filter(results);
2068
2069
15
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
15
        return;
2072
15
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
20
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
6
        return;
2065
6
    }
2066
2067
14
    const auto filtered = filter(results);
2068
2069
14
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
14
        return;
2072
14
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
4.08k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
4.08k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
5
        return;
2065
5
    }
2066
2067
4.08k
    const auto filtered = filter(results);
2068
2069
4.08k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
3.44k
        return;
2072
3.44k
    }
2073
2074
636
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
1.44k
    for (size_t i = 1; i < filtered.size(); i++) {
2079
810
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
810
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
810
        const bool equal = *prev == *cur;
2083
2084
810
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
810
    }
2101
636
}
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
2061
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
19
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
7
        return;
2065
7
    }
2066
2067
12
    const auto filtered = filter(results);
2068
2069
12
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
12
        return;
2072
12
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2061
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
18
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
7
        return;
2065
7
    }
2066
2067
11
    const auto filtered = filter(results);
2068
2069
11
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
11
        return;
2072
11
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
12
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
12
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
2
        return;
2065
2
    }
2066
2067
10
    const auto filtered = filter(results);
2068
2069
10
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
10
        return;
2072
10
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
21
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
6
        return;
2065
6
    }
2066
2067
15
    const auto filtered = filter(results);
2068
2069
15
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
15
        return;
2072
15
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
513
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
513
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
5
        return;
2065
5
    }
2066
2067
508
    const auto filtered = filter(results);
2068
2069
508
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
457
        return;
2072
457
    }
2073
2074
51
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
156
    for (size_t i = 1; i < filtered.size(); i++) {
2079
105
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
105
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
105
        const bool equal = *prev == *cur;
2083
2084
105
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
105
    }
2101
51
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Encrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Encrypt> > > 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
2061
832
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
832
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
7
        return;
2065
7
    }
2066
2067
825
    const auto filtered = filter(results);
2068
2069
825
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
777
        return;
2072
777
    }
2073
2074
48
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
113
    for (size_t i = 1; i < filtered.size(); i++) {
2079
65
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
65
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
65
        const bool equal = *prev == *cur;
2083
2084
65
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
65
    }
2101
48
}
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
2061
698
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
698
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
13
        return;
2065
13
    }
2066
2067
685
    const auto filtered = filter(results);
2068
2069
685
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
685
        return;
2072
685
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
1.86k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
1.86k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
4
        return;
2065
4
    }
2066
2067
1.85k
    const auto filtered = filter(results);
2068
2069
1.85k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
1.78k
        return;
2072
1.78k
    }
2073
2074
68
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
214
    for (size_t i = 1; i < filtered.size(); i++) {
2079
146
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
146
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
146
        const bool equal = *prev == *cur;
2083
2084
146
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
146
    }
2101
68
}
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
2061
3.46k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
3.46k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
8
        return;
2065
8
    }
2066
2067
3.45k
    const auto filtered = filter(results);
2068
2069
3.45k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
3.20k
        return;
2072
3.20k
    }
2073
2074
258
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
615
    for (size_t i = 1; i < filtered.size(); i++) {
2079
357
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
357
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
357
        const bool equal = *prev == *cur;
2083
2084
357
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
357
    }
2101
258
}
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
2061
14
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
14
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
3
        return;
2065
3
    }
2066
2067
11
    const auto filtered = filter(results);
2068
2069
11
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
11
        return;
2072
11
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
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
2061
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
22
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
8
        return;
2065
8
    }
2066
2067
14
    const auto filtered = filter(results);
2068
2069
14
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
14
        return;
2072
14
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
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
2061
2.05k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
2.05k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
41
        return;
2065
41
    }
2066
2067
2.01k
    const auto filtered = filter(results);
2068
2069
2.01k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
1.74k
        return;
2072
1.74k
    }
2073
2074
272
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
736
    for (size_t i = 1; i < filtered.size(); i++) {
2079
464
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
464
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
464
        const bool equal = *prev == *cur;
2083
2084
464
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
464
    }
2101
272
}
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
2061
68.0k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
68.0k
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
1.65k
        return;
2065
1.65k
    }
2066
2067
66.4k
    const auto filtered = filter(results);
2068
2069
66.4k
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
51.1k
        return;
2072
51.1k
    }
2073
2074
15.3k
    if ( dontCompare(operations[0].second) == true ) {
2075
78
        return;
2076
78
    }
2077
2078
36.8k
    for (size_t i = 1; i < filtered.size(); i++) {
2079
21.5k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
21.5k
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
21.5k
        const bool equal = *prev == *cur;
2083
2084
21.5k
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
21.5k
    }
2101
15.2k
}
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
2061
56
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
56
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
36
        return;
2065
36
    }
2066
2067
20
    const auto filtered = filter(results);
2068
2069
20
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
20
        return;
2072
20
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
180
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
180
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
124
        return;
2065
124
    }
2066
2067
56
    const auto filtered = filter(results);
2068
2069
56
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
56
        return;
2072
56
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
40
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
21
        return;
2065
21
    }
2066
2067
19
    const auto filtered = filter(results);
2068
2069
19
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
19
        return;
2072
19
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
30
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
16
        return;
2065
16
    }
2066
2067
14
    const auto filtered = filter(results);
2068
2069
14
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
14
        return;
2072
14
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
30
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
17
        return;
2065
17
    }
2066
2067
13
    const auto filtered = filter(results);
2068
2069
13
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
13
        return;
2072
13
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
17
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
17
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
6
        return;
2065
6
    }
2066
2067
11
    const auto filtered = filter(results);
2068
2069
11
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
11
        return;
2072
11
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
25
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
25
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
10
        return;
2065
10
    }
2066
2067
15
    const auto filtered = filter(results);
2068
2069
15
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
15
        return;
2072
15
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
7
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
7
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
1
        return;
2065
1
    }
2066
2067
6
    const auto filtered = filter(results);
2068
2069
6
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
6
        return;
2072
6
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
14
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
14
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
1
        return;
2065
1
    }
2066
2067
13
    const auto filtered = filter(results);
2068
2069
13
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
13
        return;
2072
13
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
17
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
17
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
1
        return;
2065
1
    }
2066
2067
16
    const auto filtered = filter(results);
2068
2069
16
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
16
        return;
2072
16
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
19
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
5
        return;
2065
5
    }
2066
2067
14
    const auto filtered = filter(results);
2068
2069
14
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
14
        return;
2072
14
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
19
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
4
        return;
2065
4
    }
2066
2067
15
    const auto filtered = filter(results);
2068
2069
15
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
15
        return;
2072
15
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
20
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
7
        return;
2065
7
    }
2066
2067
13
    const auto filtered = filter(results);
2068
2069
13
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
13
        return;
2072
13
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
23
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
23
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
7
        return;
2065
7
    }
2066
2067
16
    const auto filtered = filter(results);
2068
2069
16
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
16
        return;
2072
16
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
23
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
23
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
8
        return;
2065
8
    }
2066
2067
15
    const auto filtered = filter(results);
2068
2069
15
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
15
        return;
2072
15
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
22
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
11
        return;
2065
11
    }
2066
2067
11
    const auto filtered = filter(results);
2068
2069
11
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
11
        return;
2072
11
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
14
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
14
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
3
        return;
2065
3
    }
2066
2067
11
    const auto filtered = filter(results);
2068
2069
11
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
11
        return;
2072
11
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
28
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
10
        return;
2065
10
    }
2066
2067
18
    const auto filtered = filter(results);
2068
2069
18
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
18
        return;
2072
18
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
55
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
39
        return;
2065
39
    }
2066
2067
16
    const auto filtered = filter(results);
2068
2069
16
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
16
        return;
2072
16
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
13
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
13
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
3
        return;
2065
3
    }
2066
2067
10
    const auto filtered = filter(results);
2068
2069
10
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
10
        return;
2072
10
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
15
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
15
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
3
        return;
2065
3
    }
2066
2067
12
    const auto filtered = filter(results);
2068
2069
12
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
12
        return;
2072
12
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
14
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
14
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
3
        return;
2065
3
    }
2066
2067
11
    const auto filtered = filter(results);
2068
2069
11
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
11
        return;
2072
11
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
16
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
3
        return;
2065
3
    }
2066
2067
13
    const auto filtered = filter(results);
2068
2069
13
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
13
        return;
2072
13
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
16
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
9
        return;
2065
9
    }
2066
2067
7
    const auto filtered = filter(results);
2068
2069
7
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
7
        return;
2072
7
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
51
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
51
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
35
        return;
2065
35
    }
2066
2067
16
    const auto filtered = filter(results);
2068
2069
16
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
16
        return;
2072
16
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
47
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
35
        return;
2065
35
    }
2066
2067
12
    const auto filtered = filter(results);
2068
2069
12
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
12
        return;
2072
12
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
56
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
56
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
33
        return;
2065
33
    }
2066
2067
23
    const auto filtered = filter(results);
2068
2069
23
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
23
        return;
2072
23
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
34
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
21
        return;
2065
21
    }
2066
2067
13
    const auto filtered = filter(results);
2068
2069
13
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
13
        return;
2072
13
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
58
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
40
        return;
2065
40
    }
2066
2067
18
    const auto filtered = filter(results);
2068
2069
18
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
18
        return;
2072
18
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
44
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
30
        return;
2065
30
    }
2066
2067
14
    const auto filtered = filter(results);
2068
2069
14
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
14
        return;
2072
14
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
57
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
40
        return;
2065
40
    }
2066
2067
17
    const auto filtered = filter(results);
2068
2069
17
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
17
        return;
2072
17
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
51
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
51
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
40
        return;
2065
40
    }
2066
2067
11
    const auto filtered = filter(results);
2068
2069
11
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
11
        return;
2072
11
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2062
16
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
1
        return;
2065
1
    }
2066
2067
15
    const auto filtered = filter(results);
2068
2069
15
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
15
        return;
2072
15
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
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
2061
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 {
2062
26
    if ( results.size() < 2 ) {
2063
        /* Nothing to compare. Don't even bother filtering. */
2064
8
        return;
2065
8
    }
2066
2067
18
    const auto filtered = filter(results);
2068
2069
18
    if ( filtered.size() < 2 ) {
2070
        /* Nothing to compare */
2071
18
        return;
2072
18
    }
2073
2074
0
    if ( dontCompare(operations[0].second) == true ) {
2075
0
        return;
2076
0
    }
2077
2078
0
    for (size_t i = 1; i < filtered.size(); i++) {
2079
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2080
0
        const std::optional<ResultType>& cur = filtered[i].second;
2081
2082
0
        const bool equal = *prev == *cur;
2083
2084
0
        if ( !equal ) {
2085
            /* Reconstruct operation */
2086
0
            const auto op = getOp(nullptr, data, size);
2087
2088
0
            printf("Difference detected\n\n");
2089
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2090
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2091
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2092
2093
0
            abort(
2094
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2095
0
                    op.Name(),
2096
0
                    op.GetAlgorithmString(),
2097
0
                    "difference"
2098
0
            );
2099
0
        }
2100
0
    }
2101
0
}
2102
2103
template <class ResultType, class OperationType>
2104
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2105
0
    std::sort(moduleNames.begin(), moduleNames.end());
2106
2107
0
    printf("Assertion failure: ");
2108
0
    for (const auto& moduleName : moduleNames) {
2109
0
        printf("%s-", moduleName.c_str());
2110
0
    }
2111
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2112
0
    fflush(stdout);
2113
2114
0
    ::abort();
2115
0
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::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::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<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
2116
2117
template <class ResultType, class OperationType>
2118
161k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
161k
    (void)parentDs;
2120
161k
    return std::move(op);
2121
161k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2118
950
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
950
    (void)parentDs;
2120
950
    return std::move(op);
2121
950
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2118
729
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
729
    (void)parentDs;
2120
729
    return std::move(op);
2121
729
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2118
141
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
141
    (void)parentDs;
2120
141
    return std::move(op);
2121
141
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2118
150
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
150
    (void)parentDs;
2120
150
    return std::move(op);
2121
150
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2118
888
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
888
    (void)parentDs;
2120
888
    return std::move(op);
2121
888
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2118
925
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
925
    (void)parentDs;
2120
925
    return std::move(op);
2121
925
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2118
246
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
246
    (void)parentDs;
2120
246
    return std::move(op);
2121
246
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2118
315
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
315
    (void)parentDs;
2120
315
    return std::move(op);
2121
315
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2118
281
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
281
    (void)parentDs;
2120
281
    return std::move(op);
2121
281
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2118
294
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
294
    (void)parentDs;
2120
294
    return std::move(op);
2121
294
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2118
310
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
310
    (void)parentDs;
2120
310
    return std::move(op);
2121
310
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2118
187
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
187
    (void)parentDs;
2120
187
    return std::move(op);
2121
187
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2118
55
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
55
    (void)parentDs;
2120
55
    return std::move(op);
2121
55
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2118
217
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
217
    (void)parentDs;
2120
217
    return std::move(op);
2121
217
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2118
346
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
346
    (void)parentDs;
2120
346
    return std::move(op);
2121
346
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2118
18
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
18
    (void)parentDs;
2120
18
    return std::move(op);
2121
18
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2118
300
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
300
    (void)parentDs;
2120
300
    return std::move(op);
2121
300
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2118
7.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
7.83k
    (void)parentDs;
2120
7.83k
    return std::move(op);
2121
7.83k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2118
8.43k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
8.43k
    (void)parentDs;
2120
8.43k
    return std::move(op);
2121
8.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2118
9.03k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
9.03k
    (void)parentDs;
2120
9.03k
    return std::move(op);
2121
9.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2118
11.5k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
11.5k
    (void)parentDs;
2120
11.5k
    return std::move(op);
2121
11.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2118
59
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
59
    (void)parentDs;
2120
59
    return std::move(op);
2121
59
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2118
86
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
86
    (void)parentDs;
2120
86
    return std::move(op);
2121
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2118
76
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
76
    (void)parentDs;
2120
76
    return std::move(op);
2121
76
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2118
6.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
6.98k
    (void)parentDs;
2120
6.98k
    return std::move(op);
2121
6.98k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2118
73
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
73
    (void)parentDs;
2120
73
    return std::move(op);
2121
73
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2118
55
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
55
    (void)parentDs;
2120
55
    return std::move(op);
2121
55
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2118
56
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
56
    (void)parentDs;
2120
56
    return std::move(op);
2121
56
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2118
76
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
76
    (void)parentDs;
2120
76
    return std::move(op);
2121
76
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2118
1.47k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
1.47k
    (void)parentDs;
2120
1.47k
    return std::move(op);
2121
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2118
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
2.52k
    (void)parentDs;
2120
2.52k
    return std::move(op);
2121
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2118
2.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
2.04k
    (void)parentDs;
2120
2.04k
    return std::move(op);
2121
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2118
4.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
4.06k
    (void)parentDs;
2120
4.06k
    return std::move(op);
2121
4.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2118
5.36k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
5.36k
    (void)parentDs;
2120
5.36k
    return std::move(op);
2121
5.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2118
62
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
62
    (void)parentDs;
2120
62
    return std::move(op);
2121
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2118
73
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
73
    (void)parentDs;
2120
73
    return std::move(op);
2121
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2118
6.99k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
6.99k
    (void)parentDs;
2120
6.99k
    return std::move(op);
2121
6.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2118
3.88k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
3.88k
    (void)parentDs;
2120
3.88k
    return std::move(op);
2121
3.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2118
81.4k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
81.4k
    (void)parentDs;
2120
81.4k
    return std::move(op);
2121
81.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2118
111
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
111
    (void)parentDs;
2120
111
    return std::move(op);
2121
111
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2118
325
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
325
    (void)parentDs;
2120
325
    return std::move(op);
2121
325
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2118
112
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
112
    (void)parentDs;
2120
112
    return std::move(op);
2121
112
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2118
96
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
96
    (void)parentDs;
2120
96
    return std::move(op);
2121
96
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2118
85
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
85
    (void)parentDs;
2120
85
    return std::move(op);
2121
85
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2118
58
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
58
    (void)parentDs;
2120
58
    return std::move(op);
2121
58
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2118
94
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
94
    (void)parentDs;
2120
94
    return std::move(op);
2121
94
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2118
31
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
31
    (void)parentDs;
2120
31
    return std::move(op);
2121
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2118
77
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
77
    (void)parentDs;
2120
77
    return std::move(op);
2121
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2118
80
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
80
    (void)parentDs;
2120
80
    return std::move(op);
2121
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2118
89
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
89
    (void)parentDs;
2120
89
    return std::move(op);
2121
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2118
85
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
85
    (void)parentDs;
2120
85
    return std::move(op);
2121
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2118
85
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
85
    (void)parentDs;
2120
85
    return std::move(op);
2121
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2118
76
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
76
    (void)parentDs;
2120
76
    return std::move(op);
2121
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2118
89
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
89
    (void)parentDs;
2120
89
    return std::move(op);
2121
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2118
72
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
72
    (void)parentDs;
2120
72
    return std::move(op);
2121
72
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2118
57
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
57
    (void)parentDs;
2120
57
    return std::move(op);
2121
57
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2118
78
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
78
    (void)parentDs;
2120
78
    return std::move(op);
2121
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2118
118
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
118
    (void)parentDs;
2120
118
    return std::move(op);
2121
118
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2118
60
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
60
    (void)parentDs;
2120
60
    return std::move(op);
2121
60
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2118
69
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
69
    (void)parentDs;
2120
69
    return std::move(op);
2121
69
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2118
90
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
90
    (void)parentDs;
2120
90
    return std::move(op);
2121
90
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2118
79
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
79
    (void)parentDs;
2120
79
    return std::move(op);
2121
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2118
50
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
50
    (void)parentDs;
2120
50
    return std::move(op);
2121
50
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2118
104
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
104
    (void)parentDs;
2120
104
    return std::move(op);
2121
104
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2118
92
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
92
    (void)parentDs;
2120
92
    return std::move(op);
2121
92
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2118
122
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
122
    (void)parentDs;
2120
122
    return std::move(op);
2121
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2118
92
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
92
    (void)parentDs;
2120
92
    return std::move(op);
2121
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2118
126
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
126
    (void)parentDs;
2120
126
    return std::move(op);
2121
126
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2118
88
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
88
    (void)parentDs;
2120
88
    return std::move(op);
2121
88
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2118
115
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
115
    (void)parentDs;
2120
115
    return std::move(op);
2121
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2118
105
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
105
    (void)parentDs;
2120
105
    return std::move(op);
2121
105
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2118
63
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
63
    (void)parentDs;
2120
63
    return std::move(op);
2121
63
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2118
101
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2119
101
    (void)parentDs;
2120
101
    return std::move(op);
2121
101
}
2122
2123
11
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2124
11
    (void)parentDs;
2125
11
    op.modulo = modulo;
2126
11
    return op;
2127
11
}
2128
2129
20
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2130
20
    (void)parentDs;
2131
20
    op.modulo = modulo;
2132
20
    return op;
2133
20
}
2134
2135
5
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2136
5
    (void)parentDs;
2137
5
    op.modulo = modulo;
2138
5
    return op;
2139
5
}
2140
2141
7
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2142
7
    (void)parentDs;
2143
7
    op.modulo = modulo;
2144
7
    return op;
2145
7
}
2146
2147
13
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2148
13
    (void)parentDs;
2149
13
    op.modulo = modulo;
2150
13
    return op;
2151
13
}
2152
2153
13
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2154
13
    (void)parentDs;
2155
13
    op.modulo = modulo;
2156
13
    return op;
2157
13
}
2158
2159
10
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2160
10
    (void)parentDs;
2161
10
    op.modulo = modulo;
2162
10
    return op;
2163
10
}
2164
2165
7
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2166
7
    (void)parentDs;
2167
7
    op.modulo = modulo;
2168
7
    return op;
2169
7
}
2170
2171
8
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2172
8
    (void)parentDs;
2173
8
    op.modulo = modulo;
2174
8
    return op;
2175
8
}
2176
2177
8
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2178
8
    (void)parentDs;
2179
8
    op.modulo = modulo;
2180
8
    return op;
2181
8
}
2182
2183
12
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2184
12
    (void)parentDs;
2185
12
    op.modulo = modulo;
2186
12
    return op;
2187
12
}
2188
2189
11
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2190
11
    (void)parentDs;
2191
11
    op.modulo = modulo;
2192
11
    return op;
2193
11
}
2194
2195
17
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2196
17
    (void)parentDs;
2197
17
    op.modulo = modulo;
2198
17
    return op;
2199
17
}
2200
2201
6
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2202
6
    (void)parentDs;
2203
6
    op.modulo = modulo;
2204
6
    return op;
2205
6
}
2206
2207
3
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2208
3
    (void)parentDs;
2209
3
    op.modulo = modulo;
2210
3
    return op;
2211
3
}
2212
2213
8
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2214
8
    (void)parentDs;
2215
8
    op.modulo = modulo;
2216
8
    return op;
2217
8
}
2218
2219
6
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2220
6
    (void)parentDs;
2221
6
    op.modulo = modulo;
2222
6
    return op;
2223
6
}
2224
2225
template <class ResultType, class OperationType>
2226
163k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
163k
    Datasource ds(data, size);
2228
163k
    if ( parentDs != nullptr ) {
2229
163k
        auto modifier = parentDs->GetData(0);
2230
163k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
163k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
163k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
961
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
961
    Datasource ds(data, size);
2228
961
    if ( parentDs != nullptr ) {
2229
961
        auto modifier = parentDs->GetData(0);
2230
961
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
961
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
961
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
734
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
734
    Datasource ds(data, size);
2228
734
    if ( parentDs != nullptr ) {
2229
734
        auto modifier = parentDs->GetData(0);
2230
734
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
734
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
734
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
158
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
158
    Datasource ds(data, size);
2228
158
    if ( parentDs != nullptr ) {
2229
158
        auto modifier = parentDs->GetData(0);
2230
158
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
158
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
158
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
156
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
156
    Datasource ds(data, size);
2228
156
    if ( parentDs != nullptr ) {
2229
156
        auto modifier = parentDs->GetData(0);
2230
156
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
156
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
156
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
900
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
900
    Datasource ds(data, size);
2228
900
    if ( parentDs != nullptr ) {
2229
900
        auto modifier = parentDs->GetData(0);
2230
900
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
900
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
900
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
938
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
938
    Datasource ds(data, size);
2228
938
    if ( parentDs != nullptr ) {
2229
938
        auto modifier = parentDs->GetData(0);
2230
938
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
938
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
938
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
252
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
252
    Datasource ds(data, size);
2228
252
    if ( parentDs != nullptr ) {
2229
252
        auto modifier = parentDs->GetData(0);
2230
252
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
252
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
252
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
326
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
326
    Datasource ds(data, size);
2228
326
    if ( parentDs != nullptr ) {
2229
326
        auto modifier = parentDs->GetData(0);
2230
326
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
326
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
326
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
289
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
289
    Datasource ds(data, size);
2228
289
    if ( parentDs != nullptr ) {
2229
289
        auto modifier = parentDs->GetData(0);
2230
289
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
289
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
289
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
304
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
304
    Datasource ds(data, size);
2228
304
    if ( parentDs != nullptr ) {
2229
304
        auto modifier = parentDs->GetData(0);
2230
304
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
304
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
304
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
319
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
319
    Datasource ds(data, size);
2228
319
    if ( parentDs != nullptr ) {
2229
319
        auto modifier = parentDs->GetData(0);
2230
319
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
319
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
319
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
196
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
196
    Datasource ds(data, size);
2228
196
    if ( parentDs != nullptr ) {
2229
196
        auto modifier = parentDs->GetData(0);
2230
196
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
196
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
196
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
63
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
63
    Datasource ds(data, size);
2228
63
    if ( parentDs != nullptr ) {
2229
63
        auto modifier = parentDs->GetData(0);
2230
63
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
63
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
63
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
234
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
234
    Datasource ds(data, size);
2228
234
    if ( parentDs != nullptr ) {
2229
234
        auto modifier = parentDs->GetData(0);
2230
234
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
234
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
234
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
352
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
352
    Datasource ds(data, size);
2228
352
    if ( parentDs != nullptr ) {
2229
352
        auto modifier = parentDs->GetData(0);
2230
352
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
352
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
352
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
21
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
21
    Datasource ds(data, size);
2228
21
    if ( parentDs != nullptr ) {
2229
21
        auto modifier = parentDs->GetData(0);
2230
21
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
21
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
21
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
315
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
315
    Datasource ds(data, size);
2228
315
    if ( parentDs != nullptr ) {
2229
315
        auto modifier = parentDs->GetData(0);
2230
315
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
315
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
315
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
7.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
7.88k
    Datasource ds(data, size);
2228
7.88k
    if ( parentDs != nullptr ) {
2229
7.88k
        auto modifier = parentDs->GetData(0);
2230
7.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
7.88k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
7.88k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
8.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
8.52k
    Datasource ds(data, size);
2228
8.52k
    if ( parentDs != nullptr ) {
2229
8.52k
        auto modifier = parentDs->GetData(0);
2230
8.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
8.52k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
8.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
9.07k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
9.07k
    Datasource ds(data, size);
2228
9.07k
    if ( parentDs != nullptr ) {
2229
9.07k
        auto modifier = parentDs->GetData(0);
2230
9.07k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
9.07k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
9.07k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
11.6k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
11.6k
    Datasource ds(data, size);
2228
11.6k
    if ( parentDs != nullptr ) {
2229
11.6k
        auto modifier = parentDs->GetData(0);
2230
11.6k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
11.6k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
11.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
66
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
66
    Datasource ds(data, size);
2228
66
    if ( parentDs != nullptr ) {
2229
66
        auto modifier = parentDs->GetData(0);
2230
66
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
66
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
95
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
95
    Datasource ds(data, size);
2228
95
    if ( parentDs != nullptr ) {
2229
95
        auto modifier = parentDs->GetData(0);
2230
95
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
95
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
95
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
85
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
85
    Datasource ds(data, size);
2228
85
    if ( parentDs != nullptr ) {
2229
85
        auto modifier = parentDs->GetData(0);
2230
85
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
85
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
85
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
7.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
7.06k
    Datasource ds(data, size);
2228
7.06k
    if ( parentDs != nullptr ) {
2229
7.06k
        auto modifier = parentDs->GetData(0);
2230
7.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
7.06k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
7.06k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
81
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
81
    Datasource ds(data, size);
2228
81
    if ( parentDs != nullptr ) {
2229
81
        auto modifier = parentDs->GetData(0);
2230
81
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
81
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
81
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
62
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
62
    Datasource ds(data, size);
2228
62
    if ( parentDs != nullptr ) {
2229
62
        auto modifier = parentDs->GetData(0);
2230
62
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
62
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
62
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
62
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
62
    Datasource ds(data, size);
2228
62
    if ( parentDs != nullptr ) {
2229
62
        auto modifier = parentDs->GetData(0);
2230
62
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
62
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
83
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
83
    Datasource ds(data, size);
2228
83
    if ( parentDs != nullptr ) {
2229
83
        auto modifier = parentDs->GetData(0);
2230
83
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
83
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
83
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
1.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
1.52k
    Datasource ds(data, size);
2228
1.52k
    if ( parentDs != nullptr ) {
2229
1.52k
        auto modifier = parentDs->GetData(0);
2230
1.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
1.52k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
1.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
2.59k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
2.59k
    Datasource ds(data, size);
2228
2.59k
    if ( parentDs != nullptr ) {
2229
2.59k
        auto modifier = parentDs->GetData(0);
2230
2.59k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
2.59k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
2.59k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
2.12k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
2.12k
    Datasource ds(data, size);
2228
2.12k
    if ( parentDs != nullptr ) {
2229
2.12k
        auto modifier = parentDs->GetData(0);
2230
2.12k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
2.12k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
2.12k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
4.21k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
4.21k
    Datasource ds(data, size);
2228
4.21k
    if ( parentDs != nullptr ) {
2229
4.21k
        auto modifier = parentDs->GetData(0);
2230
4.21k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
4.21k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
4.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
5.48k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
5.48k
    Datasource ds(data, size);
2228
5.48k
    if ( parentDs != nullptr ) {
2229
5.48k
        auto modifier = parentDs->GetData(0);
2230
5.48k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
5.48k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
5.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
65
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
65
    Datasource ds(data, size);
2228
65
    if ( parentDs != nullptr ) {
2229
65
        auto modifier = parentDs->GetData(0);
2230
65
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
65
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
65
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
83
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
83
    Datasource ds(data, size);
2228
83
    if ( parentDs != nullptr ) {
2229
83
        auto modifier = parentDs->GetData(0);
2230
83
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
83
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
83
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
7.15k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
7.15k
    Datasource ds(data, size);
2228
7.15k
    if ( parentDs != nullptr ) {
2229
7.15k
        auto modifier = parentDs->GetData(0);
2230
7.15k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
7.15k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
7.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
4.00k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
4.00k
    Datasource ds(data, size);
2228
4.00k
    if ( parentDs != nullptr ) {
2229
4.00k
        auto modifier = parentDs->GetData(0);
2230
4.00k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
4.00k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
4.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
81.7k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
81.7k
    Datasource ds(data, size);
2228
81.7k
    if ( parentDs != nullptr ) {
2229
81.7k
        auto modifier = parentDs->GetData(0);
2230
81.7k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
81.7k
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
81.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
121
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
121
    Datasource ds(data, size);
2228
121
    if ( parentDs != nullptr ) {
2229
121
        auto modifier = parentDs->GetData(0);
2230
121
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
121
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
121
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
342
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
342
    Datasource ds(data, size);
2228
342
    if ( parentDs != nullptr ) {
2229
342
        auto modifier = parentDs->GetData(0);
2230
342
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
342
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
342
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
118
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
118
    Datasource ds(data, size);
2228
118
    if ( parentDs != nullptr ) {
2229
118
        auto modifier = parentDs->GetData(0);
2230
118
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
118
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
118
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
101
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
101
    Datasource ds(data, size);
2228
101
    if ( parentDs != nullptr ) {
2229
101
        auto modifier = parentDs->GetData(0);
2230
101
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
101
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
101
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
97
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
97
    Datasource ds(data, size);
2228
97
    if ( parentDs != nullptr ) {
2229
97
        auto modifier = parentDs->GetData(0);
2230
97
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
97
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
97
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
66
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
66
    Datasource ds(data, size);
2228
66
    if ( parentDs != nullptr ) {
2229
66
        auto modifier = parentDs->GetData(0);
2230
66
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
66
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
128
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
128
    Datasource ds(data, size);
2228
128
    if ( parentDs != nullptr ) {
2229
128
        auto modifier = parentDs->GetData(0);
2230
128
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
128
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
128
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
53
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
53
    Datasource ds(data, size);
2228
53
    if ( parentDs != nullptr ) {
2229
53
        auto modifier = parentDs->GetData(0);
2230
53
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
53
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
53
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
97
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
97
    Datasource ds(data, size);
2228
97
    if ( parentDs != nullptr ) {
2229
97
        auto modifier = parentDs->GetData(0);
2230
97
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
97
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
97
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
100
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
100
    Datasource ds(data, size);
2228
100
    if ( parentDs != nullptr ) {
2229
100
        auto modifier = parentDs->GetData(0);
2230
100
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
100
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
100
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
99
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
99
    Datasource ds(data, size);
2228
99
    if ( parentDs != nullptr ) {
2229
99
        auto modifier = parentDs->GetData(0);
2230
99
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
99
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
99
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
93
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
93
    Datasource ds(data, size);
2228
93
    if ( parentDs != nullptr ) {
2229
93
        auto modifier = parentDs->GetData(0);
2230
93
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
93
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
100
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
100
    Datasource ds(data, size);
2228
100
    if ( parentDs != nullptr ) {
2229
100
        auto modifier = parentDs->GetData(0);
2230
100
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
100
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
100
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
81
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
81
    Datasource ds(data, size);
2228
81
    if ( parentDs != nullptr ) {
2229
81
        auto modifier = parentDs->GetData(0);
2230
81
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
81
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
95
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
95
    Datasource ds(data, size);
2228
95
    if ( parentDs != nullptr ) {
2229
95
        auto modifier = parentDs->GetData(0);
2230
95
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
95
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
95
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
81
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
81
    Datasource ds(data, size);
2228
81
    if ( parentDs != nullptr ) {
2229
81
        auto modifier = parentDs->GetData(0);
2230
81
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
81
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
63
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
63
    Datasource ds(data, size);
2228
63
    if ( parentDs != nullptr ) {
2229
63
        auto modifier = parentDs->GetData(0);
2230
63
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
63
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
63
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
82
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
82
    Datasource ds(data, size);
2228
82
    if ( parentDs != nullptr ) {
2229
82
        auto modifier = parentDs->GetData(0);
2230
82
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
82
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
82
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
124
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
124
    Datasource ds(data, size);
2228
124
    if ( parentDs != nullptr ) {
2229
124
        auto modifier = parentDs->GetData(0);
2230
124
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
124
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
124
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
68
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
68
    Datasource ds(data, size);
2228
68
    if ( parentDs != nullptr ) {
2229
68
        auto modifier = parentDs->GetData(0);
2230
68
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
68
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
68
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
72
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
72
    Datasource ds(data, size);
2228
72
    if ( parentDs != nullptr ) {
2229
72
        auto modifier = parentDs->GetData(0);
2230
72
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
72
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
72
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
96
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
96
    Datasource ds(data, size);
2228
96
    if ( parentDs != nullptr ) {
2229
96
        auto modifier = parentDs->GetData(0);
2230
96
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
96
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
96
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
82
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
82
    Datasource ds(data, size);
2228
82
    if ( parentDs != nullptr ) {
2229
82
        auto modifier = parentDs->GetData(0);
2230
82
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
82
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
54
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
54
    Datasource ds(data, size);
2228
54
    if ( parentDs != nullptr ) {
2229
54
        auto modifier = parentDs->GetData(0);
2230
54
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
54
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
54
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
107
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
107
    Datasource ds(data, size);
2228
107
    if ( parentDs != nullptr ) {
2229
107
        auto modifier = parentDs->GetData(0);
2230
107
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
107
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
107
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
98
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
98
    Datasource ds(data, size);
2228
98
    if ( parentDs != nullptr ) {
2229
98
        auto modifier = parentDs->GetData(0);
2230
98
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
98
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
98
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
127
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
127
    Datasource ds(data, size);
2228
127
    if ( parentDs != nullptr ) {
2229
127
        auto modifier = parentDs->GetData(0);
2230
127
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
127
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
127
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
97
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
97
    Datasource ds(data, size);
2228
97
    if ( parentDs != nullptr ) {
2229
97
        auto modifier = parentDs->GetData(0);
2230
97
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
97
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
97
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
136
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
136
    Datasource ds(data, size);
2228
136
    if ( parentDs != nullptr ) {
2229
136
        auto modifier = parentDs->GetData(0);
2230
136
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
136
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
136
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
94
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
94
    Datasource ds(data, size);
2228
94
    if ( parentDs != nullptr ) {
2229
94
        auto modifier = parentDs->GetData(0);
2230
94
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
94
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
94
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
123
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
123
    Datasource ds(data, size);
2228
123
    if ( parentDs != nullptr ) {
2229
123
        auto modifier = parentDs->GetData(0);
2230
123
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
123
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
123
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
112
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
112
    Datasource ds(data, size);
2228
112
    if ( parentDs != nullptr ) {
2229
112
        auto modifier = parentDs->GetData(0);
2230
112
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
112
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
112
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
67
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
67
    Datasource ds(data, size);
2228
67
    if ( parentDs != nullptr ) {
2229
67
        auto modifier = parentDs->GetData(0);
2230
67
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
67
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2226
114
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2227
114
    Datasource ds(data, size);
2228
114
    if ( parentDs != nullptr ) {
2229
114
        auto modifier = parentDs->GetData(0);
2230
114
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2231
114
    } else {
2232
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2233
0
    }
2234
114
}
2235
2236
template <class ResultType, class OperationType>
2237
161k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
161k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
161k
    if ( options.forceModule != std::nullopt ) {
2242
159k
        moduleID = *options.forceModule;
2243
159k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
161k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
161k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
161k
    return modules.at(moduleID);
2255
161k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
950
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
950
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
950
    if ( options.forceModule != std::nullopt ) {
2242
936
        moduleID = *options.forceModule;
2243
936
    }
2244
2245
    /* Skip if this is a disabled module */
2246
950
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
950
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
950
    return modules.at(moduleID);
2255
950
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
729
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
729
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
729
    if ( options.forceModule != std::nullopt ) {
2242
722
        moduleID = *options.forceModule;
2243
722
    }
2244
2245
    /* Skip if this is a disabled module */
2246
729
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
729
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
729
    return modules.at(moduleID);
2255
729
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
141
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
141
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
141
    if ( options.forceModule != std::nullopt ) {
2242
133
        moduleID = *options.forceModule;
2243
133
    }
2244
2245
    /* Skip if this is a disabled module */
2246
141
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
141
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
141
    return modules.at(moduleID);
2255
141
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
150
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
150
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
150
    if ( options.forceModule != std::nullopt ) {
2242
142
        moduleID = *options.forceModule;
2243
142
    }
2244
2245
    /* Skip if this is a disabled module */
2246
150
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
150
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
150
    return modules.at(moduleID);
2255
150
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
888
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
888
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
888
    if ( options.forceModule != std::nullopt ) {
2242
876
        moduleID = *options.forceModule;
2243
876
    }
2244
2245
    /* Skip if this is a disabled module */
2246
888
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
888
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
888
    return modules.at(moduleID);
2255
888
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
925
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
925
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
925
    if ( options.forceModule != std::nullopt ) {
2242
915
        moduleID = *options.forceModule;
2243
915
    }
2244
2245
    /* Skip if this is a disabled module */
2246
925
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
925
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
925
    return modules.at(moduleID);
2255
925
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
246
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
246
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
246
    if ( options.forceModule != std::nullopt ) {
2242
235
        moduleID = *options.forceModule;
2243
235
    }
2244
2245
    /* Skip if this is a disabled module */
2246
246
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
246
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
246
    return modules.at(moduleID);
2255
246
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
315
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
315
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
315
    if ( options.forceModule != std::nullopt ) {
2242
301
        moduleID = *options.forceModule;
2243
301
    }
2244
2245
    /* Skip if this is a disabled module */
2246
315
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
315
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
315
    return modules.at(moduleID);
2255
315
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
281
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
281
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
281
    if ( options.forceModule != std::nullopt ) {
2242
267
        moduleID = *options.forceModule;
2243
267
    }
2244
2245
    /* Skip if this is a disabled module */
2246
281
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
281
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
281
    return modules.at(moduleID);
2255
281
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
294
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
294
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
294
    if ( options.forceModule != std::nullopt ) {
2242
285
        moduleID = *options.forceModule;
2243
285
    }
2244
2245
    /* Skip if this is a disabled module */
2246
294
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
294
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
294
    return modules.at(moduleID);
2255
294
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
310
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
310
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
310
    if ( options.forceModule != std::nullopt ) {
2242
299
        moduleID = *options.forceModule;
2243
299
    }
2244
2245
    /* Skip if this is a disabled module */
2246
310
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
310
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
310
    return modules.at(moduleID);
2255
310
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
187
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
187
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
187
    if ( options.forceModule != std::nullopt ) {
2242
179
        moduleID = *options.forceModule;
2243
179
    }
2244
2245
    /* Skip if this is a disabled module */
2246
187
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
187
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
187
    return modules.at(moduleID);
2255
187
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
55
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
55
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
55
    if ( options.forceModule != std::nullopt ) {
2242
50
        moduleID = *options.forceModule;
2243
50
    }
2244
2245
    /* Skip if this is a disabled module */
2246
55
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
55
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
55
    return modules.at(moduleID);
2255
55
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
217
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
217
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
217
    if ( options.forceModule != std::nullopt ) {
2242
203
        moduleID = *options.forceModule;
2243
203
    }
2244
2245
    /* Skip if this is a disabled module */
2246
217
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
217
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
217
    return modules.at(moduleID);
2255
217
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
346
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
346
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
346
    if ( options.forceModule != std::nullopt ) {
2242
333
        moduleID = *options.forceModule;
2243
333
    }
2244
2245
    /* Skip if this is a disabled module */
2246
346
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
346
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
346
    return modules.at(moduleID);
2255
346
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
18
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
18
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
18
    if ( options.forceModule != std::nullopt ) {
2242
12
        moduleID = *options.forceModule;
2243
12
    }
2244
2245
    /* Skip if this is a disabled module */
2246
18
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
18
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
18
    return modules.at(moduleID);
2255
18
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
300
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
300
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
300
    if ( options.forceModule != std::nullopt ) {
2242
288
        moduleID = *options.forceModule;
2243
288
    }
2244
2245
    /* Skip if this is a disabled module */
2246
300
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
300
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
300
    return modules.at(moduleID);
2255
300
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
7.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
7.83k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
7.83k
    if ( options.forceModule != std::nullopt ) {
2242
7.71k
        moduleID = *options.forceModule;
2243
7.71k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
7.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
7.83k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
7.83k
    return modules.at(moduleID);
2255
7.83k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
8.43k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
8.43k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
8.43k
    if ( options.forceModule != std::nullopt ) {
2242
8.18k
        moduleID = *options.forceModule;
2243
8.18k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
8.43k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
8.43k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
8.43k
    return modules.at(moduleID);
2255
8.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
9.03k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
9.03k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
9.03k
    if ( options.forceModule != std::nullopt ) {
2242
8.94k
        moduleID = *options.forceModule;
2243
8.94k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
9.03k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
9.03k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
9.03k
    return modules.at(moduleID);
2255
9.03k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
11.5k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
11.5k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
11.5k
    if ( options.forceModule != std::nullopt ) {
2242
11.4k
        moduleID = *options.forceModule;
2243
11.4k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
11.5k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
11.5k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
11.5k
    return modules.at(moduleID);
2255
11.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
59
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
59
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
59
    if ( options.forceModule != std::nullopt ) {
2242
53
        moduleID = *options.forceModule;
2243
53
    }
2244
2245
    /* Skip if this is a disabled module */
2246
59
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
59
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
59
    return modules.at(moduleID);
2255
59
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
86
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
86
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
86
    if ( options.forceModule != std::nullopt ) {
2242
79
        moduleID = *options.forceModule;
2243
79
    }
2244
2245
    /* Skip if this is a disabled module */
2246
86
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
86
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
86
    return modules.at(moduleID);
2255
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
76
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
76
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
76
    if ( options.forceModule != std::nullopt ) {
2242
71
        moduleID = *options.forceModule;
2243
71
    }
2244
2245
    /* Skip if this is a disabled module */
2246
76
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
76
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
76
    return modules.at(moduleID);
2255
76
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
6.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
6.98k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
6.98k
    if ( options.forceModule != std::nullopt ) {
2242
6.92k
        moduleID = *options.forceModule;
2243
6.92k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
6.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
6.98k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
6.98k
    return modules.at(moduleID);
2255
6.98k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
73
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
73
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
73
    if ( options.forceModule != std::nullopt ) {
2242
69
        moduleID = *options.forceModule;
2243
69
    }
2244
2245
    /* Skip if this is a disabled module */
2246
73
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
73
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
73
    return modules.at(moduleID);
2255
73
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
55
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
55
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
55
    if ( options.forceModule != std::nullopt ) {
2242
51
        moduleID = *options.forceModule;
2243
51
    }
2244
2245
    /* Skip if this is a disabled module */
2246
55
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
55
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
55
    return modules.at(moduleID);
2255
55
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
56
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
56
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
56
    if ( options.forceModule != std::nullopt ) {
2242
52
        moduleID = *options.forceModule;
2243
52
    }
2244
2245
    /* Skip if this is a disabled module */
2246
56
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
56
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
56
    return modules.at(moduleID);
2255
56
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
76
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
76
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
76
    if ( options.forceModule != std::nullopt ) {
2242
69
        moduleID = *options.forceModule;
2243
69
    }
2244
2245
    /* Skip if this is a disabled module */
2246
76
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
76
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
76
    return modules.at(moduleID);
2255
76
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
1.47k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
1.47k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
1.47k
    if ( options.forceModule != std::nullopt ) {
2242
1.42k
        moduleID = *options.forceModule;
2243
1.42k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
1.47k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
1.47k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
1.47k
    return modules.at(moduleID);
2255
1.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
2.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
2.52k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
2.52k
    if ( options.forceModule != std::nullopt ) {
2242
2.42k
        moduleID = *options.forceModule;
2243
2.42k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
2.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
2.52k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
2.52k
    return modules.at(moduleID);
2255
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
2.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
2.04k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
2.04k
    if ( options.forceModule != std::nullopt ) {
2242
1.95k
        moduleID = *options.forceModule;
2243
1.95k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
2.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
2.04k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
2.04k
    return modules.at(moduleID);
2255
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
4.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
4.06k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
4.06k
    if ( options.forceModule != std::nullopt ) {
2242
3.89k
        moduleID = *options.forceModule;
2243
3.89k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
4.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
4.06k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
4.06k
    return modules.at(moduleID);
2255
4.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
5.36k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
5.36k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
5.36k
    if ( options.forceModule != std::nullopt ) {
2242
5.28k
        moduleID = *options.forceModule;
2243
5.28k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
5.36k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
5.36k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
5.36k
    return modules.at(moduleID);
2255
5.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
62
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
62
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
62
    if ( options.forceModule != std::nullopt ) {
2242
51
        moduleID = *options.forceModule;
2243
51
    }
2244
2245
    /* Skip if this is a disabled module */
2246
62
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
62
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
62
    return modules.at(moduleID);
2255
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
73
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
73
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
73
    if ( options.forceModule != std::nullopt ) {
2242
70
        moduleID = *options.forceModule;
2243
70
    }
2244
2245
    /* Skip if this is a disabled module */
2246
73
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
73
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
73
    return modules.at(moduleID);
2255
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
6.99k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
6.99k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
6.99k
    if ( options.forceModule != std::nullopt ) {
2242
6.84k
        moduleID = *options.forceModule;
2243
6.84k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
6.99k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
6.99k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
6.99k
    return modules.at(moduleID);
2255
6.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
3.88k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
3.88k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
3.88k
    if ( options.forceModule != std::nullopt ) {
2242
3.72k
        moduleID = *options.forceModule;
2243
3.72k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
3.88k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
3.88k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
3.88k
    return modules.at(moduleID);
2255
3.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
81.6k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
81.6k
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
81.6k
    if ( options.forceModule != std::nullopt ) {
2242
81.4k
        moduleID = *options.forceModule;
2243
81.4k
    }
2244
2245
    /* Skip if this is a disabled module */
2246
81.6k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
81.6k
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
81.6k
    return modules.at(moduleID);
2255
81.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
111
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
111
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
111
    if ( options.forceModule != std::nullopt ) {
2242
109
        moduleID = *options.forceModule;
2243
109
    }
2244
2245
    /* Skip if this is a disabled module */
2246
111
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
111
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
111
    return modules.at(moduleID);
2255
111
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
325
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
325
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
325
    if ( options.forceModule != std::nullopt ) {
2242
318
        moduleID = *options.forceModule;
2243
318
    }
2244
2245
    /* Skip if this is a disabled module */
2246
325
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
325
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
325
    return modules.at(moduleID);
2255
325
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
112
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
112
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
112
    if ( options.forceModule != std::nullopt ) {
2242
104
        moduleID = *options.forceModule;
2243
104
    }
2244
2245
    /* Skip if this is a disabled module */
2246
112
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
112
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
112
    return modules.at(moduleID);
2255
112
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
96
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
96
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
96
    if ( options.forceModule != std::nullopt ) {
2242
86
        moduleID = *options.forceModule;
2243
86
    }
2244
2245
    /* Skip if this is a disabled module */
2246
96
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
96
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
96
    return modules.at(moduleID);
2255
96
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
85
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
85
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
85
    if ( options.forceModule != std::nullopt ) {
2242
79
        moduleID = *options.forceModule;
2243
79
    }
2244
2245
    /* Skip if this is a disabled module */
2246
85
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
85
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
85
    return modules.at(moduleID);
2255
85
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
58
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
58
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
58
    if ( options.forceModule != std::nullopt ) {
2242
53
        moduleID = *options.forceModule;
2243
53
    }
2244
2245
    /* Skip if this is a disabled module */
2246
58
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
58
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
58
    return modules.at(moduleID);
2255
58
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
94
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
94
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
94
    if ( options.forceModule != std::nullopt ) {
2242
75
        moduleID = *options.forceModule;
2243
75
    }
2244
2245
    /* Skip if this is a disabled module */
2246
94
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
94
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
94
    return modules.at(moduleID);
2255
94
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
31
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
31
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
31
    if ( options.forceModule != std::nullopt ) {
2242
26
        moduleID = *options.forceModule;
2243
26
    }
2244
2245
    /* Skip if this is a disabled module */
2246
31
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
31
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
31
    return modules.at(moduleID);
2255
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
77
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
77
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
77
    if ( options.forceModule != std::nullopt ) {
2242
69
        moduleID = *options.forceModule;
2243
69
    }
2244
2245
    /* Skip if this is a disabled module */
2246
77
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
77
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
77
    return modules.at(moduleID);
2255
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
80
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
80
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
80
    if ( options.forceModule != std::nullopt ) {
2242
70
        moduleID = *options.forceModule;
2243
70
    }
2244
2245
    /* Skip if this is a disabled module */
2246
80
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
80
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
80
    return modules.at(moduleID);
2255
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
89
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
89
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
89
    if ( options.forceModule != std::nullopt ) {
2242
83
        moduleID = *options.forceModule;
2243
83
    }
2244
2245
    /* Skip if this is a disabled module */
2246
89
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
89
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
89
    return modules.at(moduleID);
2255
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
85
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
85
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
85
    if ( options.forceModule != std::nullopt ) {
2242
78
        moduleID = *options.forceModule;
2243
78
    }
2244
2245
    /* Skip if this is a disabled module */
2246
85
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
85
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
85
    return modules.at(moduleID);
2255
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
85
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
85
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
85
    if ( options.forceModule != std::nullopt ) {
2242
75
        moduleID = *options.forceModule;
2243
75
    }
2244
2245
    /* Skip if this is a disabled module */
2246
85
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
85
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
85
    return modules.at(moduleID);
2255
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
76
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
76
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
76
    if ( options.forceModule != std::nullopt ) {
2242
70
        moduleID = *options.forceModule;
2243
70
    }
2244
2245
    /* Skip if this is a disabled module */
2246
76
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
76
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
76
    return modules.at(moduleID);
2255
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
89
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
89
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
89
    if ( options.forceModule != std::nullopt ) {
2242
82
        moduleID = *options.forceModule;
2243
82
    }
2244
2245
    /* Skip if this is a disabled module */
2246
89
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
89
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
89
    return modules.at(moduleID);
2255
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
72
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
72
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
72
    if ( options.forceModule != std::nullopt ) {
2242
65
        moduleID = *options.forceModule;
2243
65
    }
2244
2245
    /* Skip if this is a disabled module */
2246
72
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
72
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
72
    return modules.at(moduleID);
2255
72
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
57
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
57
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
57
    if ( options.forceModule != std::nullopt ) {
2242
51
        moduleID = *options.forceModule;
2243
51
    }
2244
2245
    /* Skip if this is a disabled module */
2246
57
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
57
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
57
    return modules.at(moduleID);
2255
57
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
78
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
78
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
78
    if ( options.forceModule != std::nullopt ) {
2242
75
        moduleID = *options.forceModule;
2243
75
    }
2244
2245
    /* Skip if this is a disabled module */
2246
78
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
78
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
78
    return modules.at(moduleID);
2255
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
118
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
118
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
118
    if ( options.forceModule != std::nullopt ) {
2242
112
        moduleID = *options.forceModule;
2243
112
    }
2244
2245
    /* Skip if this is a disabled module */
2246
118
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
118
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
118
    return modules.at(moduleID);
2255
118
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
60
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
60
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
60
    if ( options.forceModule != std::nullopt ) {
2242
53
        moduleID = *options.forceModule;
2243
53
    }
2244
2245
    /* Skip if this is a disabled module */
2246
60
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
60
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
60
    return modules.at(moduleID);
2255
60
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
69
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
69
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
69
    if ( options.forceModule != std::nullopt ) {
2242
59
        moduleID = *options.forceModule;
2243
59
    }
2244
2245
    /* Skip if this is a disabled module */
2246
69
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
69
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
69
    return modules.at(moduleID);
2255
69
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
90
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
90
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
90
    if ( options.forceModule != std::nullopt ) {
2242
79
        moduleID = *options.forceModule;
2243
79
    }
2244
2245
    /* Skip if this is a disabled module */
2246
90
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
90
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
90
    return modules.at(moduleID);
2255
90
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
79
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
79
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
79
    if ( options.forceModule != std::nullopt ) {
2242
72
        moduleID = *options.forceModule;
2243
72
    }
2244
2245
    /* Skip if this is a disabled module */
2246
79
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
79
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
79
    return modules.at(moduleID);
2255
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
50
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
50
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
50
    if ( options.forceModule != std::nullopt ) {
2242
47
        moduleID = *options.forceModule;
2243
47
    }
2244
2245
    /* Skip if this is a disabled module */
2246
50
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
50
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
50
    return modules.at(moduleID);
2255
50
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
104
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
104
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
104
    if ( options.forceModule != std::nullopt ) {
2242
99
        moduleID = *options.forceModule;
2243
99
    }
2244
2245
    /* Skip if this is a disabled module */
2246
104
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
104
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
104
    return modules.at(moduleID);
2255
104
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
92
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
92
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
92
    if ( options.forceModule != std::nullopt ) {
2242
88
        moduleID = *options.forceModule;
2243
88
    }
2244
2245
    /* Skip if this is a disabled module */
2246
92
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
92
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
92
    return modules.at(moduleID);
2255
92
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
122
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
122
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
122
    if ( options.forceModule != std::nullopt ) {
2242
116
        moduleID = *options.forceModule;
2243
116
    }
2244
2245
    /* Skip if this is a disabled module */
2246
122
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
122
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
122
    return modules.at(moduleID);
2255
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
92
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
92
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
92
    if ( options.forceModule != std::nullopt ) {
2242
85
        moduleID = *options.forceModule;
2243
85
    }
2244
2245
    /* Skip if this is a disabled module */
2246
92
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
92
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
92
    return modules.at(moduleID);
2255
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
126
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
126
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
126
    if ( options.forceModule != std::nullopt ) {
2242
119
        moduleID = *options.forceModule;
2243
119
    }
2244
2245
    /* Skip if this is a disabled module */
2246
126
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
126
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
126
    return modules.at(moduleID);
2255
126
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
88
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
88
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
88
    if ( options.forceModule != std::nullopt ) {
2242
85
        moduleID = *options.forceModule;
2243
85
    }
2244
2245
    /* Skip if this is a disabled module */
2246
88
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
88
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
88
    return modules.at(moduleID);
2255
88
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
115
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
115
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
115
    if ( options.forceModule != std::nullopt ) {
2242
107
        moduleID = *options.forceModule;
2243
107
    }
2244
2245
    /* Skip if this is a disabled module */
2246
115
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
115
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
115
    return modules.at(moduleID);
2255
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
105
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
105
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
105
    if ( options.forceModule != std::nullopt ) {
2242
98
        moduleID = *options.forceModule;
2243
98
    }
2244
2245
    /* Skip if this is a disabled module */
2246
105
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
105
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
105
    return modules.at(moduleID);
2255
105
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
63
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
63
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
63
    if ( options.forceModule != std::nullopt ) {
2242
60
        moduleID = *options.forceModule;
2243
60
    }
2244
2245
    /* Skip if this is a disabled module */
2246
63
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
63
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
63
    return modules.at(moduleID);
2255
63
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2237
101
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2238
101
    auto moduleID = ds.Get<uint64_t>();
2239
2240
    /* Override the extracted module ID with the preferred one, if specified */
2241
101
    if ( options.forceModule != std::nullopt ) {
2242
88
        moduleID = *options.forceModule;
2243
88
    }
2244
2245
    /* Skip if this is a disabled module */
2246
101
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2247
0
        return nullptr;
2248
0
    }
2249
2250
101
    if ( modules.find(moduleID) == modules.end() ) {
2251
0
        return nullptr;
2252
0
    }
2253
2254
101
    return modules.at(moduleID);
2255
101
}
2256
2257
template <class ResultType, class OperationType>
2258
118k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
118k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
118k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
163k
    do {
2264
163k
        auto op = getOp(&parentDs, data, size);
2265
163k
        auto module = getModule(parentDs);
2266
163k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
163k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
163k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2.59k
            break;
2275
2.59k
        }
2276
163k
    } while ( parentDs.Get<bool>() == true );
2277
2278
118k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
118k
#if 1
2284
118k
    {
2285
118k
        std::set<uint64_t> moduleIDs;
2286
220k
        for (const auto& m : modules ) {
2287
220k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
220k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
220k
            moduleIDs.insert(moduleID);
2295
220k
        }
2296
2297
118k
        std::set<uint64_t> operationModuleIDs;
2298
152k
        for (const auto& op : operations) {
2299
152k
            operationModuleIDs.insert(op.first->ID);
2300
152k
        }
2301
2302
118k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
118k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
118k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
118k
        for (const auto& id : addModuleIDs) {
2307
107k
            operations.push_back({ modules.at(id), operations[0].second});
2308
107k
        }
2309
118k
    }
2310
118k
#endif
2311
2312
118k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
118k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
378k
    for (size_t i = 0; i < operations.size(); i++) {
2320
260k
        auto& operation = operations[i];
2321
2322
260k
        auto& module = operation.first;
2323
260k
        auto& op = operation.second;
2324
2325
260k
        if ( i > 0 ) {
2326
147k
            auto& prevModule = operations[i-1].first;
2327
147k
            auto& prevOp = operations[i].second;
2328
2329
147k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
39.9k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
39.9k
                if ( curModifier.size() == 0 ) {
2332
7.12M
                    for (size_t j = 0; j < 512; j++) {
2333
7.10M
                        curModifier.push_back(1);
2334
7.10M
                    }
2335
26.0k
                } else {
2336
3.08M
                    for (auto& c : curModifier) {
2337
3.08M
                        c++;
2338
3.08M
                    }
2339
26.0k
                }
2340
39.9k
            }
2341
147k
        }
2342
2343
260k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
260k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
260k
        const auto& result = results.back();
2350
2351
260k
        if ( result.second != std::nullopt ) {
2352
91.0k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
91.0k
        }
2359
2360
260k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
260k
        if ( options.disableTests == false ) {
2369
260k
            tests::test(op, result.second);
2370
260k
        }
2371
2372
260k
        postprocess(module, op, result);
2373
260k
    }
2374
2375
118k
    if ( options.noCompare == false ) {
2376
112k
        compare(operations, results, data, size);
2377
112k
    }
2378
118k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
330
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
330
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
330
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
961
    do {
2264
961
        auto op = getOp(&parentDs, data, size);
2265
961
        auto module = getModule(parentDs);
2266
961
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
961
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
961
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
961
    } while ( parentDs.Get<bool>() == true );
2277
2278
330
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
330
#if 1
2284
330
    {
2285
330
        std::set<uint64_t> moduleIDs;
2286
330
        for (const auto& m : modules ) {
2287
295
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
295
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
295
            moduleIDs.insert(moduleID);
2295
295
        }
2296
2297
330
        std::set<uint64_t> operationModuleIDs;
2298
778
        for (const auto& op : operations) {
2299
778
            operationModuleIDs.insert(op.first->ID);
2300
778
        }
2301
2302
330
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
330
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
330
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
330
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
330
    }
2310
330
#endif
2311
2312
330
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
330
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
1.10k
    for (size_t i = 0; i < operations.size(); i++) {
2320
778
        auto& operation = operations[i];
2321
2322
778
        auto& module = operation.first;
2323
778
        auto& op = operation.second;
2324
2325
778
        if ( i > 0 ) {
2326
483
            auto& prevModule = operations[i-1].first;
2327
483
            auto& prevOp = operations[i].second;
2328
2329
483
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
483
                auto& curModifier = op.modifier.GetVectorPtr();
2331
483
                if ( curModifier.size() == 0 ) {
2332
151k
                    for (size_t j = 0; j < 512; j++) {
2333
151k
                        curModifier.push_back(1);
2334
151k
                    }
2335
295
                } else {
2336
1.39k
                    for (auto& c : curModifier) {
2337
1.39k
                        c++;
2338
1.39k
                    }
2339
188
                }
2340
483
            }
2341
483
        }
2342
2343
778
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
778
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
778
        const auto& result = results.back();
2350
2351
778
        if ( result.second != std::nullopt ) {
2352
542
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
542
        }
2359
2360
778
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
778
        if ( options.disableTests == false ) {
2369
778
            tests::test(op, result.second);
2370
778
        }
2371
2372
778
        postprocess(module, op, result);
2373
778
    }
2374
2375
330
    if ( options.noCompare == false ) {
2376
295
        compare(operations, results, data, size);
2377
295
    }
2378
330
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
264
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
264
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
264
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
734
    do {
2264
734
        auto op = getOp(&parentDs, data, size);
2265
734
        auto module = getModule(parentDs);
2266
734
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
734
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
734
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
734
    } while ( parentDs.Get<bool>() == true );
2277
2278
264
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
264
#if 1
2284
264
    {
2285
264
        std::set<uint64_t> moduleIDs;
2286
264
        for (const auto& m : modules ) {
2287
244
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
244
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
244
            moduleIDs.insert(moduleID);
2295
244
        }
2296
2297
264
        std::set<uint64_t> operationModuleIDs;
2298
643
        for (const auto& op : operations) {
2299
643
            operationModuleIDs.insert(op.first->ID);
2300
643
        }
2301
2302
264
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
264
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
264
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
264
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
264
    }
2310
264
#endif
2311
2312
264
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
264
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
907
    for (size_t i = 0; i < operations.size(); i++) {
2320
643
        auto& operation = operations[i];
2321
2322
643
        auto& module = operation.first;
2323
643
        auto& op = operation.second;
2324
2325
643
        if ( i > 0 ) {
2326
399
            auto& prevModule = operations[i-1].first;
2327
399
            auto& prevOp = operations[i].second;
2328
2329
399
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
399
                auto& curModifier = op.modifier.GetVectorPtr();
2331
399
                if ( curModifier.size() == 0 ) {
2332
85.6k
                    for (size_t j = 0; j < 512; j++) {
2333
85.5k
                        curModifier.push_back(1);
2334
85.5k
                    }
2335
232
                } else {
2336
9.26k
                    for (auto& c : curModifier) {
2337
9.26k
                        c++;
2338
9.26k
                    }
2339
232
                }
2340
399
            }
2341
399
        }
2342
2343
643
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
643
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
643
        const auto& result = results.back();
2350
2351
643
        if ( result.second != std::nullopt ) {
2352
355
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
355
        }
2359
2360
643
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
643
        if ( options.disableTests == false ) {
2369
643
            tests::test(op, result.second);
2370
643
        }
2371
2372
643
        postprocess(module, op, result);
2373
643
    }
2374
2375
264
    if ( options.noCompare == false ) {
2376
244
        compare(operations, results, data, size);
2377
244
    }
2378
264
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
40
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
40
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
40
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
158
    do {
2264
158
        auto op = getOp(&parentDs, data, size);
2265
158
        auto module = getModule(parentDs);
2266
158
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
158
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
158
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
158
    } while ( parentDs.Get<bool>() == true );
2277
2278
40
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
40
#if 1
2284
40
    {
2285
40
        std::set<uint64_t> moduleIDs;
2286
40
        for (const auto& m : modules ) {
2287
13
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
13
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
13
            moduleIDs.insert(moduleID);
2295
13
        }
2296
2297
40
        std::set<uint64_t> operationModuleIDs;
2298
64
        for (const auto& op : operations) {
2299
64
            operationModuleIDs.insert(op.first->ID);
2300
64
        }
2301
2302
40
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
40
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
40
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
40
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
40
    }
2310
40
#endif
2311
2312
40
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
40
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
104
    for (size_t i = 0; i < operations.size(); i++) {
2320
64
        auto& operation = operations[i];
2321
2322
64
        auto& module = operation.first;
2323
64
        auto& op = operation.second;
2324
2325
64
        if ( i > 0 ) {
2326
51
            auto& prevModule = operations[i-1].first;
2327
51
            auto& prevOp = operations[i].second;
2328
2329
51
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
51
                auto& curModifier = op.modifier.GetVectorPtr();
2331
51
                if ( curModifier.size() == 0 ) {
2332
20.0k
                    for (size_t j = 0; j < 512; j++) {
2333
19.9k
                        curModifier.push_back(1);
2334
19.9k
                    }
2335
39
                } else {
2336
322
                    for (auto& c : curModifier) {
2337
322
                        c++;
2338
322
                    }
2339
12
                }
2340
51
            }
2341
51
        }
2342
2343
64
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
64
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
64
        const auto& result = results.back();
2350
2351
64
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
64
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
64
        if ( options.disableTests == false ) {
2369
64
            tests::test(op, result.second);
2370
64
        }
2371
2372
64
        postprocess(module, op, result);
2373
64
    }
2374
2375
40
    if ( options.noCompare == false ) {
2376
13
        compare(operations, results, data, size);
2377
13
    }
2378
40
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
50
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
50
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
50
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
156
    do {
2264
156
        auto op = getOp(&parentDs, data, size);
2265
156
        auto module = getModule(parentDs);
2266
156
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
156
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
156
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
0
            break;
2275
0
        }
2276
156
    } while ( parentDs.Get<bool>() == true );
2277
2278
50
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
50
#if 1
2284
50
    {
2285
50
        std::set<uint64_t> moduleIDs;
2286
50
        for (const auto& m : modules ) {
2287
28
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
28
            moduleIDs.insert(moduleID);
2295
28
        }
2296
2297
50
        std::set<uint64_t> operationModuleIDs;
2298
97
        for (const auto& op : operations) {
2299
97
            operationModuleIDs.insert(op.first->ID);
2300
97
        }
2301
2302
50
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
50
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
50
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
50
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
50
    }
2310
50
#endif
2311
2312
50
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
50
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
147
    for (size_t i = 0; i < operations.size(); i++) {
2320
97
        auto& operation = operations[i];
2321
2322
97
        auto& module = operation.first;
2323
97
        auto& op = operation.second;
2324
2325
97
        if ( i > 0 ) {
2326
69
            auto& prevModule = operations[i-1].first;
2327
69
            auto& prevOp = operations[i].second;
2328
2329
69
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
69
                auto& curModifier = op.modifier.GetVectorPtr();
2331
69
                if ( curModifier.size() == 0 ) {
2332
14.3k
                    for (size_t j = 0; j < 512; j++) {
2333
14.3k
                        curModifier.push_back(1);
2334
14.3k
                    }
2335
41
                } else {
2336
622
                    for (auto& c : curModifier) {
2337
622
                        c++;
2338
622
                    }
2339
41
                }
2340
69
            }
2341
69
        }
2342
2343
97
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
97
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
97
        const auto& result = results.back();
2350
2351
97
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
97
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
97
        if ( options.disableTests == false ) {
2369
97
            tests::test(op, result.second);
2370
97
        }
2371
2372
97
        postprocess(module, op, result);
2373
97
    }
2374
2375
50
    if ( options.noCompare == false ) {
2376
28
        compare(operations, results, data, size);
2377
28
    }
2378
50
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
374
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
374
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
374
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
900
    do {
2264
900
        auto op = getOp(&parentDs, data, size);
2265
900
        auto module = getModule(parentDs);
2266
900
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
900
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
900
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
900
    } while ( parentDs.Get<bool>() == true );
2277
2278
374
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
374
#if 1
2284
374
    {
2285
374
        std::set<uint64_t> moduleIDs;
2286
374
        for (const auto& m : modules ) {
2287
344
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
344
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
344
            moduleIDs.insert(moduleID);
2295
344
        }
2296
2297
374
        std::set<uint64_t> operationModuleIDs;
2298
791
        for (const auto& op : operations) {
2299
791
            operationModuleIDs.insert(op.first->ID);
2300
791
        }
2301
2302
374
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
374
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
374
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
374
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
374
    }
2310
374
#endif
2311
2312
374
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
374
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
1.16k
    for (size_t i = 0; i < operations.size(); i++) {
2320
791
        auto& operation = operations[i];
2321
2322
791
        auto& module = operation.first;
2323
791
        auto& op = operation.second;
2324
2325
791
        if ( i > 0 ) {
2326
447
            auto& prevModule = operations[i-1].first;
2327
447
            auto& prevOp = operations[i].second;
2328
2329
447
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
447
                auto& curModifier = op.modifier.GetVectorPtr();
2331
447
                if ( curModifier.size() == 0 ) {
2332
95.4k
                    for (size_t j = 0; j < 512; j++) {
2333
95.2k
                        curModifier.push_back(1);
2334
95.2k
                    }
2335
261
                } else {
2336
6.12k
                    for (auto& c : curModifier) {
2337
6.12k
                        c++;
2338
6.12k
                    }
2339
261
                }
2340
447
            }
2341
447
        }
2342
2343
791
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
791
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
791
        const auto& result = results.back();
2350
2351
791
        if ( result.second != std::nullopt ) {
2352
287
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
287
        }
2359
2360
791
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
791
        if ( options.disableTests == false ) {
2369
791
            tests::test(op, result.second);
2370
791
        }
2371
2372
791
        postprocess(module, op, result);
2373
791
    }
2374
2375
374
    if ( options.noCompare == false ) {
2376
344
        compare(operations, results, data, size);
2377
344
    }
2378
374
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
305
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
305
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
305
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
938
    do {
2264
938
        auto op = getOp(&parentDs, data, size);
2265
938
        auto module = getModule(parentDs);
2266
938
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
938
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
938
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
938
    } while ( parentDs.Get<bool>() == true );
2277
2278
305
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
305
#if 1
2284
305
    {
2285
305
        std::set<uint64_t> moduleIDs;
2286
305
        for (const auto& m : modules ) {
2287
277
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
277
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
277
            moduleIDs.insert(moduleID);
2295
277
        }
2296
2297
305
        std::set<uint64_t> operationModuleIDs;
2298
847
        for (const auto& op : operations) {
2299
847
            operationModuleIDs.insert(op.first->ID);
2300
847
        }
2301
2302
305
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
305
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
305
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
305
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
305
    }
2310
305
#endif
2311
2312
305
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
305
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
1.15k
    for (size_t i = 0; i < operations.size(); i++) {
2320
847
        auto& operation = operations[i];
2321
2322
847
        auto& module = operation.first;
2323
847
        auto& op = operation.second;
2324
2325
847
        if ( i > 0 ) {
2326
570
            auto& prevModule = operations[i-1].first;
2327
570
            auto& prevOp = operations[i].second;
2328
2329
570
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
570
                auto& curModifier = op.modifier.GetVectorPtr();
2331
570
                if ( curModifier.size() == 0 ) {
2332
171k
                    for (size_t j = 0; j < 512; j++) {
2333
171k
                        curModifier.push_back(1);
2334
171k
                    }
2335
335
                } else {
2336
6.29k
                    for (auto& c : curModifier) {
2337
6.29k
                        c++;
2338
6.29k
                    }
2339
235
                }
2340
570
            }
2341
570
        }
2342
2343
847
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
847
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
847
        const auto& result = results.back();
2350
2351
847
        if ( result.second != std::nullopt ) {
2352
156
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
156
        }
2359
2360
847
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
847
        if ( options.disableTests == false ) {
2369
847
            tests::test(op, result.second);
2370
847
        }
2371
2372
847
        postprocess(module, op, result);
2373
847
    }
2374
2375
305
    if ( options.noCompare == false ) {
2376
277
        compare(operations, results, data, size);
2377
277
    }
2378
305
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
52
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
52
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
52
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
252
    do {
2264
252
        auto op = getOp(&parentDs, data, size);
2265
252
        auto module = getModule(parentDs);
2266
252
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
252
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
252
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
252
    } while ( parentDs.Get<bool>() == true );
2277
2278
52
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
52
#if 1
2284
52
    {
2285
52
        std::set<uint64_t> moduleIDs;
2286
52
        for (const auto& m : modules ) {
2287
28
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
28
            moduleIDs.insert(moduleID);
2295
28
        }
2296
2297
52
        std::set<uint64_t> operationModuleIDs;
2298
154
        for (const auto& op : operations) {
2299
154
            operationModuleIDs.insert(op.first->ID);
2300
154
        }
2301
2302
52
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
52
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
52
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
52
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
52
    }
2310
52
#endif
2311
2312
52
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
52
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
206
    for (size_t i = 0; i < operations.size(); i++) {
2320
154
        auto& operation = operations[i];
2321
2322
154
        auto& module = operation.first;
2323
154
        auto& op = operation.second;
2324
2325
154
        if ( i > 0 ) {
2326
126
            auto& prevModule = operations[i-1].first;
2327
126
            auto& prevOp = operations[i].second;
2328
2329
126
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
126
                auto& curModifier = op.modifier.GetVectorPtr();
2331
126
                if ( curModifier.size() == 0 ) {
2332
37.9k
                    for (size_t j = 0; j < 512; j++) {
2333
37.8k
                        curModifier.push_back(1);
2334
37.8k
                    }
2335
74
                } else {
2336
524
                    for (auto& c : curModifier) {
2337
524
                        c++;
2338
524
                    }
2339
52
                }
2340
126
            }
2341
126
        }
2342
2343
154
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
154
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
154
        const auto& result = results.back();
2350
2351
154
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
154
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
154
        if ( options.disableTests == false ) {
2369
154
            tests::test(op, result.second);
2370
154
        }
2371
2372
154
        postprocess(module, op, result);
2373
154
    }
2374
2375
52
    if ( options.noCompare == false ) {
2376
28
        compare(operations, results, data, size);
2377
28
    }
2378
52
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
81
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
81
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
81
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
326
    do {
2264
326
        auto op = getOp(&parentDs, data, size);
2265
326
        auto module = getModule(parentDs);
2266
326
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
326
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
326
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
326
    } while ( parentDs.Get<bool>() == true );
2277
2278
81
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
81
#if 1
2284
81
    {
2285
81
        std::set<uint64_t> moduleIDs;
2286
81
        for (const auto& m : modules ) {
2287
45
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
45
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
45
            moduleIDs.insert(moduleID);
2295
45
        }
2296
2297
81
        std::set<uint64_t> operationModuleIDs;
2298
190
        for (const auto& op : operations) {
2299
190
            operationModuleIDs.insert(op.first->ID);
2300
190
        }
2301
2302
81
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
81
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
81
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
81
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
81
    }
2310
81
#endif
2311
2312
81
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
81
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
271
    for (size_t i = 0; i < operations.size(); i++) {
2320
190
        auto& operation = operations[i];
2321
2322
190
        auto& module = operation.first;
2323
190
        auto& op = operation.second;
2324
2325
190
        if ( i > 0 ) {
2326
145
            auto& prevModule = operations[i-1].first;
2327
145
            auto& prevOp = operations[i].second;
2328
2329
145
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
145
                auto& curModifier = op.modifier.GetVectorPtr();
2331
145
                if ( curModifier.size() == 0 ) {
2332
41.5k
                    for (size_t j = 0; j < 512; j++) {
2333
41.4k
                        curModifier.push_back(1);
2334
41.4k
                    }
2335
81
                } else {
2336
684
                    for (auto& c : curModifier) {
2337
684
                        c++;
2338
684
                    }
2339
64
                }
2340
145
            }
2341
145
        }
2342
2343
190
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
190
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
190
        const auto& result = results.back();
2350
2351
190
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
190
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
190
        if ( options.disableTests == false ) {
2369
190
            tests::test(op, result.second);
2370
190
        }
2371
2372
190
        postprocess(module, op, result);
2373
190
    }
2374
2375
81
    if ( options.noCompare == false ) {
2376
45
        compare(operations, results, data, size);
2377
45
    }
2378
81
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
289
    do {
2264
289
        auto op = getOp(&parentDs, data, size);
2265
289
        auto module = getModule(parentDs);
2266
289
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
289
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
289
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
289
    } while ( parentDs.Get<bool>() == true );
2277
2278
66
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
66
#if 1
2284
66
    {
2285
66
        std::set<uint64_t> moduleIDs;
2286
66
        for (const auto& m : modules ) {
2287
35
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
35
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
35
            moduleIDs.insert(moduleID);
2295
35
        }
2296
2297
66
        std::set<uint64_t> operationModuleIDs;
2298
175
        for (const auto& op : operations) {
2299
175
            operationModuleIDs.insert(op.first->ID);
2300
175
        }
2301
2302
66
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
66
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
66
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
66
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
66
    }
2310
66
#endif
2311
2312
66
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
66
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
241
    for (size_t i = 0; i < operations.size(); i++) {
2320
175
        auto& operation = operations[i];
2321
2322
175
        auto& module = operation.first;
2323
175
        auto& op = operation.second;
2324
2325
175
        if ( i > 0 ) {
2326
140
            auto& prevModule = operations[i-1].first;
2327
140
            auto& prevOp = operations[i].second;
2328
2329
140
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
140
                auto& curModifier = op.modifier.GetVectorPtr();
2331
140
                if ( curModifier.size() == 0 ) {
2332
44.6k
                    for (size_t j = 0; j < 512; j++) {
2333
44.5k
                        curModifier.push_back(1);
2334
44.5k
                    }
2335
87
                } else {
2336
951
                    for (auto& c : curModifier) {
2337
951
                        c++;
2338
951
                    }
2339
53
                }
2340
140
            }
2341
140
        }
2342
2343
175
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
175
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
175
        const auto& result = results.back();
2350
2351
175
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
175
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
175
        if ( options.disableTests == false ) {
2369
175
            tests::test(op, result.second);
2370
175
        }
2371
2372
175
        postprocess(module, op, result);
2373
175
    }
2374
2375
66
    if ( options.noCompare == false ) {
2376
35
        compare(operations, results, data, size);
2377
35
    }
2378
66
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
62
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
62
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
62
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
304
    do {
2264
304
        auto op = getOp(&parentDs, data, size);
2265
304
        auto module = getModule(parentDs);
2266
304
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
304
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
304
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
304
    } while ( parentDs.Get<bool>() == true );
2277
2278
62
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
62
#if 1
2284
62
    {
2285
62
        std::set<uint64_t> moduleIDs;
2286
62
        for (const auto& m : modules ) {
2287
37
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
37
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
37
            moduleIDs.insert(moduleID);
2295
37
        }
2296
2297
62
        std::set<uint64_t> operationModuleIDs;
2298
161
        for (const auto& op : operations) {
2299
161
            operationModuleIDs.insert(op.first->ID);
2300
161
        }
2301
2302
62
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
62
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
62
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
62
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
62
    }
2310
62
#endif
2311
2312
62
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
62
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
223
    for (size_t i = 0; i < operations.size(); i++) {
2320
161
        auto& operation = operations[i];
2321
2322
161
        auto& module = operation.first;
2323
161
        auto& op = operation.second;
2324
2325
161
        if ( i > 0 ) {
2326
124
            auto& prevModule = operations[i-1].first;
2327
124
            auto& prevOp = operations[i].second;
2328
2329
124
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
124
                auto& curModifier = op.modifier.GetVectorPtr();
2331
124
                if ( curModifier.size() == 0 ) {
2332
35.9k
                    for (size_t j = 0; j < 512; j++) {
2333
35.8k
                        curModifier.push_back(1);
2334
35.8k
                    }
2335
70
                } else {
2336
278
                    for (auto& c : curModifier) {
2337
278
                        c++;
2338
278
                    }
2339
54
                }
2340
124
            }
2341
124
        }
2342
2343
161
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
161
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
161
        const auto& result = results.back();
2350
2351
161
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
161
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
161
        if ( options.disableTests == false ) {
2369
161
            tests::test(op, result.second);
2370
161
        }
2371
2372
161
        postprocess(module, op, result);
2373
161
    }
2374
2375
62
    if ( options.noCompare == false ) {
2376
37
        compare(operations, results, data, size);
2377
37
    }
2378
62
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
63
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
63
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
63
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
319
    do {
2264
319
        auto op = getOp(&parentDs, data, size);
2265
319
        auto module = getModule(parentDs);
2266
319
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
319
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
319
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
319
    } while ( parentDs.Get<bool>() == true );
2277
2278
63
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
63
#if 1
2284
63
    {
2285
63
        std::set<uint64_t> moduleIDs;
2286
63
        for (const auto& m : modules ) {
2287
37
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
37
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
37
            moduleIDs.insert(moduleID);
2295
37
        }
2296
2297
63
        std::set<uint64_t> operationModuleIDs;
2298
220
        for (const auto& op : operations) {
2299
220
            operationModuleIDs.insert(op.first->ID);
2300
220
        }
2301
2302
63
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
63
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
63
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
63
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
63
    }
2310
63
#endif
2311
2312
63
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
63
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
283
    for (size_t i = 0; i < operations.size(); i++) {
2320
220
        auto& operation = operations[i];
2321
2322
220
        auto& module = operation.first;
2323
220
        auto& op = operation.second;
2324
2325
220
        if ( i > 0 ) {
2326
183
            auto& prevModule = operations[i-1].first;
2327
183
            auto& prevOp = operations[i].second;
2328
2329
183
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
183
                auto& curModifier = op.modifier.GetVectorPtr();
2331
183
                if ( curModifier.size() == 0 ) {
2332
60.5k
                    for (size_t j = 0; j < 512; j++) {
2333
60.4k
                        curModifier.push_back(1);
2334
60.4k
                    }
2335
118
                } else {
2336
972
                    for (auto& c : curModifier) {
2337
972
                        c++;
2338
972
                    }
2339
65
                }
2340
183
            }
2341
183
        }
2342
2343
220
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
220
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
220
        const auto& result = results.back();
2350
2351
220
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
220
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
220
        if ( options.disableTests == false ) {
2369
220
            tests::test(op, result.second);
2370
220
        }
2371
2372
220
        postprocess(module, op, result);
2373
220
    }
2374
2375
63
    if ( options.noCompare == false ) {
2376
37
        compare(operations, results, data, size);
2377
37
    }
2378
63
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
50
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
50
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
50
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
196
    do {
2264
196
        auto op = getOp(&parentDs, data, size);
2265
196
        auto module = getModule(parentDs);
2266
196
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
196
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
196
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
196
    } while ( parentDs.Get<bool>() == true );
2277
2278
50
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
50
#if 1
2284
50
    {
2285
50
        std::set<uint64_t> moduleIDs;
2286
50
        for (const auto& m : modules ) {
2287
23
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
23
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
23
            moduleIDs.insert(moduleID);
2295
23
        }
2296
2297
50
        std::set<uint64_t> operationModuleIDs;
2298
95
        for (const auto& op : operations) {
2299
95
            operationModuleIDs.insert(op.first->ID);
2300
95
        }
2301
2302
50
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
50
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
50
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
50
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
50
    }
2310
50
#endif
2311
2312
50
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
50
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
145
    for (size_t i = 0; i < operations.size(); i++) {
2320
95
        auto& operation = operations[i];
2321
2322
95
        auto& module = operation.first;
2323
95
        auto& op = operation.second;
2324
2325
95
        if ( i > 0 ) {
2326
72
            auto& prevModule = operations[i-1].first;
2327
72
            auto& prevOp = operations[i].second;
2328
2329
72
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
72
                auto& curModifier = op.modifier.GetVectorPtr();
2331
72
                if ( curModifier.size() == 0 ) {
2332
10.7k
                    for (size_t j = 0; j < 512; j++) {
2333
10.7k
                        curModifier.push_back(1);
2334
10.7k
                    }
2335
51
                } else {
2336
331
                    for (auto& c : curModifier) {
2337
331
                        c++;
2338
331
                    }
2339
51
                }
2340
72
            }
2341
72
        }
2342
2343
95
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
95
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
95
        const auto& result = results.back();
2350
2351
95
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
95
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
95
        if ( options.disableTests == false ) {
2369
95
            tests::test(op, result.second);
2370
95
        }
2371
2372
95
        postprocess(module, op, result);
2373
95
    }
2374
2375
50
    if ( options.noCompare == false ) {
2376
23
        compare(operations, results, data, size);
2377
23
    }
2378
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
63
    do {
2264
63
        auto op = getOp(&parentDs, data, size);
2265
63
        auto module = getModule(parentDs);
2266
63
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
63
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
63
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
4
            break;
2275
4
        }
2276
63
    } while ( parentDs.Get<bool>() == true );
2277
2278
39
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
39
#if 1
2284
39
    {
2285
39
        std::set<uint64_t> moduleIDs;
2286
39
        for (const auto& m : modules ) {
2287
25
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
25
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
25
            moduleIDs.insert(moduleID);
2295
25
        }
2296
2297
39
        std::set<uint64_t> operationModuleIDs;
2298
40
        for (const auto& op : operations) {
2299
40
            operationModuleIDs.insert(op.first->ID);
2300
40
        }
2301
2302
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
39
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
39
    }
2310
39
#endif
2311
2312
39
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
39
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
79
    for (size_t i = 0; i < operations.size(); i++) {
2320
40
        auto& operation = operations[i];
2321
2322
40
        auto& module = operation.first;
2323
40
        auto& op = operation.second;
2324
2325
40
        if ( i > 0 ) {
2326
15
            auto& prevModule = operations[i-1].first;
2327
15
            auto& prevOp = operations[i].second;
2328
2329
15
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
15
                auto& curModifier = op.modifier.GetVectorPtr();
2331
15
                if ( curModifier.size() == 0 ) {
2332
4.10k
                    for (size_t j = 0; j < 512; j++) {
2333
4.09k
                        curModifier.push_back(1);
2334
4.09k
                    }
2335
8
                } else {
2336
2.36k
                    for (auto& c : curModifier) {
2337
2.36k
                        c++;
2338
2.36k
                    }
2339
7
                }
2340
15
            }
2341
15
        }
2342
2343
40
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
40
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
40
        const auto& result = results.back();
2350
2351
40
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
40
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
40
        if ( options.disableTests == false ) {
2369
40
            tests::test(op, result.second);
2370
40
        }
2371
2372
40
        postprocess(module, op, result);
2373
40
    }
2374
2375
39
    if ( options.noCompare == false ) {
2376
25
        compare(operations, results, data, size);
2377
25
    }
2378
39
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
76
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
76
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
76
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
234
    do {
2264
234
        auto op = getOp(&parentDs, data, size);
2265
234
        auto module = getModule(parentDs);
2266
234
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
234
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
234
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
0
            break;
2275
0
        }
2276
234
    } while ( parentDs.Get<bool>() == true );
2277
2278
76
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
76
#if 1
2284
76
    {
2285
76
        std::set<uint64_t> moduleIDs;
2286
76
        for (const auto& m : modules ) {
2287
40
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
40
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
40
            moduleIDs.insert(moduleID);
2295
40
        }
2296
2297
76
        std::set<uint64_t> operationModuleIDs;
2298
112
        for (const auto& op : operations) {
2299
112
            operationModuleIDs.insert(op.first->ID);
2300
112
        }
2301
2302
76
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
76
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
76
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
76
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
76
    }
2310
76
#endif
2311
2312
76
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
76
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
188
    for (size_t i = 0; i < operations.size(); i++) {
2320
112
        auto& operation = operations[i];
2321
2322
112
        auto& module = operation.first;
2323
112
        auto& op = operation.second;
2324
2325
112
        if ( i > 0 ) {
2326
72
            auto& prevModule = operations[i-1].first;
2327
72
            auto& prevOp = operations[i].second;
2328
2329
72
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
72
                auto& curModifier = op.modifier.GetVectorPtr();
2331
72
                if ( curModifier.size() == 0 ) {
2332
15.9k
                    for (size_t j = 0; j < 512; j++) {
2333
15.8k
                        curModifier.push_back(1);
2334
15.8k
                    }
2335
41
                } else {
2336
2.58k
                    for (auto& c : curModifier) {
2337
2.58k
                        c++;
2338
2.58k
                    }
2339
41
                }
2340
72
            }
2341
72
        }
2342
2343
112
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
112
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
112
        const auto& result = results.back();
2350
2351
112
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
112
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
112
        if ( options.disableTests == false ) {
2369
112
            tests::test(op, result.second);
2370
112
        }
2371
2372
112
        postprocess(module, op, result);
2373
112
    }
2374
2375
76
    if ( options.noCompare == false ) {
2376
40
        compare(operations, results, data, size);
2377
40
    }
2378
76
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
64
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
64
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
64
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
352
    do {
2264
352
        auto op = getOp(&parentDs, data, size);
2265
352
        auto module = getModule(parentDs);
2266
352
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
352
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
352
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
352
    } while ( parentDs.Get<bool>() == true );
2277
2278
64
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
64
#if 1
2284
64
    {
2285
64
        std::set<uint64_t> moduleIDs;
2286
64
        for (const auto& m : modules ) {
2287
37
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
37
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
37
            moduleIDs.insert(moduleID);
2295
37
        }
2296
2297
64
        std::set<uint64_t> operationModuleIDs;
2298
209
        for (const auto& op : operations) {
2299
209
            operationModuleIDs.insert(op.first->ID);
2300
209
        }
2301
2302
64
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
64
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
64
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
64
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
64
    }
2310
64
#endif
2311
2312
64
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
64
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
273
    for (size_t i = 0; i < operations.size(); i++) {
2320
209
        auto& operation = operations[i];
2321
2322
209
        auto& module = operation.first;
2323
209
        auto& op = operation.second;
2324
2325
209
        if ( i > 0 ) {
2326
172
            auto& prevModule = operations[i-1].first;
2327
172
            auto& prevOp = operations[i].second;
2328
2329
172
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
172
                auto& curModifier = op.modifier.GetVectorPtr();
2331
172
                if ( curModifier.size() == 0 ) {
2332
60.5k
                    for (size_t j = 0; j < 512; j++) {
2333
60.4k
                        curModifier.push_back(1);
2334
60.4k
                    }
2335
118
                } else {
2336
601
                    for (auto& c : curModifier) {
2337
601
                        c++;
2338
601
                    }
2339
54
                }
2340
172
            }
2341
172
        }
2342
2343
209
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
209
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
209
        const auto& result = results.back();
2350
2351
209
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
209
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
209
        if ( options.disableTests == false ) {
2369
209
            tests::test(op, result.second);
2370
209
        }
2371
2372
209
        postprocess(module, op, result);
2373
209
    }
2374
2375
64
    if ( options.noCompare == false ) {
2376
37
        compare(operations, results, data, size);
2377
37
    }
2378
64
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
15
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
15
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
15
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
21
    do {
2264
21
        auto op = getOp(&parentDs, data, size);
2265
21
        auto module = getModule(parentDs);
2266
21
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
21
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
21
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
3
            break;
2275
3
        }
2276
21
    } while ( parentDs.Get<bool>() == true );
2277
2278
15
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
15
#if 1
2284
15
    {
2285
15
        std::set<uint64_t> moduleIDs;
2286
15
        for (const auto& m : modules ) {
2287
4
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
4
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
4
            moduleIDs.insert(moduleID);
2295
4
        }
2296
2297
15
        std::set<uint64_t> operationModuleIDs;
2298
15
        for (const auto& op : operations) {
2299
7
            operationModuleIDs.insert(op.first->ID);
2300
7
        }
2301
2302
15
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
15
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
15
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
15
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
15
    }
2310
15
#endif
2311
2312
15
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
15
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
22
    for (size_t i = 0; i < operations.size(); i++) {
2320
7
        auto& operation = operations[i];
2321
2322
7
        auto& module = operation.first;
2323
7
        auto& op = operation.second;
2324
2325
7
        if ( i > 0 ) {
2326
3
            auto& prevModule = operations[i-1].first;
2327
3
            auto& prevOp = operations[i].second;
2328
2329
3
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
3
                auto& curModifier = op.modifier.GetVectorPtr();
2331
3
                if ( curModifier.size() == 0 ) {
2332
513
                    for (size_t j = 0; j < 512; j++) {
2333
512
                        curModifier.push_back(1);
2334
512
                    }
2335
2
                } else {
2336
11
                    for (auto& c : curModifier) {
2337
11
                        c++;
2338
11
                    }
2339
2
                }
2340
3
            }
2341
3
        }
2342
2343
7
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
7
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
7
        const auto& result = results.back();
2350
2351
7
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
7
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
7
        if ( options.disableTests == false ) {
2369
7
            tests::test(op, result.second);
2370
7
        }
2371
2372
7
        postprocess(module, op, result);
2373
7
    }
2374
2375
15
    if ( options.noCompare == false ) {
2376
4
        compare(operations, results, data, size);
2377
4
    }
2378
15
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
71
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
71
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
71
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
315
    do {
2264
315
        auto op = getOp(&parentDs, data, size);
2265
315
        auto module = getModule(parentDs);
2266
315
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
315
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
315
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
315
    } while ( parentDs.Get<bool>() == true );
2277
2278
71
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
71
#if 1
2284
71
    {
2285
71
        std::set<uint64_t> moduleIDs;
2286
71
        for (const auto& m : modules ) {
2287
40
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
40
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
40
            moduleIDs.insert(moduleID);
2295
40
        }
2296
2297
71
        std::set<uint64_t> operationModuleIDs;
2298
169
        for (const auto& op : operations) {
2299
169
            operationModuleIDs.insert(op.first->ID);
2300
169
        }
2301
2302
71
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
71
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
71
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
71
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
71
    }
2310
71
#endif
2311
2312
71
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
71
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
240
    for (size_t i = 0; i < operations.size(); i++) {
2320
169
        auto& operation = operations[i];
2321
2322
169
        auto& module = operation.first;
2323
169
        auto& op = operation.second;
2324
2325
169
        if ( i > 0 ) {
2326
129
            auto& prevModule = operations[i-1].first;
2327
129
            auto& prevOp = operations[i].second;
2328
2329
129
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
129
                auto& curModifier = op.modifier.GetVectorPtr();
2331
129
                if ( curModifier.size() == 0 ) {
2332
47.7k
                    for (size_t j = 0; j < 512; j++) {
2333
47.6k
                        curModifier.push_back(1);
2334
47.6k
                    }
2335
93
                } else {
2336
2.15k
                    for (auto& c : curModifier) {
2337
2.15k
                        c++;
2338
2.15k
                    }
2339
36
                }
2340
129
            }
2341
129
        }
2342
2343
169
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
169
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
169
        const auto& result = results.back();
2350
2351
169
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
169
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
169
        if ( options.disableTests == false ) {
2369
169
            tests::test(op, result.second);
2370
169
        }
2371
2372
169
        postprocess(module, op, result);
2373
169
    }
2374
2375
71
    if ( options.noCompare == false ) {
2376
40
        compare(operations, results, data, size);
2377
40
    }
2378
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
5.95k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
5.95k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
5.95k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
7.88k
    do {
2264
7.88k
        auto op = getOp(&parentDs, data, size);
2265
7.88k
        auto module = getModule(parentDs);
2266
7.88k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
7.88k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
7.88k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
96
            break;
2275
96
        }
2276
7.88k
    } while ( parentDs.Get<bool>() == true );
2277
2278
5.95k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
5.95k
#if 1
2284
5.95k
    {
2285
5.95k
        std::set<uint64_t> moduleIDs;
2286
11.2k
        for (const auto& m : modules ) {
2287
11.2k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
11.2k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
11.2k
            moduleIDs.insert(moduleID);
2295
11.2k
        }
2296
2297
5.95k
        std::set<uint64_t> operationModuleIDs;
2298
7.29k
        for (const auto& op : operations) {
2299
7.29k
            operationModuleIDs.insert(op.first->ID);
2300
7.29k
        }
2301
2302
5.95k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
5.95k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
5.95k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
5.95k
        for (const auto& id : addModuleIDs) {
2307
5.60k
            operations.push_back({ modules.at(id), operations[0].second});
2308
5.60k
        }
2309
5.95k
    }
2310
5.95k
#endif
2311
2312
5.95k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
5.95k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
18.8k
    for (size_t i = 0; i < operations.size(); i++) {
2320
12.9k
        auto& operation = operations[i];
2321
2322
12.9k
        auto& module = operation.first;
2323
12.9k
        auto& op = operation.second;
2324
2325
12.9k
        if ( i > 0 ) {
2326
7.25k
            auto& prevModule = operations[i-1].first;
2327
7.25k
            auto& prevOp = operations[i].second;
2328
2329
7.25k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
1.65k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
1.65k
                if ( curModifier.size() == 0 ) {
2332
435k
                    for (size_t j = 0; j < 512; j++) {
2333
434k
                        curModifier.push_back(1);
2334
434k
                    }
2335
848
                } else {
2336
19.1k
                    for (auto& c : curModifier) {
2337
19.1k
                        c++;
2338
19.1k
                    }
2339
808
                }
2340
1.65k
            }
2341
7.25k
        }
2342
2343
12.9k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
12.9k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
12.9k
        const auto& result = results.back();
2350
2351
12.9k
        if ( result.second != std::nullopt ) {
2352
5.77k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
5.77k
        }
2359
2360
12.9k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
12.9k
        if ( options.disableTests == false ) {
2369
12.9k
            tests::test(op, result.second);
2370
12.9k
        }
2371
2372
12.9k
        postprocess(module, op, result);
2373
12.9k
    }
2374
2375
5.95k
    if ( options.noCompare == false ) {
2376
5.64k
        compare(operations, results, data, size);
2377
5.64k
    }
2378
5.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
5.81k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
5.81k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
5.81k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
8.52k
    do {
2264
8.52k
        auto op = getOp(&parentDs, data, size);
2265
8.52k
        auto module = getModule(parentDs);
2266
8.52k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
8.52k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
8.52k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
113
            break;
2275
113
        }
2276
8.52k
    } while ( parentDs.Get<bool>() == true );
2277
2278
5.81k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
5.81k
#if 1
2284
5.81k
    {
2285
5.81k
        std::set<uint64_t> moduleIDs;
2286
10.6k
        for (const auto& m : modules ) {
2287
10.6k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
10.6k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
10.6k
            moduleIDs.insert(moduleID);
2295
10.6k
        }
2296
2297
5.81k
        std::set<uint64_t> operationModuleIDs;
2298
7.66k
        for (const auto& op : operations) {
2299
7.66k
            operationModuleIDs.insert(op.first->ID);
2300
7.66k
        }
2301
2302
5.81k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
5.81k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
5.81k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
5.81k
        for (const auto& id : addModuleIDs) {
2307
5.30k
            operations.push_back({ modules.at(id), operations[0].second});
2308
5.30k
        }
2309
5.81k
    }
2310
5.81k
#endif
2311
2312
5.81k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
5.81k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
18.7k
    for (size_t i = 0; i < operations.size(); i++) {
2320
12.9k
        auto& operation = operations[i];
2321
2322
12.9k
        auto& module = operation.first;
2323
12.9k
        auto& op = operation.second;
2324
2325
12.9k
        if ( i > 0 ) {
2326
7.64k
            auto& prevModule = operations[i-1].first;
2327
7.64k
            auto& prevOp = operations[i].second;
2328
2329
7.64k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
2.33k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
2.33k
                if ( curModifier.size() == 0 ) {
2332
433k
                    for (size_t j = 0; j < 512; j++) {
2333
432k
                        curModifier.push_back(1);
2334
432k
                    }
2335
1.48k
                } else {
2336
38.1k
                    for (auto& c : curModifier) {
2337
38.1k
                        c++;
2338
38.1k
                    }
2339
1.48k
                }
2340
2.33k
            }
2341
7.64k
        }
2342
2343
12.9k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
12.9k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
12.9k
        const auto& result = results.back();
2350
2351
12.9k
        if ( result.second != std::nullopt ) {
2352
6.45k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
6.45k
        }
2359
2360
12.9k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
12.9k
        if ( options.disableTests == false ) {
2369
12.9k
            tests::test(op, result.second);
2370
12.9k
        }
2371
2372
12.9k
        postprocess(module, op, result);
2373
12.9k
    }
2374
2375
5.81k
    if ( options.noCompare == false ) {
2376
5.32k
        compare(operations, results, data, size);
2377
5.32k
    }
2378
5.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
6.48k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
6.48k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
6.48k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
9.07k
    do {
2264
9.07k
        auto op = getOp(&parentDs, data, size);
2265
9.07k
        auto module = getModule(parentDs);
2266
9.07k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
9.07k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
9.07k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
111
            break;
2275
111
        }
2276
9.07k
    } while ( parentDs.Get<bool>() == true );
2277
2278
6.48k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
6.48k
#if 1
2284
6.48k
    {
2285
6.48k
        std::set<uint64_t> moduleIDs;
2286
12.4k
        for (const auto& m : modules ) {
2287
12.4k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
12.4k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
12.4k
            moduleIDs.insert(moduleID);
2295
12.4k
        }
2296
2297
6.48k
        std::set<uint64_t> operationModuleIDs;
2298
8.64k
        for (const auto& op : operations) {
2299
8.64k
            operationModuleIDs.insert(op.first->ID);
2300
8.64k
        }
2301
2302
6.48k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
6.48k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
6.48k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
6.48k
        for (const auto& id : addModuleIDs) {
2307
6.23k
            operations.push_back({ modules.at(id), operations[0].second});
2308
6.23k
        }
2309
6.48k
    }
2310
6.48k
#endif
2311
2312
6.48k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
6.48k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
21.3k
    for (size_t i = 0; i < operations.size(); i++) {
2320
14.8k
        auto& operation = operations[i];
2321
2322
14.8k
        auto& module = operation.first;
2323
14.8k
        auto& op = operation.second;
2324
2325
14.8k
        if ( i > 0 ) {
2326
8.62k
            auto& prevModule = operations[i-1].first;
2327
8.62k
            auto& prevOp = operations[i].second;
2328
2329
8.62k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
2.39k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
2.39k
                if ( curModifier.size() == 0 ) {
2332
282k
                    for (size_t j = 0; j < 512; j++) {
2333
282k
                        curModifier.push_back(1);
2334
282k
                    }
2335
1.84k
                } else {
2336
155k
                    for (auto& c : curModifier) {
2337
155k
                        c++;
2338
155k
                    }
2339
1.84k
                }
2340
2.39k
            }
2341
8.62k
        }
2342
2343
14.8k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
14.8k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
14.8k
        const auto& result = results.back();
2350
2351
14.8k
        if ( result.second != std::nullopt ) {
2352
6.24k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
6.24k
        }
2359
2360
14.8k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
14.8k
        if ( options.disableTests == false ) {
2369
14.8k
            tests::test(op, result.second);
2370
14.8k
        }
2371
2372
14.8k
        postprocess(module, op, result);
2373
14.8k
    }
2374
2375
6.48k
    if ( options.noCompare == false ) {
2376
6.25k
        compare(operations, results, data, size);
2377
6.25k
    }
2378
6.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
6.16k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
6.16k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
6.16k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
11.6k
    do {
2264
11.6k
        auto op = getOp(&parentDs, data, size);
2265
11.6k
        auto module = getModule(parentDs);
2266
11.6k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
11.6k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
11.6k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
437
            break;
2275
437
        }
2276
11.6k
    } while ( parentDs.Get<bool>() == true );
2277
2278
6.16k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
6.16k
#if 1
2284
6.16k
    {
2285
6.16k
        std::set<uint64_t> moduleIDs;
2286
11.7k
        for (const auto& m : modules ) {
2287
11.7k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
11.7k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
11.7k
            moduleIDs.insert(moduleID);
2295
11.7k
        }
2296
2297
6.16k
        std::set<uint64_t> operationModuleIDs;
2298
11.1k
        for (const auto& op : operations) {
2299
11.1k
            operationModuleIDs.insert(op.first->ID);
2300
11.1k
        }
2301
2302
6.16k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
6.16k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
6.16k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
6.16k
        for (const auto& id : addModuleIDs) {
2307
5.86k
            operations.push_back({ modules.at(id), operations[0].second});
2308
5.86k
        }
2309
6.16k
    }
2310
6.16k
#endif
2311
2312
6.16k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
6.16k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
23.1k
    for (size_t i = 0; i < operations.size(); i++) {
2320
17.0k
        auto& operation = operations[i];
2321
2322
17.0k
        auto& module = operation.first;
2323
17.0k
        auto& op = operation.second;
2324
2325
17.0k
        if ( i > 0 ) {
2326
11.1k
            auto& prevModule = operations[i-1].first;
2327
11.1k
            auto& prevOp = operations[i].second;
2328
2329
11.1k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
5.23k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
5.23k
                if ( curModifier.size() == 0 ) {
2332
448k
                    for (size_t j = 0; j < 512; j++) {
2333
447k
                        curModifier.push_back(1);
2334
447k
                    }
2335
4.36k
                } else {
2336
216k
                    for (auto& c : curModifier) {
2337
216k
                        c++;
2338
216k
                    }
2339
4.36k
                }
2340
5.23k
            }
2341
11.1k
        }
2342
2343
17.0k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
17.0k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
17.0k
        const auto& result = results.back();
2350
2351
17.0k
        if ( result.second != std::nullopt ) {
2352
8.16k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
8.16k
        }
2359
2360
17.0k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
17.0k
        if ( options.disableTests == false ) {
2369
17.0k
            tests::test(op, result.second);
2370
17.0k
        }
2371
2372
17.0k
        postprocess(module, op, result);
2373
17.0k
    }
2374
2375
6.16k
    if ( options.noCompare == false ) {
2376
5.90k
        compare(operations, results, data, size);
2377
5.90k
    }
2378
6.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
66
    do {
2264
66
        auto op = getOp(&parentDs, data, size);
2265
66
        auto module = getModule(parentDs);
2266
66
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
66
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
66
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
66
    } while ( parentDs.Get<bool>() == true );
2277
2278
34
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
34
#if 1
2284
34
    {
2285
34
        std::set<uint64_t> moduleIDs;
2286
34
        for (const auto& m : modules ) {
2287
18
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
18
            moduleIDs.insert(moduleID);
2295
18
        }
2296
2297
34
        std::set<uint64_t> operationModuleIDs;
2298
41
        for (const auto& op : operations) {
2299
41
            operationModuleIDs.insert(op.first->ID);
2300
41
        }
2301
2302
34
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
34
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
34
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
34
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
34
    }
2310
34
#endif
2311
2312
34
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
34
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
75
    for (size_t i = 0; i < operations.size(); i++) {
2320
41
        auto& operation = operations[i];
2321
2322
41
        auto& module = operation.first;
2323
41
        auto& op = operation.second;
2324
2325
41
        if ( i > 0 ) {
2326
23
            auto& prevModule = operations[i-1].first;
2327
23
            auto& prevOp = operations[i].second;
2328
2329
23
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
23
                auto& curModifier = op.modifier.GetVectorPtr();
2331
23
                if ( curModifier.size() == 0 ) {
2332
3.59k
                    for (size_t j = 0; j < 512; j++) {
2333
3.58k
                        curModifier.push_back(1);
2334
3.58k
                    }
2335
16
                } else {
2336
2.01k
                    for (auto& c : curModifier) {
2337
2.01k
                        c++;
2338
2.01k
                    }
2339
16
                }
2340
23
            }
2341
23
        }
2342
2343
41
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
41
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
41
        const auto& result = results.back();
2350
2351
41
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
41
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
41
        if ( options.disableTests == false ) {
2369
41
            tests::test(op, result.second);
2370
41
        }
2371
2372
41
        postprocess(module, op, result);
2373
41
    }
2374
2375
34
    if ( options.noCompare == false ) {
2376
18
        compare(operations, results, data, size);
2377
18
    }
2378
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
42
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
42
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
42
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
95
    do {
2264
95
        auto op = getOp(&parentDs, data, size);
2265
95
        auto module = getModule(parentDs);
2266
95
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
95
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
95
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
4
            break;
2275
4
        }
2276
95
    } while ( parentDs.Get<bool>() == true );
2277
2278
42
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
42
#if 1
2284
42
    {
2285
42
        std::set<uint64_t> moduleIDs;
2286
42
        for (const auto& m : modules ) {
2287
24
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
24
            moduleIDs.insert(moduleID);
2295
24
        }
2296
2297
42
        std::set<uint64_t> operationModuleIDs;
2298
59
        for (const auto& op : operations) {
2299
59
            operationModuleIDs.insert(op.first->ID);
2300
59
        }
2301
2302
42
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
42
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
42
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
42
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
42
    }
2310
42
#endif
2311
2312
42
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
42
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
101
    for (size_t i = 0; i < operations.size(); i++) {
2320
59
        auto& operation = operations[i];
2321
2322
59
        auto& module = operation.first;
2323
59
        auto& op = operation.second;
2324
2325
59
        if ( i > 0 ) {
2326
35
            auto& prevModule = operations[i-1].first;
2327
35
            auto& prevOp = operations[i].second;
2328
2329
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
35
                auto& curModifier = op.modifier.GetVectorPtr();
2331
35
                if ( curModifier.size() == 0 ) {
2332
5.64k
                    for (size_t j = 0; j < 512; j++) {
2333
5.63k
                        curModifier.push_back(1);
2334
5.63k
                    }
2335
24
                } else {
2336
1.06k
                    for (auto& c : curModifier) {
2337
1.06k
                        c++;
2338
1.06k
                    }
2339
24
                }
2340
35
            }
2341
35
        }
2342
2343
59
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
59
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
59
        const auto& result = results.back();
2350
2351
59
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
59
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
59
        if ( options.disableTests == false ) {
2369
59
            tests::test(op, result.second);
2370
59
        }
2371
2372
59
        postprocess(module, op, result);
2373
59
    }
2374
2375
42
    if ( options.noCompare == false ) {
2376
24
        compare(operations, results, data, size);
2377
24
    }
2378
42
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
40
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
40
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
40
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
85
    do {
2264
85
        auto op = getOp(&parentDs, data, size);
2265
85
        auto module = getModule(parentDs);
2266
85
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
85
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
85
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
3
            break;
2275
3
        }
2276
85
    } while ( parentDs.Get<bool>() == true );
2277
2278
40
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
40
#if 1
2284
40
    {
2285
40
        std::set<uint64_t> moduleIDs;
2286
40
        for (const auto& m : modules ) {
2287
20
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
20
            moduleIDs.insert(moduleID);
2295
20
        }
2296
2297
40
        std::set<uint64_t> operationModuleIDs;
2298
48
        for (const auto& op : operations) {
2299
48
            operationModuleIDs.insert(op.first->ID);
2300
48
        }
2301
2302
40
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
40
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
40
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
40
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
40
    }
2310
40
#endif
2311
2312
40
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
40
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
88
    for (size_t i = 0; i < operations.size(); i++) {
2320
48
        auto& operation = operations[i];
2321
2322
48
        auto& module = operation.first;
2323
48
        auto& op = operation.second;
2324
2325
48
        if ( i > 0 ) {
2326
28
            auto& prevModule = operations[i-1].first;
2327
28
            auto& prevOp = operations[i].second;
2328
2329
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
28
                auto& curModifier = op.modifier.GetVectorPtr();
2331
28
                if ( curModifier.size() == 0 ) {
2332
4.10k
                    for (size_t j = 0; j < 512; j++) {
2333
4.09k
                        curModifier.push_back(1);
2334
4.09k
                    }
2335
20
                } else {
2336
1.19k
                    for (auto& c : curModifier) {
2337
1.19k
                        c++;
2338
1.19k
                    }
2339
20
                }
2340
28
            }
2341
28
        }
2342
2343
48
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
48
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
48
        const auto& result = results.back();
2350
2351
48
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
48
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
48
        if ( options.disableTests == false ) {
2369
48
            tests::test(op, result.second);
2370
48
        }
2371
2372
48
        postprocess(module, op, result);
2373
48
    }
2374
2375
40
    if ( options.noCompare == false ) {
2376
20
        compare(operations, results, data, size);
2377
20
    }
2378
40
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
4.31k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
4.31k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
4.31k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
7.06k
    do {
2264
7.06k
        auto op = getOp(&parentDs, data, size);
2265
7.06k
        auto module = getModule(parentDs);
2266
7.06k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
7.06k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
7.06k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
162
            break;
2275
162
        }
2276
7.06k
    } while ( parentDs.Get<bool>() == true );
2277
2278
4.31k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
4.31k
#if 1
2284
4.31k
    {
2285
4.31k
        std::set<uint64_t> moduleIDs;
2286
8.15k
        for (const auto& m : modules ) {
2287
8.15k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
8.15k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
8.15k
            moduleIDs.insert(moduleID);
2295
8.15k
        }
2296
2297
4.31k
        std::set<uint64_t> operationModuleIDs;
2298
6.62k
        for (const auto& op : operations) {
2299
6.62k
            operationModuleIDs.insert(op.first->ID);
2300
6.62k
        }
2301
2302
4.31k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
4.31k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
4.31k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
4.31k
        for (const auto& id : addModuleIDs) {
2307
4.06k
            operations.push_back({ modules.at(id), operations[0].second});
2308
4.06k
        }
2309
4.31k
    }
2310
4.31k
#endif
2311
2312
4.31k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
4.31k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
15.0k
    for (size_t i = 0; i < operations.size(); i++) {
2320
10.6k
        auto& operation = operations[i];
2321
2322
10.6k
        auto& module = operation.first;
2323
10.6k
        auto& op = operation.second;
2324
2325
10.6k
        if ( i > 0 ) {
2326
6.60k
            auto& prevModule = operations[i-1].first;
2327
6.60k
            auto& prevOp = operations[i].second;
2328
2329
6.60k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
2.53k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
2.53k
                if ( curModifier.size() == 0 ) {
2332
359k
                    for (size_t j = 0; j < 512; j++) {
2333
358k
                        curModifier.push_back(1);
2334
358k
                    }
2335
1.83k
                } else {
2336
288k
                    for (auto& c : curModifier) {
2337
288k
                        c++;
2338
288k
                    }
2339
1.83k
                }
2340
2.53k
            }
2341
6.60k
        }
2342
2343
10.6k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
10.6k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
10.6k
        const auto& result = results.back();
2350
2351
10.6k
        if ( result.second != std::nullopt ) {
2352
3.50k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
3.50k
        }
2359
2360
10.6k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
10.6k
        if ( options.disableTests == false ) {
2369
10.6k
            tests::test(op, result.second);
2370
10.6k
        }
2371
2372
10.6k
        postprocess(module, op, result);
2373
10.6k
    }
2374
2375
4.31k
    if ( options.noCompare == false ) {
2376
4.08k
        compare(operations, results, data, size);
2377
4.08k
    }
2378
4.31k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
37
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
37
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
37
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
81
    do {
2264
81
        auto op = getOp(&parentDs, data, size);
2265
81
        auto module = getModule(parentDs);
2266
81
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
81
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
81
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
3
            break;
2275
3
        }
2276
81
    } while ( parentDs.Get<bool>() == true );
2277
2278
37
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
37
#if 1
2284
37
    {
2285
37
        std::set<uint64_t> moduleIDs;
2286
37
        for (const auto& m : modules ) {
2287
19
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
19
            moduleIDs.insert(moduleID);
2295
19
        }
2296
2297
37
        std::set<uint64_t> operationModuleIDs;
2298
44
        for (const auto& op : operations) {
2299
44
            operationModuleIDs.insert(op.first->ID);
2300
44
        }
2301
2302
37
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
37
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
37
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
37
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
37
    }
2310
37
#endif
2311
2312
37
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
37
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
81
    for (size_t i = 0; i < operations.size(); i++) {
2320
44
        auto& operation = operations[i];
2321
2322
44
        auto& module = operation.first;
2323
44
        auto& op = operation.second;
2324
2325
44
        if ( i > 0 ) {
2326
25
            auto& prevModule = operations[i-1].first;
2327
25
            auto& prevOp = operations[i].second;
2328
2329
25
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
25
                auto& curModifier = op.modifier.GetVectorPtr();
2331
25
                if ( curModifier.size() == 0 ) {
2332
4.61k
                    for (size_t j = 0; j < 512; j++) {
2333
4.60k
                        curModifier.push_back(1);
2334
4.60k
                    }
2335
16
                } else {
2336
915
                    for (auto& c : curModifier) {
2337
915
                        c++;
2338
915
                    }
2339
16
                }
2340
25
            }
2341
25
        }
2342
2343
44
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
44
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
44
        const auto& result = results.back();
2350
2351
44
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
44
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
44
        if ( options.disableTests == false ) {
2369
44
            tests::test(op, result.second);
2370
44
        }
2371
2372
44
        postprocess(module, op, result);
2373
44
    }
2374
2375
37
    if ( options.noCompare == false ) {
2376
19
        compare(operations, results, data, size);
2377
19
    }
2378
37
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
30
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
30
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
30
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
62
    do {
2264
62
        auto op = getOp(&parentDs, data, size);
2265
62
        auto module = getModule(parentDs);
2266
62
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
62
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
62
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
62
    } while ( parentDs.Get<bool>() == true );
2277
2278
30
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
30
#if 1
2284
30
    {
2285
30
        std::set<uint64_t> moduleIDs;
2286
30
        for (const auto& m : modules ) {
2287
18
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
18
            moduleIDs.insert(moduleID);
2295
18
        }
2296
2297
30
        std::set<uint64_t> operationModuleIDs;
2298
37
        for (const auto& op : operations) {
2299
37
            operationModuleIDs.insert(op.first->ID);
2300
37
        }
2301
2302
30
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
30
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
30
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
30
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
30
    }
2310
30
#endif
2311
2312
30
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
30
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
67
    for (size_t i = 0; i < operations.size(); i++) {
2320
37
        auto& operation = operations[i];
2321
2322
37
        auto& module = operation.first;
2323
37
        auto& op = operation.second;
2324
2325
37
        if ( i > 0 ) {
2326
19
            auto& prevModule = operations[i-1].first;
2327
19
            auto& prevOp = operations[i].second;
2328
2329
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
19
                auto& curModifier = op.modifier.GetVectorPtr();
2331
19
                if ( curModifier.size() == 0 ) {
2332
4.10k
                    for (size_t j = 0; j < 512; j++) {
2333
4.09k
                        curModifier.push_back(1);
2334
4.09k
                    }
2335
11
                } else {
2336
711
                    for (auto& c : curModifier) {
2337
711
                        c++;
2338
711
                    }
2339
11
                }
2340
19
            }
2341
19
        }
2342
2343
37
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
37
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
37
        const auto& result = results.back();
2350
2351
37
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
37
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
37
        if ( options.disableTests == false ) {
2369
37
            tests::test(op, result.second);
2370
37
        }
2371
2372
37
        postprocess(module, op, result);
2373
37
    }
2374
2375
30
    if ( options.noCompare == false ) {
2376
18
        compare(operations, results, data, size);
2377
18
    }
2378
30
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
26
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
26
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
26
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
62
    do {
2264
62
        auto op = getOp(&parentDs, data, size);
2265
62
        auto module = getModule(parentDs);
2266
62
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
62
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
62
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
62
    } while ( parentDs.Get<bool>() == true );
2277
2278
26
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
26
#if 1
2284
26
    {
2285
26
        std::set<uint64_t> moduleIDs;
2286
26
        for (const auto& m : modules ) {
2287
12
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
12
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
12
            moduleIDs.insert(moduleID);
2295
12
        }
2296
2297
26
        std::set<uint64_t> operationModuleIDs;
2298
31
        for (const auto& op : operations) {
2299
31
            operationModuleIDs.insert(op.first->ID);
2300
31
        }
2301
2302
26
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
26
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
26
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
26
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
26
    }
2310
26
#endif
2311
2312
26
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
26
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
57
    for (size_t i = 0; i < operations.size(); i++) {
2320
31
        auto& operation = operations[i];
2321
2322
31
        auto& module = operation.first;
2323
31
        auto& op = operation.second;
2324
2325
31
        if ( i > 0 ) {
2326
19
            auto& prevModule = operations[i-1].first;
2327
19
            auto& prevOp = operations[i].second;
2328
2329
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
19
                auto& curModifier = op.modifier.GetVectorPtr();
2331
19
                if ( curModifier.size() == 0 ) {
2332
2.05k
                    for (size_t j = 0; j < 512; j++) {
2333
2.04k
                        curModifier.push_back(1);
2334
2.04k
                    }
2335
15
                } else {
2336
497
                    for (auto& c : curModifier) {
2337
497
                        c++;
2338
497
                    }
2339
15
                }
2340
19
            }
2341
19
        }
2342
2343
31
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
31
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
31
        const auto& result = results.back();
2350
2351
31
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
31
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
31
        if ( options.disableTests == false ) {
2369
31
            tests::test(op, result.second);
2370
31
        }
2371
2372
31
        postprocess(module, op, result);
2373
31
    }
2374
2375
26
    if ( options.noCompare == false ) {
2376
12
        compare(operations, results, data, size);
2377
12
    }
2378
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
38
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
38
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
38
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
83
    do {
2264
83
        auto op = getOp(&parentDs, data, size);
2265
83
        auto module = getModule(parentDs);
2266
83
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
83
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
83
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
83
    } while ( parentDs.Get<bool>() == true );
2277
2278
38
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
38
#if 1
2284
38
    {
2285
38
        std::set<uint64_t> moduleIDs;
2286
38
        for (const auto& m : modules ) {
2287
21
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
21
            moduleIDs.insert(moduleID);
2295
21
        }
2296
2297
38
        std::set<uint64_t> operationModuleIDs;
2298
47
        for (const auto& op : operations) {
2299
47
            operationModuleIDs.insert(op.first->ID);
2300
47
        }
2301
2302
38
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
38
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
38
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
38
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
38
    }
2310
38
#endif
2311
2312
38
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
38
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
85
    for (size_t i = 0; i < operations.size(); i++) {
2320
47
        auto& operation = operations[i];
2321
2322
47
        auto& module = operation.first;
2323
47
        auto& op = operation.second;
2324
2325
47
        if ( i > 0 ) {
2326
26
            auto& prevModule = operations[i-1].first;
2327
26
            auto& prevOp = operations[i].second;
2328
2329
26
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
26
                auto& curModifier = op.modifier.GetVectorPtr();
2331
26
                if ( curModifier.size() == 0 ) {
2332
5.13k
                    for (size_t j = 0; j < 512; j++) {
2333
5.12k
                        curModifier.push_back(1);
2334
5.12k
                    }
2335
16
                } else {
2336
1.45k
                    for (auto& c : curModifier) {
2337
1.45k
                        c++;
2338
1.45k
                    }
2339
16
                }
2340
26
            }
2341
26
        }
2342
2343
47
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
47
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
47
        const auto& result = results.back();
2350
2351
47
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
47
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
47
        if ( options.disableTests == false ) {
2369
47
            tests::test(op, result.second);
2370
47
        }
2371
2372
47
        postprocess(module, op, result);
2373
47
    }
2374
2375
38
    if ( options.noCompare == false ) {
2376
21
        compare(operations, results, data, size);
2377
21
    }
2378
38
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
671
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
671
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
671
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
1.52k
    do {
2264
1.52k
        auto op = getOp(&parentDs, data, size);
2265
1.52k
        auto module = getModule(parentDs);
2266
1.52k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
1.52k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
1.52k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
51
            break;
2275
51
        }
2276
1.52k
    } while ( parentDs.Get<bool>() == true );
2277
2278
671
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
671
#if 1
2284
671
    {
2285
671
        std::set<uint64_t> moduleIDs;
2286
1.00k
        for (const auto& m : modules ) {
2287
1.00k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
1.00k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
1.00k
            moduleIDs.insert(moduleID);
2295
1.00k
        }
2296
2297
671
        std::set<uint64_t> operationModuleIDs;
2298
1.18k
        for (const auto& op : operations) {
2299
1.18k
            operationModuleIDs.insert(op.first->ID);
2300
1.18k
        }
2301
2302
671
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
671
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
671
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
671
        for (const auto& id : addModuleIDs) {
2307
494
            operations.push_back({ modules.at(id), operations[0].second});
2308
494
        }
2309
671
    }
2310
671
#endif
2311
2312
671
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
671
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
2.34k
    for (size_t i = 0; i < operations.size(); i++) {
2320
1.67k
        auto& operation = operations[i];
2321
2322
1.67k
        auto& module = operation.first;
2323
1.67k
        auto& op = operation.second;
2324
2325
1.67k
        if ( i > 0 ) {
2326
1.16k
            auto& prevModule = operations[i-1].first;
2327
1.16k
            auto& prevOp = operations[i].second;
2328
2329
1.16k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
669
                auto& curModifier = op.modifier.GetVectorPtr();
2331
669
                if ( curModifier.size() == 0 ) {
2332
90.8k
                    for (size_t j = 0; j < 512; j++) {
2333
90.6k
                        curModifier.push_back(1);
2334
90.6k
                    }
2335
492
                } else {
2336
3.67k
                    for (auto& c : curModifier) {
2337
3.67k
                        c++;
2338
3.67k
                    }
2339
492
                }
2340
669
            }
2341
1.16k
        }
2342
2343
1.67k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
1.67k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
1.67k
        const auto& result = results.back();
2350
2351
1.67k
        if ( result.second != std::nullopt ) {
2352
210
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
210
        }
2359
2360
1.67k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
1.67k
        if ( options.disableTests == false ) {
2369
1.67k
            tests::test(op, result.second);
2370
1.67k
        }
2371
2372
1.67k
        postprocess(module, op, result);
2373
1.67k
    }
2374
2375
671
    if ( options.noCompare == false ) {
2376
513
        compare(operations, results, data, size);
2377
513
    }
2378
671
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
1.09k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
1.09k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
1.09k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
2.59k
    do {
2264
2.59k
        auto op = getOp(&parentDs, data, size);
2265
2.59k
        auto module = getModule(parentDs);
2266
2.59k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
2.59k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
2.59k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
127
            break;
2275
127
        }
2276
2.59k
    } while ( parentDs.Get<bool>() == true );
2277
2278
1.09k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
1.09k
#if 1
2284
1.09k
    {
2285
1.09k
        std::set<uint64_t> moduleIDs;
2286
1.64k
        for (const auto& m : modules ) {
2287
1.64k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
1.64k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
1.64k
            moduleIDs.insert(moduleID);
2295
1.64k
        }
2296
2297
1.09k
        std::set<uint64_t> operationModuleIDs;
2298
2.05k
        for (const auto& op : operations) {
2299
2.05k
            operationModuleIDs.insert(op.first->ID);
2300
2.05k
        }
2301
2302
1.09k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
1.09k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
1.09k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
1.09k
        for (const auto& id : addModuleIDs) {
2307
812
            operations.push_back({ modules.at(id), operations[0].second});
2308
812
        }
2309
1.09k
    }
2310
1.09k
#endif
2311
2312
1.09k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
1.09k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
3.95k
    for (size_t i = 0; i < operations.size(); i++) {
2320
2.86k
        auto& operation = operations[i];
2321
2322
2.86k
        auto& module = operation.first;
2323
2.86k
        auto& op = operation.second;
2324
2325
2.86k
        if ( i > 0 ) {
2326
2.03k
            auto& prevModule = operations[i-1].first;
2327
2.03k
            auto& prevOp = operations[i].second;
2328
2329
2.03k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
1.21k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
1.21k
                if ( curModifier.size() == 0 ) {
2332
161k
                    for (size_t j = 0; j < 512; j++) {
2333
160k
                        curModifier.push_back(1);
2334
160k
                    }
2335
905
                } else {
2336
295k
                    for (auto& c : curModifier) {
2337
295k
                        c++;
2338
295k
                    }
2339
905
                }
2340
1.21k
            }
2341
2.03k
        }
2342
2343
2.86k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
2.86k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
2.86k
        const auto& result = results.back();
2350
2351
2.86k
        if ( result.second != std::nullopt ) {
2352
295
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
295
        }
2359
2360
2.86k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
2.86k
        if ( options.disableTests == false ) {
2369
2.86k
            tests::test(op, result.second);
2370
2.86k
        }
2371
2372
2.86k
        postprocess(module, op, result);
2373
2.86k
    }
2374
2375
1.09k
    if ( options.noCompare == false ) {
2376
832
        compare(operations, results, data, size);
2377
832
    }
2378
1.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
950
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
950
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
950
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
2.12k
    do {
2264
2.12k
        auto op = getOp(&parentDs, data, size);
2265
2.12k
        auto module = getModule(parentDs);
2266
2.12k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
2.12k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
2.12k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
89
            break;
2275
89
        }
2276
2.12k
    } while ( parentDs.Get<bool>() == true );
2277
2278
950
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
950
#if 1
2284
950
    {
2285
950
        std::set<uint64_t> moduleIDs;
2286
1.37k
        for (const auto& m : modules ) {
2287
1.37k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
1.37k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
1.37k
            moduleIDs.insert(moduleID);
2295
1.37k
        }
2296
2297
950
        std::set<uint64_t> operationModuleIDs;
2298
1.61k
        for (const auto& op : operations) {
2299
1.61k
            operationModuleIDs.insert(op.first->ID);
2300
1.61k
        }
2301
2302
950
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
950
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
950
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
950
        for (const auto& id : addModuleIDs) {
2307
672
            operations.push_back({ modules.at(id), operations[0].second});
2308
672
        }
2309
950
    }
2310
950
#endif
2311
2312
950
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
950
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
3.23k
    for (size_t i = 0; i < operations.size(); i++) {
2320
2.28k
        auto& operation = operations[i];
2321
2322
2.28k
        auto& module = operation.first;
2323
2.28k
        auto& op = operation.second;
2324
2325
2.28k
        if ( i > 0 ) {
2326
1.58k
            auto& prevModule = operations[i-1].first;
2327
1.58k
            auto& prevOp = operations[i].second;
2328
2329
1.58k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
916
                auto& curModifier = op.modifier.GetVectorPtr();
2331
916
                if ( curModifier.size() == 0 ) {
2332
125k
                    for (size_t j = 0; j < 512; j++) {
2333
125k
                        curModifier.push_back(1);
2334
125k
                    }
2335
671
                } else {
2336
161k
                    for (auto& c : curModifier) {
2337
161k
                        c++;
2338
161k
                    }
2339
671
                }
2340
916
            }
2341
1.58k
        }
2342
2343
2.28k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
2.28k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
2.28k
        const auto& result = results.back();
2350
2351
2.28k
        if ( result.second != std::nullopt ) {
2352
11
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
11
        }
2359
2360
2.28k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
2.28k
        if ( options.disableTests == false ) {
2369
2.28k
            tests::test(op, result.second);
2370
2.28k
        }
2371
2372
2.28k
        postprocess(module, op, result);
2373
2.28k
    }
2374
2375
950
    if ( options.noCompare == false ) {
2376
698
        compare(operations, results, data, size);
2377
698
    }
2378
950
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
2.37k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
2.37k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
2.37k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
4.21k
    do {
2264
4.21k
        auto op = getOp(&parentDs, data, size);
2265
4.21k
        auto module = getModule(parentDs);
2266
4.21k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
4.21k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
4.21k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
93
            break;
2275
93
        }
2276
4.21k
    } while ( parentDs.Get<bool>() == true );
2277
2278
2.37k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
2.37k
#if 1
2284
2.37k
    {
2285
2.37k
        std::set<uint64_t> moduleIDs;
2286
3.69k
        for (const auto& m : modules ) {
2287
3.69k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
3.69k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
3.69k
            moduleIDs.insert(moduleID);
2295
3.69k
        }
2296
2297
2.37k
        std::set<uint64_t> operationModuleIDs;
2298
3.20k
        for (const auto& op : operations) {
2299
3.20k
            operationModuleIDs.insert(op.first->ID);
2300
3.20k
        }
2301
2302
2.37k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
2.37k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
2.37k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
2.37k
        for (const auto& id : addModuleIDs) {
2307
1.83k
            operations.push_back({ modules.at(id), operations[0].second});
2308
1.83k
        }
2309
2.37k
    }
2310
2.37k
#endif
2311
2312
2.37k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
2.37k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
7.41k
    for (size_t i = 0; i < operations.size(); i++) {
2320
5.03k
        auto& operation = operations[i];
2321
2322
5.03k
        auto& module = operation.first;
2323
5.03k
        auto& op = operation.second;
2324
2325
5.03k
        if ( i > 0 ) {
2326
3.17k
            auto& prevModule = operations[i-1].first;
2327
3.17k
            auto& prevOp = operations[i].second;
2328
2329
3.17k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
1.34k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
1.34k
                if ( curModifier.size() == 0 ) {
2332
145k
                    for (size_t j = 0; j < 512; j++) {
2333
145k
                        curModifier.push_back(1);
2334
145k
                    }
2335
1.05k
                } else {
2336
116k
                    for (auto& c : curModifier) {
2337
116k
                        c++;
2338
116k
                    }
2339
1.05k
                }
2340
1.34k
            }
2341
3.17k
        }
2342
2343
5.03k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
5.03k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
5.03k
        const auto& result = results.back();
2350
2351
5.03k
        if ( result.second != std::nullopt ) {
2352
273
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
273
        }
2359
2360
5.03k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
5.03k
        if ( options.disableTests == false ) {
2369
5.03k
            tests::test(op, result.second);
2370
5.03k
        }
2371
2372
5.03k
        postprocess(module, op, result);
2373
5.03k
    }
2374
2375
2.37k
    if ( options.noCompare == false ) {
2376
1.86k
        compare(operations, results, data, size);
2377
1.86k
    }
2378
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
3.75k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
3.75k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
3.75k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
5.48k
    do {
2264
5.48k
        auto op = getOp(&parentDs, data, size);
2265
5.48k
        auto module = getModule(parentDs);
2266
5.48k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
5.48k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
5.48k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
85
            break;
2275
85
        }
2276
5.48k
    } while ( parentDs.Get<bool>() == true );
2277
2278
3.75k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
3.75k
#if 1
2284
3.75k
    {
2285
3.75k
        std::set<uint64_t> moduleIDs;
2286
6.91k
        for (const auto& m : modules ) {
2287
6.91k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
6.91k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
6.91k
            moduleIDs.insert(moduleID);
2295
6.91k
        }
2296
2297
3.75k
        std::set<uint64_t> operationModuleIDs;
2298
5.00k
        for (const auto& op : operations) {
2299
5.00k
            operationModuleIDs.insert(op.first->ID);
2300
5.00k
        }
2301
2302
3.75k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
3.75k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
3.75k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
3.75k
        for (const auto& id : addModuleIDs) {
2307
3.45k
            operations.push_back({ modules.at(id), operations[0].second});
2308
3.45k
        }
2309
3.75k
    }
2310
3.75k
#endif
2311
2312
3.75k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
3.75k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
12.2k
    for (size_t i = 0; i < operations.size(); i++) {
2320
8.45k
        auto& operation = operations[i];
2321
2322
8.45k
        auto& module = operation.first;
2323
8.45k
        auto& op = operation.second;
2324
2325
8.45k
        if ( i > 0 ) {
2326
4.99k
            auto& prevModule = operations[i-1].first;
2327
4.99k
            auto& prevOp = operations[i].second;
2328
2329
4.99k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
1.54k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
1.54k
                if ( curModifier.size() == 0 ) {
2332
112k
                    for (size_t j = 0; j < 512; j++) {
2333
112k
                        curModifier.push_back(1);
2334
112k
                    }
2335
1.32k
                } else {
2336
269k
                    for (auto& c : curModifier) {
2337
269k
                        c++;
2338
269k
                    }
2339
1.32k
                }
2340
1.54k
            }
2341
4.99k
        }
2342
2343
8.45k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
8.45k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
8.45k
        const auto& result = results.back();
2350
2351
8.45k
        if ( result.second != std::nullopt ) {
2352
1.10k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
1.10k
        }
2359
2360
8.45k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
8.45k
        if ( options.disableTests == false ) {
2369
8.45k
            tests::test(op, result.second);
2370
8.45k
        }
2371
2372
8.45k
        postprocess(module, op, result);
2373
8.45k
    }
2374
2375
3.75k
    if ( options.noCompare == false ) {
2376
3.46k
        compare(operations, results, data, size);
2377
3.46k
    }
2378
3.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
31
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
31
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
31
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
65
    do {
2264
65
        auto op = getOp(&parentDs, data, size);
2265
65
        auto module = getModule(parentDs);
2266
65
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
65
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
65
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
65
    } while ( parentDs.Get<bool>() == true );
2277
2278
31
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
31
#if 1
2284
31
    {
2285
31
        std::set<uint64_t> moduleIDs;
2286
31
        for (const auto& m : modules ) {
2287
14
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
14
            moduleIDs.insert(moduleID);
2295
14
        }
2296
2297
31
        std::set<uint64_t> operationModuleIDs;
2298
31
        for (const auto& op : operations) {
2299
31
            operationModuleIDs.insert(op.first->ID);
2300
31
        }
2301
2302
31
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
31
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
31
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
31
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
31
    }
2310
31
#endif
2311
2312
31
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
31
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
62
    for (size_t i = 0; i < operations.size(); i++) {
2320
31
        auto& operation = operations[i];
2321
2322
31
        auto& module = operation.first;
2323
31
        auto& op = operation.second;
2324
2325
31
        if ( i > 0 ) {
2326
17
            auto& prevModule = operations[i-1].first;
2327
17
            auto& prevOp = operations[i].second;
2328
2329
17
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
17
                auto& curModifier = op.modifier.GetVectorPtr();
2331
17
                if ( curModifier.size() == 0 ) {
2332
4.61k
                    for (size_t j = 0; j < 512; j++) {
2333
4.60k
                        curModifier.push_back(1);
2334
4.60k
                    }
2335
9
                } else {
2336
285
                    for (auto& c : curModifier) {
2337
285
                        c++;
2338
285
                    }
2339
8
                }
2340
17
            }
2341
17
        }
2342
2343
31
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
31
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
31
        const auto& result = results.back();
2350
2351
31
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
31
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
31
        if ( options.disableTests == false ) {
2369
31
            tests::test(op, result.second);
2370
31
        }
2371
2372
31
        postprocess(module, op, result);
2373
31
    }
2374
2375
31
    if ( options.noCompare == false ) {
2376
14
        compare(operations, results, data, size);
2377
14
    }
2378
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
37
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
37
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
37
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
83
    do {
2264
83
        auto op = getOp(&parentDs, data, size);
2265
83
        auto module = getModule(parentDs);
2266
83
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
83
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
83
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
83
    } while ( parentDs.Get<bool>() == true );
2277
2278
37
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
37
#if 1
2284
37
    {
2285
37
        std::set<uint64_t> moduleIDs;
2286
37
        for (const auto& m : modules ) {
2287
22
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
22
            moduleIDs.insert(moduleID);
2295
22
        }
2296
2297
37
        std::set<uint64_t> operationModuleIDs;
2298
49
        for (const auto& op : operations) {
2299
49
            operationModuleIDs.insert(op.first->ID);
2300
49
        }
2301
2302
37
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
37
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
37
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
37
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
37
    }
2310
37
#endif
2311
2312
37
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
37
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
86
    for (size_t i = 0; i < operations.size(); i++) {
2320
49
        auto& operation = operations[i];
2321
2322
49
        auto& module = operation.first;
2323
49
        auto& op = operation.second;
2324
2325
49
        if ( i > 0 ) {
2326
27
            auto& prevModule = operations[i-1].first;
2327
27
            auto& prevOp = operations[i].second;
2328
2329
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
27
                auto& curModifier = op.modifier.GetVectorPtr();
2331
27
                if ( curModifier.size() == 0 ) {
2332
5.13k
                    for (size_t j = 0; j < 512; j++) {
2333
5.12k
                        curModifier.push_back(1);
2334
5.12k
                    }
2335
17
                } else {
2336
892
                    for (auto& c : curModifier) {
2337
892
                        c++;
2338
892
                    }
2339
17
                }
2340
27
            }
2341
27
        }
2342
2343
49
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
49
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
49
        const auto& result = results.back();
2350
2351
49
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
49
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
49
        if ( options.disableTests == false ) {
2369
49
            tests::test(op, result.second);
2370
49
        }
2371
2372
49
        postprocess(module, op, result);
2373
49
    }
2374
2375
37
    if ( options.noCompare == false ) {
2376
22
        compare(operations, results, data, size);
2377
22
    }
2378
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
5.43k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
5.43k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
5.43k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
7.15k
    do {
2264
7.15k
        auto op = getOp(&parentDs, data, size);
2265
7.15k
        auto module = getModule(parentDs);
2266
7.15k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
7.15k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
7.15k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
66
            break;
2275
66
        }
2276
7.15k
    } while ( parentDs.Get<bool>() == true );
2277
2278
5.43k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
5.43k
#if 1
2284
5.43k
    {
2285
5.43k
        std::set<uint64_t> moduleIDs;
2286
9.99k
        for (const auto& m : modules ) {
2287
9.99k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
9.99k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
9.99k
            moduleIDs.insert(moduleID);
2295
9.99k
        }
2296
2297
5.43k
        std::set<uint64_t> operationModuleIDs;
2298
6.50k
        for (const auto& op : operations) {
2299
6.50k
            operationModuleIDs.insert(op.first->ID);
2300
6.50k
        }
2301
2302
5.43k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
5.43k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
5.43k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
5.43k
        for (const auto& id : addModuleIDs) {
2307
4.98k
            operations.push_back({ modules.at(id), operations[0].second});
2308
4.98k
        }
2309
5.43k
    }
2310
5.43k
#endif
2311
2312
5.43k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
5.43k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
16.9k
    for (size_t i = 0; i < operations.size(); i++) {
2320
11.4k
        auto& operation = operations[i];
2321
2322
11.4k
        auto& module = operation.first;
2323
11.4k
        auto& op = operation.second;
2324
2325
11.4k
        if ( i > 0 ) {
2326
6.46k
            auto& prevModule = operations[i-1].first;
2327
6.46k
            auto& prevOp = operations[i].second;
2328
2329
6.46k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
1.48k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
1.48k
                if ( curModifier.size() == 0 ) {
2332
367k
                    for (size_t j = 0; j < 512; j++) {
2333
366k
                        curModifier.push_back(1);
2334
366k
                    }
2335
770
                } else {
2336
13.4k
                    for (auto& c : curModifier) {
2337
13.4k
                        c++;
2338
13.4k
                    }
2339
770
                }
2340
1.48k
            }
2341
6.46k
        }
2342
2343
11.4k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
11.4k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
11.4k
        const auto& result = results.back();
2350
2351
11.4k
        if ( result.second != std::nullopt ) {
2352
3.37k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
3.37k
        }
2359
2360
11.4k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
11.4k
        if ( options.disableTests == false ) {
2369
11.4k
            tests::test(op, result.second);
2370
11.4k
        }
2371
2372
11.4k
        postprocess(module, op, result);
2373
11.4k
    }
2374
2375
5.43k
    if ( options.noCompare == false ) {
2376
5.01k
        compare(operations, results, data, size);
2377
5.01k
    }
2378
5.43k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
2.42k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
2.42k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
2.42k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
4.00k
    do {
2264
4.00k
        auto op = getOp(&parentDs, data, size);
2265
4.00k
        auto module = getModule(parentDs);
2266
4.00k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
4.00k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
4.00k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
76
            break;
2275
76
        }
2276
4.00k
    } while ( parentDs.Get<bool>() == true );
2277
2278
2.42k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
2.42k
#if 1
2284
2.42k
    {
2285
2.42k
        std::set<uint64_t> moduleIDs;
2286
4.05k
        for (const auto& m : modules ) {
2287
4.05k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
4.05k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
4.05k
            moduleIDs.insert(moduleID);
2295
4.05k
        }
2296
2297
2.42k
        std::set<uint64_t> operationModuleIDs;
2298
3.34k
        for (const auto& op : operations) {
2299
3.34k
            operationModuleIDs.insert(op.first->ID);
2300
3.34k
        }
2301
2302
2.42k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
2.42k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
2.42k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
2.42k
        for (const auto& id : addModuleIDs) {
2307
1.99k
            operations.push_back({ modules.at(id), operations[0].second});
2308
1.99k
        }
2309
2.42k
    }
2310
2.42k
#endif
2311
2312
2.42k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
2.42k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
7.76k
    for (size_t i = 0; i < operations.size(); i++) {
2320
5.33k
        auto& operation = operations[i];
2321
2322
5.33k
        auto& module = operation.first;
2323
5.33k
        auto& op = operation.second;
2324
2325
5.33k
        if ( i > 0 ) {
2326
3.28k
            auto& prevModule = operations[i-1].first;
2327
3.28k
            auto& prevOp = operations[i].second;
2328
2329
3.28k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
1.28k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
1.28k
                if ( curModifier.size() == 0 ) {
2332
300k
                    for (size_t j = 0; j < 512; j++) {
2333
299k
                        curModifier.push_back(1);
2334
299k
                    }
2335
703
                } else {
2336
15.7k
                    for (auto& c : curModifier) {
2337
15.7k
                        c++;
2338
15.7k
                    }
2339
703
                }
2340
1.28k
            }
2341
3.28k
        }
2342
2343
5.33k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
5.33k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
5.33k
        const auto& result = results.back();
2350
2351
5.33k
        if ( result.second != std::nullopt ) {
2352
1.04k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
1.04k
        }
2359
2360
5.33k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
5.33k
        if ( options.disableTests == false ) {
2369
5.33k
            tests::test(op, result.second);
2370
5.33k
        }
2371
2372
5.33k
        postprocess(module, op, result);
2373
5.33k
    }
2374
2375
2.42k
    if ( options.noCompare == false ) {
2376
2.05k
        compare(operations, results, data, size);
2377
2.05k
    }
2378
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
68.5k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
68.5k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
68.5k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
81.7k
    do {
2264
81.7k
        auto op = getOp(&parentDs, data, size);
2265
81.7k
        auto module = getModule(parentDs);
2266
81.7k
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
81.7k
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
81.7k
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
966
            break;
2275
966
        }
2276
81.7k
    } while ( parentDs.Get<bool>() == true );
2277
2278
68.5k
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
68.5k
#if 1
2284
68.5k
    {
2285
68.5k
        std::set<uint64_t> moduleIDs;
2286
134k
        for (const auto& m : modules ) {
2287
134k
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
134k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
134k
            moduleIDs.insert(moduleID);
2295
134k
        }
2296
2297
68.5k
        std::set<uint64_t> operationModuleIDs;
2298
81.0k
        for (const auto& op : operations) {
2299
81.0k
            operationModuleIDs.insert(op.first->ID);
2300
81.0k
        }
2301
2302
68.5k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
68.5k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
68.5k
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
68.5k
        for (const auto& id : addModuleIDs) {
2307
66.2k
            operations.push_back({ modules.at(id), operations[0].second});
2308
66.2k
        }
2309
68.5k
    }
2310
68.5k
#endif
2311
2312
68.5k
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
68.5k
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
215k
    for (size_t i = 0; i < operations.size(); i++) {
2320
147k
        auto& operation = operations[i];
2321
2322
147k
        auto& module = operation.first;
2323
147k
        auto& op = operation.second;
2324
2325
147k
        if ( i > 0 ) {
2326
79.1k
            auto& prevModule = operations[i-1].first;
2327
79.1k
            auto& prevOp = operations[i].second;
2328
2329
79.1k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
12.9k
                auto& curModifier = op.modifier.GetVectorPtr();
2331
12.9k
                if ( curModifier.size() == 0 ) {
2332
2.68M
                    for (size_t j = 0; j < 512; j++) {
2333
2.68M
                        curModifier.push_back(1);
2334
2.68M
                    }
2335
7.67k
                } else {
2336
1.41M
                    for (auto& c : curModifier) {
2337
1.41M
                        c++;
2338
1.41M
                    }
2339
7.67k
                }
2340
12.9k
            }
2341
79.1k
        }
2342
2343
147k
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
147k
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
147k
        const auto& result = results.back();
2350
2351
147k
        if ( result.second != std::nullopt ) {
2352
53.3k
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
53.3k
        }
2359
2360
147k
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
147k
        if ( options.disableTests == false ) {
2369
147k
            tests::test(op, result.second);
2370
147k
        }
2371
2372
147k
        postprocess(module, op, result);
2373
147k
    }
2374
2375
68.5k
    if ( options.noCompare == false ) {
2376
68.0k
        compare(operations, results, data, size);
2377
68.0k
    }
2378
68.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
70
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
70
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
70
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
121
    do {
2264
121
        auto op = getOp(&parentDs, data, size);
2265
121
        auto module = getModule(parentDs);
2266
121
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
121
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
121
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
121
    } while ( parentDs.Get<bool>() == true );
2277
2278
70
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
70
#if 1
2284
70
    {
2285
70
        std::set<uint64_t> moduleIDs;
2286
70
        for (const auto& m : modules ) {
2287
56
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
56
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
56
            moduleIDs.insert(moduleID);
2295
56
        }
2296
2297
70
        std::set<uint64_t> operationModuleIDs;
2298
90
        for (const auto& op : operations) {
2299
90
            operationModuleIDs.insert(op.first->ID);
2300
90
        }
2301
2302
70
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
70
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
70
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
70
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
70
    }
2310
70
#endif
2311
2312
70
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
70
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
160
    for (size_t i = 0; i < operations.size(); i++) {
2320
90
        auto& operation = operations[i];
2321
2322
90
        auto& module = operation.first;
2323
90
        auto& op = operation.second;
2324
2325
90
        if ( i > 0 ) {
2326
34
            auto& prevModule = operations[i-1].first;
2327
34
            auto& prevOp = operations[i].second;
2328
2329
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
34
                auto& curModifier = op.modifier.GetVectorPtr();
2331
34
                if ( curModifier.size() == 0 ) {
2332
11.2k
                    for (size_t j = 0; j < 512; j++) {
2333
11.2k
                        curModifier.push_back(1);
2334
11.2k
                    }
2335
22
                } else {
2336
951
                    for (auto& c : curModifier) {
2337
951
                        c++;
2338
951
                    }
2339
12
                }
2340
34
            }
2341
34
        }
2342
2343
90
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
90
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
90
        const auto& result = results.back();
2350
2351
90
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
90
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
90
        if ( options.disableTests == false ) {
2369
90
            tests::test(op, result.second);
2370
90
        }
2371
2372
90
        postprocess(module, op, result);
2373
90
    }
2374
2375
70
    if ( options.noCompare == false ) {
2376
56
        compare(operations, results, data, size);
2377
56
    }
2378
70
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
205
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
205
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
205
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
342
    do {
2264
342
        auto op = getOp(&parentDs, data, size);
2265
342
        auto module = getModule(parentDs);
2266
342
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
342
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
342
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
12
            break;
2275
12
        }
2276
342
    } while ( parentDs.Get<bool>() == true );
2277
2278
205
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
205
#if 1
2284
205
    {
2285
205
        std::set<uint64_t> moduleIDs;
2286
205
        for (const auto& m : modules ) {
2287
180
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
180
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
180
            moduleIDs.insert(moduleID);
2295
180
        }
2296
2297
205
        std::set<uint64_t> operationModuleIDs;
2298
303
        for (const auto& op : operations) {
2299
303
            operationModuleIDs.insert(op.first->ID);
2300
303
        }
2301
2302
205
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
205
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
205
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
205
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
205
    }
2310
205
#endif
2311
2312
205
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
205
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
508
    for (size_t i = 0; i < operations.size(); i++) {
2320
303
        auto& operation = operations[i];
2321
2322
303
        auto& module = operation.first;
2323
303
        auto& op = operation.second;
2324
2325
303
        if ( i > 0 ) {
2326
123
            auto& prevModule = operations[i-1].first;
2327
123
            auto& prevOp = operations[i].second;
2328
2329
123
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
123
                auto& curModifier = op.modifier.GetVectorPtr();
2331
123
                if ( curModifier.size() == 0 ) {
2332
38.9k
                    for (size_t j = 0; j < 512; j++) {
2333
38.9k
                        curModifier.push_back(1);
2334
38.9k
                    }
2335
76
                } else {
2336
89
                    for (auto& c : curModifier) {
2337
89
                        c++;
2338
89
                    }
2339
47
                }
2340
123
            }
2341
123
        }
2342
2343
303
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
303
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
303
        const auto& result = results.back();
2350
2351
303
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
303
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
303
        if ( options.disableTests == false ) {
2369
303
            tests::test(op, result.second);
2370
303
        }
2371
2372
303
        postprocess(module, op, result);
2373
303
    }
2374
2375
205
    if ( options.noCompare == false ) {
2376
180
        compare(operations, results, data, size);
2377
180
    }
2378
205
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
59
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
59
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
59
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
118
    do {
2264
118
        auto op = getOp(&parentDs, data, size);
2265
118
        auto module = getModule(parentDs);
2266
118
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
118
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
118
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
4
            break;
2275
4
        }
2276
118
    } while ( parentDs.Get<bool>() == true );
2277
2278
59
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
59
#if 1
2284
59
    {
2285
59
        std::set<uint64_t> moduleIDs;
2286
59
        for (const auto& m : modules ) {
2287
40
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
40
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
40
            moduleIDs.insert(moduleID);
2295
40
        }
2296
2297
59
        std::set<uint64_t> operationModuleIDs;
2298
76
        for (const auto& op : operations) {
2299
76
            operationModuleIDs.insert(op.first->ID);
2300
76
        }
2301
2302
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
59
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
59
    }
2310
59
#endif
2311
2312
59
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
59
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
135
    for (size_t i = 0; i < operations.size(); i++) {
2320
76
        auto& operation = operations[i];
2321
2322
76
        auto& module = operation.first;
2323
76
        auto& op = operation.second;
2324
2325
76
        if ( i > 0 ) {
2326
36
            auto& prevModule = operations[i-1].first;
2327
36
            auto& prevOp = operations[i].second;
2328
2329
36
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
36
                auto& curModifier = op.modifier.GetVectorPtr();
2331
36
                if ( curModifier.size() == 0 ) {
2332
8.20k
                    for (size_t j = 0; j < 512; j++) {
2333
8.19k
                        curModifier.push_back(1);
2334
8.19k
                    }
2335
20
                } else {
2336
1.48k
                    for (auto& c : curModifier) {
2337
1.48k
                        c++;
2338
1.48k
                    }
2339
20
                }
2340
36
            }
2341
36
        }
2342
2343
76
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
76
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
76
        const auto& result = results.back();
2350
2351
76
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
76
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
76
        if ( options.disableTests == false ) {
2369
76
            tests::test(op, result.second);
2370
76
        }
2371
2372
76
        postprocess(module, op, result);
2373
76
    }
2374
2375
59
    if ( options.noCompare == false ) {
2376
40
        compare(operations, results, data, size);
2377
40
    }
2378
59
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
52
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
52
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
52
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
101
    do {
2264
101
        auto op = getOp(&parentDs, data, size);
2265
101
        auto module = getModule(parentDs);
2266
101
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
101
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
101
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
101
    } while ( parentDs.Get<bool>() == true );
2277
2278
52
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
52
#if 1
2284
52
    {
2285
52
        std::set<uint64_t> moduleIDs;
2286
52
        for (const auto& m : modules ) {
2287
30
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
30
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
30
            moduleIDs.insert(moduleID);
2295
30
        }
2296
2297
52
        std::set<uint64_t> operationModuleIDs;
2298
54
        for (const auto& op : operations) {
2299
54
            operationModuleIDs.insert(op.first->ID);
2300
54
        }
2301
2302
52
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
52
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
52
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
52
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
52
    }
2310
52
#endif
2311
2312
52
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
52
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
106
    for (size_t i = 0; i < operations.size(); i++) {
2320
54
        auto& operation = operations[i];
2321
2322
54
        auto& module = operation.first;
2323
54
        auto& op = operation.second;
2324
2325
54
        if ( i > 0 ) {
2326
24
            auto& prevModule = operations[i-1].first;
2327
24
            auto& prevOp = operations[i].second;
2328
2329
24
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
24
                auto& curModifier = op.modifier.GetVectorPtr();
2331
24
                if ( curModifier.size() == 0 ) {
2332
3.07k
                    for (size_t j = 0; j < 512; j++) {
2333
3.07k
                        curModifier.push_back(1);
2334
3.07k
                    }
2335
18
                } else {
2336
356
                    for (auto& c : curModifier) {
2337
356
                        c++;
2338
356
                    }
2339
18
                }
2340
24
            }
2341
24
        }
2342
2343
54
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
54
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
54
        const auto& result = results.back();
2350
2351
54
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
54
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
54
        if ( options.disableTests == false ) {
2369
54
            tests::test(op, result.second);
2370
54
        }
2371
2372
54
        postprocess(module, op, result);
2373
54
    }
2374
2375
52
    if ( options.noCompare == false ) {
2376
30
        compare(operations, results, data, size);
2377
30
    }
2378
52
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
51
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
51
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
51
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
97
    do {
2264
97
        auto op = getOp(&parentDs, data, size);
2265
97
        auto module = getModule(parentDs);
2266
97
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
97
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
97
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
4
            break;
2275
4
        }
2276
97
    } while ( parentDs.Get<bool>() == true );
2277
2278
51
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
51
#if 1
2284
51
    {
2285
51
        std::set<uint64_t> moduleIDs;
2286
51
        for (const auto& m : modules ) {
2287
30
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
30
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
30
            moduleIDs.insert(moduleID);
2295
30
        }
2296
2297
51
        std::set<uint64_t> operationModuleIDs;
2298
61
        for (const auto& op : operations) {
2299
61
            operationModuleIDs.insert(op.first->ID);
2300
61
        }
2301
2302
51
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
51
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
51
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
51
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
51
    }
2310
51
#endif
2311
2312
51
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
51
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
112
    for (size_t i = 0; i < operations.size(); i++) {
2320
61
        auto& operation = operations[i];
2321
2322
61
        auto& module = operation.first;
2323
61
        auto& op = operation.second;
2324
2325
61
        if ( i > 0 ) {
2326
31
            auto& prevModule = operations[i-1].first;
2327
31
            auto& prevOp = operations[i].second;
2328
2329
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
31
                auto& curModifier = op.modifier.GetVectorPtr();
2331
31
                if ( curModifier.size() == 0 ) {
2332
9.74k
                    for (size_t j = 0; j < 512; j++) {
2333
9.72k
                        curModifier.push_back(1);
2334
9.72k
                    }
2335
19
                } else {
2336
250
                    for (auto& c : curModifier) {
2337
250
                        c++;
2338
250
                    }
2339
12
                }
2340
31
            }
2341
31
        }
2342
2343
61
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
61
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
61
        const auto& result = results.back();
2350
2351
61
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
61
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
61
        if ( options.disableTests == false ) {
2369
61
            tests::test(op, result.second);
2370
61
        }
2371
2372
61
        postprocess(module, op, result);
2373
61
    }
2374
2375
51
    if ( options.noCompare == false ) {
2376
30
        compare(operations, results, data, size);
2377
30
    }
2378
51
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
32
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
32
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
32
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
66
    do {
2264
66
        auto op = getOp(&parentDs, data, size);
2265
66
        auto module = getModule(parentDs);
2266
66
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
66
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
66
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
66
    } while ( parentDs.Get<bool>() == true );
2277
2278
32
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
32
#if 1
2284
32
    {
2285
32
        std::set<uint64_t> moduleIDs;
2286
32
        for (const auto& m : modules ) {
2287
17
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
17
            moduleIDs.insert(moduleID);
2295
17
        }
2296
2297
32
        std::set<uint64_t> operationModuleIDs;
2298
40
        for (const auto& op : operations) {
2299
40
            operationModuleIDs.insert(op.first->ID);
2300
40
        }
2301
2302
32
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
32
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
32
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
32
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
32
    }
2310
32
#endif
2311
2312
32
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
32
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
72
    for (size_t i = 0; i < operations.size(); i++) {
2320
40
        auto& operation = operations[i];
2321
2322
40
        auto& module = operation.first;
2323
40
        auto& op = operation.second;
2324
2325
40
        if ( i > 0 ) {
2326
23
            auto& prevModule = operations[i-1].first;
2327
23
            auto& prevOp = operations[i].second;
2328
2329
23
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
23
                auto& curModifier = op.modifier.GetVectorPtr();
2331
23
                if ( curModifier.size() == 0 ) {
2332
3.59k
                    for (size_t j = 0; j < 512; j++) {
2333
3.58k
                        curModifier.push_back(1);
2334
3.58k
                    }
2335
16
                } else {
2336
859
                    for (auto& c : curModifier) {
2337
859
                        c++;
2338
859
                    }
2339
16
                }
2340
23
            }
2341
23
        }
2342
2343
40
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
40
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
40
        const auto& result = results.back();
2350
2351
40
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
40
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
40
        if ( options.disableTests == false ) {
2369
40
            tests::test(op, result.second);
2370
40
        }
2371
2372
40
        postprocess(module, op, result);
2373
40
    }
2374
2375
32
    if ( options.noCompare == false ) {
2376
17
        compare(operations, results, data, size);
2377
17
    }
2378
32
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
83
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
83
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
83
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
128
    do {
2264
128
        auto op = getOp(&parentDs, data, size);
2265
128
        auto module = getModule(parentDs);
2266
128
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
128
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
128
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
128
    } while ( parentDs.Get<bool>() == true );
2277
2278
83
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
83
#if 1
2284
83
    {
2285
83
        std::set<uint64_t> moduleIDs;
2286
83
        for (const auto& m : modules ) {
2287
25
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
25
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
25
            moduleIDs.insert(moduleID);
2295
25
        }
2296
2297
83
        std::set<uint64_t> operationModuleIDs;
2298
83
        for (const auto& op : operations) {
2299
48
            operationModuleIDs.insert(op.first->ID);
2300
48
        }
2301
2302
83
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
83
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
83
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
83
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
83
    }
2310
83
#endif
2311
2312
83
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
83
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
131
    for (size_t i = 0; i < operations.size(); i++) {
2320
48
        auto& operation = operations[i];
2321
2322
48
        auto& module = operation.first;
2323
48
        auto& op = operation.second;
2324
2325
48
        if ( i > 0 ) {
2326
23
            auto& prevModule = operations[i-1].first;
2327
23
            auto& prevOp = operations[i].second;
2328
2329
23
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
23
                auto& curModifier = op.modifier.GetVectorPtr();
2331
23
                if ( curModifier.size() == 0 ) {
2332
5.64k
                    for (size_t j = 0; j < 512; j++) {
2333
5.63k
                        curModifier.push_back(1);
2334
5.63k
                    }
2335
12
                } else {
2336
508
                    for (auto& c : curModifier) {
2337
508
                        c++;
2338
508
                    }
2339
12
                }
2340
23
            }
2341
23
        }
2342
2343
48
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
48
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
48
        const auto& result = results.back();
2350
2351
48
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
48
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
48
        if ( options.disableTests == false ) {
2369
48
            tests::test(op, result.second);
2370
48
        }
2371
2372
48
        postprocess(module, op, result);
2373
48
    }
2374
2375
83
    if ( options.noCompare == false ) {
2376
25
        compare(operations, results, data, size);
2377
25
    }
2378
83
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
53
    do {
2264
53
        auto op = getOp(&parentDs, data, size);
2265
53
        auto module = getModule(parentDs);
2266
53
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
53
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
53
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
0
            break;
2275
0
        }
2276
53
    } while ( parentDs.Get<bool>() == true );
2277
2278
35
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
35
#if 1
2284
35
    {
2285
35
        std::set<uint64_t> moduleIDs;
2286
35
        for (const auto& m : modules ) {
2287
7
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
7
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
7
            moduleIDs.insert(moduleID);
2295
7
        }
2296
2297
35
        std::set<uint64_t> operationModuleIDs;
2298
35
        for (const auto& op : operations) {
2299
16
            operationModuleIDs.insert(op.first->ID);
2300
16
        }
2301
2302
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
35
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
35
    }
2310
35
#endif
2311
2312
35
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
35
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
51
    for (size_t i = 0; i < operations.size(); i++) {
2320
16
        auto& operation = operations[i];
2321
2322
16
        auto& module = operation.first;
2323
16
        auto& op = operation.second;
2324
2325
16
        if ( i > 0 ) {
2326
9
            auto& prevModule = operations[i-1].first;
2327
9
            auto& prevOp = operations[i].second;
2328
2329
9
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
9
                auto& curModifier = op.modifier.GetVectorPtr();
2331
9
                if ( curModifier.size() == 0 ) {
2332
1.53k
                    for (size_t j = 0; j < 512; j++) {
2333
1.53k
                        curModifier.push_back(1);
2334
1.53k
                    }
2335
6
                } else {
2336
4.39k
                    for (auto& c : curModifier) {
2337
4.39k
                        c++;
2338
4.39k
                    }
2339
6
                }
2340
9
            }
2341
9
        }
2342
2343
16
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
16
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
16
        const auto& result = results.back();
2350
2351
16
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
16
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
16
        if ( options.disableTests == false ) {
2369
16
            tests::test(op, result.second);
2370
16
        }
2371
2372
16
        postprocess(module, op, result);
2373
16
    }
2374
2375
35
    if ( options.noCompare == false ) {
2376
7
        compare(operations, results, data, size);
2377
7
    }
2378
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
47
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
47
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
47
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
97
    do {
2264
97
        auto op = getOp(&parentDs, data, size);
2265
97
        auto module = getModule(parentDs);
2266
97
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
97
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
97
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
97
    } while ( parentDs.Get<bool>() == true );
2277
2278
47
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
47
#if 1
2284
47
    {
2285
47
        std::set<uint64_t> moduleIDs;
2286
47
        for (const auto& m : modules ) {
2287
14
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
14
            moduleIDs.insert(moduleID);
2295
14
        }
2296
2297
47
        std::set<uint64_t> operationModuleIDs;
2298
47
        for (const auto& op : operations) {
2299
40
            operationModuleIDs.insert(op.first->ID);
2300
40
        }
2301
2302
47
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
47
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
47
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
47
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
47
    }
2310
47
#endif
2311
2312
47
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
47
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
87
    for (size_t i = 0; i < operations.size(); i++) {
2320
40
        auto& operation = operations[i];
2321
2322
40
        auto& module = operation.first;
2323
40
        auto& op = operation.second;
2324
2325
40
        if ( i > 0 ) {
2326
26
            auto& prevModule = operations[i-1].first;
2327
26
            auto& prevOp = operations[i].second;
2328
2329
26
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
26
                auto& curModifier = op.modifier.GetVectorPtr();
2331
26
                if ( curModifier.size() == 0 ) {
2332
7.69k
                    for (size_t j = 0; j < 512; j++) {
2333
7.68k
                        curModifier.push_back(1);
2334
7.68k
                    }
2335
15
                } else {
2336
303
                    for (auto& c : curModifier) {
2337
303
                        c++;
2338
303
                    }
2339
11
                }
2340
26
            }
2341
26
        }
2342
2343
40
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
40
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
40
        const auto& result = results.back();
2350
2351
40
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
40
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
40
        if ( options.disableTests == false ) {
2369
40
            tests::test(op, result.second);
2370
40
        }
2371
2372
40
        postprocess(module, op, result);
2373
40
    }
2374
2375
47
    if ( options.noCompare == false ) {
2376
14
        compare(operations, results, data, size);
2377
14
    }
2378
47
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
51
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
51
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
51
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
100
    do {
2264
100
        auto op = getOp(&parentDs, data, size);
2265
100
        auto module = getModule(parentDs);
2266
100
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
100
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
100
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
3
            break;
2275
3
        }
2276
100
    } while ( parentDs.Get<bool>() == true );
2277
2278
51
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
51
#if 1
2284
51
    {
2285
51
        std::set<uint64_t> moduleIDs;
2286
51
        for (const auto& m : modules ) {
2287
17
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
17
            moduleIDs.insert(moduleID);
2295
17
        }
2296
2297
51
        std::set<uint64_t> operationModuleIDs;
2298
51
        for (const auto& op : operations) {
2299
50
            operationModuleIDs.insert(op.first->ID);
2300
50
        }
2301
2302
51
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
51
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
51
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
51
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
51
    }
2310
51
#endif
2311
2312
51
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
51
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
101
    for (size_t i = 0; i < operations.size(); i++) {
2320
50
        auto& operation = operations[i];
2321
2322
50
        auto& module = operation.first;
2323
50
        auto& op = operation.second;
2324
2325
50
        if ( i > 0 ) {
2326
33
            auto& prevModule = operations[i-1].first;
2327
33
            auto& prevOp = operations[i].second;
2328
2329
33
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
33
                auto& curModifier = op.modifier.GetVectorPtr();
2331
33
                if ( curModifier.size() == 0 ) {
2332
10.7k
                    for (size_t j = 0; j < 512; j++) {
2333
10.7k
                        curModifier.push_back(1);
2334
10.7k
                    }
2335
21
                } else {
2336
2.77k
                    for (auto& c : curModifier) {
2337
2.77k
                        c++;
2338
2.77k
                    }
2339
12
                }
2340
33
            }
2341
33
        }
2342
2343
50
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
50
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
50
        const auto& result = results.back();
2350
2351
50
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
50
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
50
        if ( options.disableTests == false ) {
2369
50
            tests::test(op, result.second);
2370
50
        }
2371
2372
50
        postprocess(module, op, result);
2373
50
    }
2374
2375
51
    if ( options.noCompare == false ) {
2376
17
        compare(operations, results, data, size);
2377
17
    }
2378
51
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
44
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
44
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
44
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
99
    do {
2264
99
        auto op = getOp(&parentDs, data, size);
2265
99
        auto module = getModule(parentDs);
2266
99
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
99
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
99
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
99
    } while ( parentDs.Get<bool>() == true );
2277
2278
44
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
44
#if 1
2284
44
    {
2285
44
        std::set<uint64_t> moduleIDs;
2286
44
        for (const auto& m : modules ) {
2287
19
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
19
            moduleIDs.insert(moduleID);
2295
19
        }
2296
2297
44
        std::set<uint64_t> operationModuleIDs;
2298
44
        for (const auto& op : operations) {
2299
43
            operationModuleIDs.insert(op.first->ID);
2300
43
        }
2301
2302
44
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
44
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
44
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
44
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
44
    }
2310
44
#endif
2311
2312
44
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
44
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
87
    for (size_t i = 0; i < operations.size(); i++) {
2320
43
        auto& operation = operations[i];
2321
2322
43
        auto& module = operation.first;
2323
43
        auto& op = operation.second;
2324
2325
43
        if ( i > 0 ) {
2326
24
            auto& prevModule = operations[i-1].first;
2327
24
            auto& prevOp = operations[i].second;
2328
2329
24
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
24
                auto& curModifier = op.modifier.GetVectorPtr();
2331
24
                if ( curModifier.size() == 0 ) {
2332
5.13k
                    for (size_t j = 0; j < 512; j++) {
2333
5.12k
                        curModifier.push_back(1);
2334
5.12k
                    }
2335
14
                } else {
2336
4.57k
                    for (auto& c : curModifier) {
2337
4.57k
                        c++;
2338
4.57k
                    }
2339
14
                }
2340
24
            }
2341
24
        }
2342
2343
43
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
43
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
43
        const auto& result = results.back();
2350
2351
43
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
43
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
43
        if ( options.disableTests == false ) {
2369
43
            tests::test(op, result.second);
2370
43
        }
2371
2372
43
        postprocess(module, op, result);
2373
43
    }
2374
2375
44
    if ( options.noCompare == false ) {
2376
19
        compare(operations, results, data, size);
2377
19
    }
2378
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
40
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
40
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
40
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
93
    do {
2264
93
        auto op = getOp(&parentDs, data, size);
2265
93
        auto module = getModule(parentDs);
2266
93
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
93
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
93
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
93
    } while ( parentDs.Get<bool>() == true );
2277
2278
40
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
40
#if 1
2284
40
    {
2285
40
        std::set<uint64_t> moduleIDs;
2286
40
        for (const auto& m : modules ) {
2287
19
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
19
            moduleIDs.insert(moduleID);
2295
19
        }
2296
2297
40
        std::set<uint64_t> operationModuleIDs;
2298
47
        for (const auto& op : operations) {
2299
47
            operationModuleIDs.insert(op.first->ID);
2300
47
        }
2301
2302
40
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
40
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
40
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
40
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
40
    }
2310
40
#endif
2311
2312
40
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
40
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
87
    for (size_t i = 0; i < operations.size(); i++) {
2320
47
        auto& operation = operations[i];
2321
2322
47
        auto& module = operation.first;
2323
47
        auto& op = operation.second;
2324
2325
47
        if ( i > 0 ) {
2326
28
            auto& prevModule = operations[i-1].first;
2327
28
            auto& prevOp = operations[i].second;
2328
2329
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
28
                auto& curModifier = op.modifier.GetVectorPtr();
2331
28
                if ( curModifier.size() == 0 ) {
2332
4.61k
                    for (size_t j = 0; j < 512; j++) {
2333
4.60k
                        curModifier.push_back(1);
2334
4.60k
                    }
2335
19
                } else {
2336
1.77k
                    for (auto& c : curModifier) {
2337
1.77k
                        c++;
2338
1.77k
                    }
2339
19
                }
2340
28
            }
2341
28
        }
2342
2343
47
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
47
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
47
        const auto& result = results.back();
2350
2351
47
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
47
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
47
        if ( options.disableTests == false ) {
2369
47
            tests::test(op, result.second);
2370
47
        }
2371
2372
47
        postprocess(module, op, result);
2373
47
    }
2374
2375
40
    if ( options.noCompare == false ) {
2376
19
        compare(operations, results, data, size);
2377
19
    }
2378
40
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
49
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
49
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
49
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
100
    do {
2264
100
        auto op = getOp(&parentDs, data, size);
2265
100
        auto module = getModule(parentDs);
2266
100
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
100
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
100
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
100
    } while ( parentDs.Get<bool>() == true );
2277
2278
49
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
49
#if 1
2284
49
    {
2285
49
        std::set<uint64_t> moduleIDs;
2286
49
        for (const auto& m : modules ) {
2287
20
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
20
            moduleIDs.insert(moduleID);
2295
20
        }
2296
2297
49
        std::set<uint64_t> operationModuleIDs;
2298
49
        for (const auto& op : operations) {
2299
47
            operationModuleIDs.insert(op.first->ID);
2300
47
        }
2301
2302
49
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
49
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
49
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
49
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
49
    }
2310
49
#endif
2311
2312
49
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
49
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
96
    for (size_t i = 0; i < operations.size(); i++) {
2320
47
        auto& operation = operations[i];
2321
2322
47
        auto& module = operation.first;
2323
47
        auto& op = operation.second;
2324
2325
47
        if ( i > 0 ) {
2326
27
            auto& prevModule = operations[i-1].first;
2327
27
            auto& prevOp = operations[i].second;
2328
2329
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
27
                auto& curModifier = op.modifier.GetVectorPtr();
2331
27
                if ( curModifier.size() == 0 ) {
2332
5.64k
                    for (size_t j = 0; j < 512; j++) {
2333
5.63k
                        curModifier.push_back(1);
2334
5.63k
                    }
2335
16
                } else {
2336
645
                    for (auto& c : curModifier) {
2337
645
                        c++;
2338
645
                    }
2339
16
                }
2340
27
            }
2341
27
        }
2342
2343
47
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
47
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
47
        const auto& result = results.back();
2350
2351
47
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
47
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
47
        if ( options.disableTests == false ) {
2369
47
            tests::test(op, result.second);
2370
47
        }
2371
2372
47
        postprocess(module, op, result);
2373
47
    }
2374
2375
49
    if ( options.noCompare == false ) {
2376
20
        compare(operations, results, data, size);
2377
20
    }
2378
49
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
40
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
40
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
40
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
81
    do {
2264
81
        auto op = getOp(&parentDs, data, size);
2265
81
        auto module = getModule(parentDs);
2266
81
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
81
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
81
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
81
    } while ( parentDs.Get<bool>() == true );
2277
2278
40
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
40
#if 1
2284
40
    {
2285
40
        std::set<uint64_t> moduleIDs;
2286
40
        for (const auto& m : modules ) {
2287
23
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
23
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
23
            moduleIDs.insert(moduleID);
2295
23
        }
2296
2297
40
        std::set<uint64_t> operationModuleIDs;
2298
52
        for (const auto& op : operations) {
2299
52
            operationModuleIDs.insert(op.first->ID);
2300
52
        }
2301
2302
40
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
40
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
40
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
40
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
40
    }
2310
40
#endif
2311
2312
40
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
40
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
92
    for (size_t i = 0; i < operations.size(); i++) {
2320
52
        auto& operation = operations[i];
2321
2322
52
        auto& module = operation.first;
2323
52
        auto& op = operation.second;
2324
2325
52
        if ( i > 0 ) {
2326
29
            auto& prevModule = operations[i-1].first;
2327
29
            auto& prevOp = operations[i].second;
2328
2329
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
29
                auto& curModifier = op.modifier.GetVectorPtr();
2331
29
                if ( curModifier.size() == 0 ) {
2332
5.64k
                    for (size_t j = 0; j < 512; j++) {
2333
5.63k
                        curModifier.push_back(1);
2334
5.63k
                    }
2335
18
                } else {
2336
1.69k
                    for (auto& c : curModifier) {
2337
1.69k
                        c++;
2338
1.69k
                    }
2339
18
                }
2340
29
            }
2341
29
        }
2342
2343
52
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
52
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
52
        const auto& result = results.back();
2350
2351
52
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
52
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
52
        if ( options.disableTests == false ) {
2369
52
            tests::test(op, result.second);
2370
52
        }
2371
2372
52
        postprocess(module, op, result);
2373
52
    }
2374
2375
40
    if ( options.noCompare == false ) {
2376
23
        compare(operations, results, data, size);
2377
23
    }
2378
40
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
44
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
44
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
44
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
95
    do {
2264
95
        auto op = getOp(&parentDs, data, size);
2265
95
        auto module = getModule(parentDs);
2266
95
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
95
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
95
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
4
            break;
2275
4
        }
2276
95
    } while ( parentDs.Get<bool>() == true );
2277
2278
44
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
44
#if 1
2284
44
    {
2285
44
        std::set<uint64_t> moduleIDs;
2286
44
        for (const auto& m : modules ) {
2287
23
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
23
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
23
            moduleIDs.insert(moduleID);
2295
23
        }
2296
2297
44
        std::set<uint64_t> operationModuleIDs;
2298
55
        for (const auto& op : operations) {
2299
55
            operationModuleIDs.insert(op.first->ID);
2300
55
        }
2301
2302
44
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
44
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
44
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
44
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
44
    }
2310
44
#endif
2311
2312
44
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
44
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
99
    for (size_t i = 0; i < operations.size(); i++) {
2320
55
        auto& operation = operations[i];
2321
2322
55
        auto& module = operation.first;
2323
55
        auto& op = operation.second;
2324
2325
55
        if ( i > 0 ) {
2326
32
            auto& prevModule = operations[i-1].first;
2327
32
            auto& prevOp = operations[i].second;
2328
2329
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
32
                auto& curModifier = op.modifier.GetVectorPtr();
2331
32
                if ( curModifier.size() == 0 ) {
2332
3.59k
                    for (size_t j = 0; j < 512; j++) {
2333
3.58k
                        curModifier.push_back(1);
2334
3.58k
                    }
2335
25
                } else {
2336
463
                    for (auto& c : curModifier) {
2337
463
                        c++;
2338
463
                    }
2339
25
                }
2340
32
            }
2341
32
        }
2342
2343
55
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
55
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
55
        const auto& result = results.back();
2350
2351
55
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
55
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
55
        if ( options.disableTests == false ) {
2369
55
            tests::test(op, result.second);
2370
55
        }
2371
2372
55
        postprocess(module, op, result);
2373
55
    }
2374
2375
44
    if ( options.noCompare == false ) {
2376
23
        compare(operations, results, data, size);
2377
23
    }
2378
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
41
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
41
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
41
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
81
    do {
2264
81
        auto op = getOp(&parentDs, data, size);
2265
81
        auto module = getModule(parentDs);
2266
81
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
81
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
81
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
81
    } while ( parentDs.Get<bool>() == true );
2277
2278
41
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
41
#if 1
2284
41
    {
2285
41
        std::set<uint64_t> moduleIDs;
2286
41
        for (const auto& m : modules ) {
2287
22
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
22
            moduleIDs.insert(moduleID);
2295
22
        }
2296
2297
41
        std::set<uint64_t> operationModuleIDs;
2298
43
        for (const auto& op : operations) {
2299
43
            operationModuleIDs.insert(op.first->ID);
2300
43
        }
2301
2302
41
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
41
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
41
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
41
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
41
    }
2310
41
#endif
2311
2312
41
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
41
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
84
    for (size_t i = 0; i < operations.size(); i++) {
2320
43
        auto& operation = operations[i];
2321
2322
43
        auto& module = operation.first;
2323
43
        auto& op = operation.second;
2324
2325
43
        if ( i > 0 ) {
2326
21
            auto& prevModule = operations[i-1].first;
2327
21
            auto& prevOp = operations[i].second;
2328
2329
21
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
21
                auto& curModifier = op.modifier.GetVectorPtr();
2331
21
                if ( curModifier.size() == 0 ) {
2332
5.13k
                    for (size_t j = 0; j < 512; j++) {
2333
5.12k
                        curModifier.push_back(1);
2334
5.12k
                    }
2335
11
                } else {
2336
458
                    for (auto& c : curModifier) {
2337
458
                        c++;
2338
458
                    }
2339
11
                }
2340
21
            }
2341
21
        }
2342
2343
43
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
43
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
43
        const auto& result = results.back();
2350
2351
43
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
43
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
43
        if ( options.disableTests == false ) {
2369
43
            tests::test(op, result.second);
2370
43
        }
2371
2372
43
        postprocess(module, op, result);
2373
43
    }
2374
2375
41
    if ( options.noCompare == false ) {
2376
22
        compare(operations, results, data, size);
2377
22
    }
2378
41
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
63
    do {
2264
63
        auto op = getOp(&parentDs, data, size);
2265
63
        auto module = getModule(parentDs);
2266
63
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
63
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
63
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
0
            break;
2275
0
        }
2276
63
    } while ( parentDs.Get<bool>() == true );
2277
2278
29
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
29
#if 1
2284
29
    {
2285
29
        std::set<uint64_t> moduleIDs;
2286
29
        for (const auto& m : modules ) {
2287
14
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
14
            moduleIDs.insert(moduleID);
2295
14
        }
2296
2297
29
        std::set<uint64_t> operationModuleIDs;
2298
30
        for (const auto& op : operations) {
2299
30
            operationModuleIDs.insert(op.first->ID);
2300
30
        }
2301
2302
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
29
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
29
    }
2310
29
#endif
2311
2312
29
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
29
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
59
    for (size_t i = 0; i < operations.size(); i++) {
2320
30
        auto& operation = operations[i];
2321
2322
30
        auto& module = operation.first;
2323
30
        auto& op = operation.second;
2324
2325
30
        if ( i > 0 ) {
2326
16
            auto& prevModule = operations[i-1].first;
2327
16
            auto& prevOp = operations[i].second;
2328
2329
16
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
16
                auto& curModifier = op.modifier.GetVectorPtr();
2331
16
                if ( curModifier.size() == 0 ) {
2332
2.56k
                    for (size_t j = 0; j < 512; j++) {
2333
2.56k
                        curModifier.push_back(1);
2334
2.56k
                    }
2335
11
                } else {
2336
583
                    for (auto& c : curModifier) {
2337
583
                        c++;
2338
583
                    }
2339
11
                }
2340
16
            }
2341
16
        }
2342
2343
30
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
30
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
30
        const auto& result = results.back();
2350
2351
30
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
30
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
30
        if ( options.disableTests == false ) {
2369
30
            tests::test(op, result.second);
2370
30
        }
2371
2372
30
        postprocess(module, op, result);
2373
30
    }
2374
2375
29
    if ( options.noCompare == false ) {
2376
14
        compare(operations, results, data, size);
2377
14
    }
2378
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
82
    do {
2264
82
        auto op = getOp(&parentDs, data, size);
2265
82
        auto module = getModule(parentDs);
2266
82
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
82
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
82
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
82
    } while ( parentDs.Get<bool>() == true );
2277
2278
39
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
39
#if 1
2284
39
    {
2285
39
        std::set<uint64_t> moduleIDs;
2286
39
        for (const auto& m : modules ) {
2287
28
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
28
            moduleIDs.insert(moduleID);
2295
28
        }
2296
2297
39
        std::set<uint64_t> operationModuleIDs;
2298
60
        for (const auto& op : operations) {
2299
60
            operationModuleIDs.insert(op.first->ID);
2300
60
        }
2301
2302
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
39
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
39
    }
2310
39
#endif
2311
2312
39
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
39
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
99
    for (size_t i = 0; i < operations.size(); i++) {
2320
60
        auto& operation = operations[i];
2321
2322
60
        auto& module = operation.first;
2323
60
        auto& op = operation.second;
2324
2325
60
        if ( i > 0 ) {
2326
32
            auto& prevModule = operations[i-1].first;
2327
32
            auto& prevOp = operations[i].second;
2328
2329
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
32
                auto& curModifier = op.modifier.GetVectorPtr();
2331
32
                if ( curModifier.size() == 0 ) {
2332
5.64k
                    for (size_t j = 0; j < 512; j++) {
2333
5.63k
                        curModifier.push_back(1);
2334
5.63k
                    }
2335
21
                } else {
2336
1.00k
                    for (auto& c : curModifier) {
2337
1.00k
                        c++;
2338
1.00k
                    }
2339
21
                }
2340
32
            }
2341
32
        }
2342
2343
60
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
60
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
60
        const auto& result = results.back();
2350
2351
60
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
60
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
60
        if ( options.disableTests == false ) {
2369
60
            tests::test(op, result.second);
2370
60
        }
2371
2372
60
        postprocess(module, op, result);
2373
60
    }
2374
2375
39
    if ( options.noCompare == false ) {
2376
28
        compare(operations, results, data, size);
2377
28
    }
2378
39
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
74
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
74
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
74
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
124
    do {
2264
124
        auto op = getOp(&parentDs, data, size);
2265
124
        auto module = getModule(parentDs);
2266
124
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
124
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
124
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
4
            break;
2275
4
        }
2276
124
    } while ( parentDs.Get<bool>() == true );
2277
2278
74
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
74
#if 1
2284
74
    {
2285
74
        std::set<uint64_t> moduleIDs;
2286
74
        for (const auto& m : modules ) {
2287
55
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
55
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
55
            moduleIDs.insert(moduleID);
2295
55
        }
2296
2297
74
        std::set<uint64_t> operationModuleIDs;
2298
83
        for (const auto& op : operations) {
2299
83
            operationModuleIDs.insert(op.first->ID);
2300
83
        }
2301
2302
74
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
74
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
74
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
74
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
74
    }
2310
74
#endif
2311
2312
74
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
74
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
157
    for (size_t i = 0; i < operations.size(); i++) {
2320
83
        auto& operation = operations[i];
2321
2322
83
        auto& module = operation.first;
2323
83
        auto& op = operation.second;
2324
2325
83
        if ( i > 0 ) {
2326
28
            auto& prevModule = operations[i-1].first;
2327
28
            auto& prevOp = operations[i].second;
2328
2329
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
28
                auto& curModifier = op.modifier.GetVectorPtr();
2331
28
                if ( curModifier.size() == 0 ) {
2332
10.2k
                    for (size_t j = 0; j < 512; j++) {
2333
10.2k
                        curModifier.push_back(1);
2334
10.2k
                    }
2335
20
                } else {
2336
1.02k
                    for (auto& c : curModifier) {
2337
1.02k
                        c++;
2338
1.02k
                    }
2339
8
                }
2340
28
            }
2341
28
        }
2342
2343
83
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
83
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
83
        const auto& result = results.back();
2350
2351
83
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
83
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
83
        if ( options.disableTests == false ) {
2369
83
            tests::test(op, result.second);
2370
83
        }
2371
2372
83
        postprocess(module, op, result);
2373
83
    }
2374
2375
74
    if ( options.noCompare == false ) {
2376
55
        compare(operations, results, data, size);
2377
55
    }
2378
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
33
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
33
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
33
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
68
    do {
2264
68
        auto op = getOp(&parentDs, data, size);
2265
68
        auto module = getModule(parentDs);
2266
68
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
68
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
68
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
0
            break;
2275
0
        }
2276
68
    } while ( parentDs.Get<bool>() == true );
2277
2278
33
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
33
#if 1
2284
33
    {
2285
33
        std::set<uint64_t> moduleIDs;
2286
33
        for (const auto& m : modules ) {
2287
13
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
13
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
13
            moduleIDs.insert(moduleID);
2295
13
        }
2296
2297
33
        std::set<uint64_t> operationModuleIDs;
2298
33
        for (const auto& op : operations) {
2299
26
            operationModuleIDs.insert(op.first->ID);
2300
26
        }
2301
2302
33
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
33
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
33
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
33
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
33
    }
2310
33
#endif
2311
2312
33
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
33
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
59
    for (size_t i = 0; i < operations.size(); i++) {
2320
26
        auto& operation = operations[i];
2321
2322
26
        auto& module = operation.first;
2323
26
        auto& op = operation.second;
2324
2325
26
        if ( i > 0 ) {
2326
13
            auto& prevModule = operations[i-1].first;
2327
13
            auto& prevOp = operations[i].second;
2328
2329
13
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
13
                auto& curModifier = op.modifier.GetVectorPtr();
2331
13
                if ( curModifier.size() == 0 ) {
2332
2.05k
                    for (size_t j = 0; j < 512; j++) {
2333
2.04k
                        curModifier.push_back(1);
2334
2.04k
                    }
2335
9
                } else {
2336
546
                    for (auto& c : curModifier) {
2337
546
                        c++;
2338
546
                    }
2339
9
                }
2340
13
            }
2341
13
        }
2342
2343
26
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
26
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
26
        const auto& result = results.back();
2350
2351
26
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
26
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
26
        if ( options.disableTests == false ) {
2369
26
            tests::test(op, result.second);
2370
26
        }
2371
2372
26
        postprocess(module, op, result);
2373
26
    }
2374
2375
33
    if ( options.noCompare == false ) {
2376
13
        compare(operations, results, data, size);
2377
13
    }
2378
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
33
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
33
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
33
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
72
    do {
2264
72
        auto op = getOp(&parentDs, data, size);
2265
72
        auto module = getModule(parentDs);
2266
72
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
72
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
72
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
72
    } while ( parentDs.Get<bool>() == true );
2277
2278
33
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
33
#if 1
2284
33
    {
2285
33
        std::set<uint64_t> moduleIDs;
2286
33
        for (const auto& m : modules ) {
2287
15
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
15
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
15
            moduleIDs.insert(moduleID);
2295
15
        }
2296
2297
33
        std::set<uint64_t> operationModuleIDs;
2298
34
        for (const auto& op : operations) {
2299
34
            operationModuleIDs.insert(op.first->ID);
2300
34
        }
2301
2302
33
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
33
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
33
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
33
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
33
    }
2310
33
#endif
2311
2312
33
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
33
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
67
    for (size_t i = 0; i < operations.size(); i++) {
2320
34
        auto& operation = operations[i];
2321
2322
34
        auto& module = operation.first;
2323
34
        auto& op = operation.second;
2324
2325
34
        if ( i > 0 ) {
2326
19
            auto& prevModule = operations[i-1].first;
2327
19
            auto& prevOp = operations[i].second;
2328
2329
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
19
                auto& curModifier = op.modifier.GetVectorPtr();
2331
19
                if ( curModifier.size() == 0 ) {
2332
3.59k
                    for (size_t j = 0; j < 512; j++) {
2333
3.58k
                        curModifier.push_back(1);
2334
3.58k
                    }
2335
12
                } else {
2336
585
                    for (auto& c : curModifier) {
2337
585
                        c++;
2338
585
                    }
2339
12
                }
2340
19
            }
2341
19
        }
2342
2343
34
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
34
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
34
        const auto& result = results.back();
2350
2351
34
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
34
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
34
        if ( options.disableTests == false ) {
2369
34
            tests::test(op, result.second);
2370
34
        }
2371
2372
34
        postprocess(module, op, result);
2373
34
    }
2374
2375
33
    if ( options.noCompare == false ) {
2376
15
        compare(operations, results, data, size);
2377
15
    }
2378
33
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
96
    do {
2264
96
        auto op = getOp(&parentDs, data, size);
2265
96
        auto module = getModule(parentDs);
2266
96
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
96
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
96
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
96
    } while ( parentDs.Get<bool>() == true );
2277
2278
39
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
39
#if 1
2284
39
    {
2285
39
        std::set<uint64_t> moduleIDs;
2286
39
        for (const auto& m : modules ) {
2287
14
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
14
            moduleIDs.insert(moduleID);
2295
14
        }
2296
2297
39
        std::set<uint64_t> operationModuleIDs;
2298
39
        for (const auto& op : operations) {
2299
38
            operationModuleIDs.insert(op.first->ID);
2300
38
        }
2301
2302
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
39
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
39
    }
2310
39
#endif
2311
2312
39
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
39
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
77
    for (size_t i = 0; i < operations.size(); i++) {
2320
38
        auto& operation = operations[i];
2321
2322
38
        auto& module = operation.first;
2323
38
        auto& op = operation.second;
2324
2325
38
        if ( i > 0 ) {
2326
24
            auto& prevModule = operations[i-1].first;
2327
24
            auto& prevOp = operations[i].second;
2328
2329
24
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
24
                auto& curModifier = op.modifier.GetVectorPtr();
2331
24
                if ( curModifier.size() == 0 ) {
2332
4.61k
                    for (size_t j = 0; j < 512; j++) {
2333
4.60k
                        curModifier.push_back(1);
2334
4.60k
                    }
2335
15
                } else {
2336
916
                    for (auto& c : curModifier) {
2337
916
                        c++;
2338
916
                    }
2339
15
                }
2340
24
            }
2341
24
        }
2342
2343
38
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
38
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
38
        const auto& result = results.back();
2350
2351
38
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
38
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
38
        if ( options.disableTests == false ) {
2369
38
            tests::test(op, result.second);
2370
38
        }
2371
2372
38
        postprocess(module, op, result);
2373
38
    }
2374
2375
39
    if ( options.noCompare == false ) {
2376
14
        compare(operations, results, data, size);
2377
14
    }
2378
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
82
    do {
2264
82
        auto op = getOp(&parentDs, data, size);
2265
82
        auto module = getModule(parentDs);
2266
82
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
82
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
82
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
82
    } while ( parentDs.Get<bool>() == true );
2277
2278
34
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
34
#if 1
2284
34
    {
2285
34
        std::set<uint64_t> moduleIDs;
2286
34
        for (const auto& m : modules ) {
2287
16
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
16
            moduleIDs.insert(moduleID);
2295
16
        }
2296
2297
34
        std::set<uint64_t> operationModuleIDs;
2298
41
        for (const auto& op : operations) {
2299
41
            operationModuleIDs.insert(op.first->ID);
2300
41
        }
2301
2302
34
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
34
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
34
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
34
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
34
    }
2310
34
#endif
2311
2312
34
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
34
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
75
    for (size_t i = 0; i < operations.size(); i++) {
2320
41
        auto& operation = operations[i];
2321
2322
41
        auto& module = operation.first;
2323
41
        auto& op = operation.second;
2324
2325
41
        if ( i > 0 ) {
2326
25
            auto& prevModule = operations[i-1].first;
2327
25
            auto& prevOp = operations[i].second;
2328
2329
25
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
25
                auto& curModifier = op.modifier.GetVectorPtr();
2331
25
                if ( curModifier.size() == 0 ) {
2332
5.13k
                    for (size_t j = 0; j < 512; j++) {
2333
5.12k
                        curModifier.push_back(1);
2334
5.12k
                    }
2335
15
                } else {
2336
854
                    for (auto& c : curModifier) {
2337
854
                        c++;
2338
854
                    }
2339
15
                }
2340
25
            }
2341
25
        }
2342
2343
41
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
41
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
41
        const auto& result = results.back();
2350
2351
41
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
41
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
41
        if ( options.disableTests == false ) {
2369
41
            tests::test(op, result.second);
2370
41
        }
2371
2372
41
        postprocess(module, op, result);
2373
41
    }
2374
2375
34
    if ( options.noCompare == false ) {
2376
16
        compare(operations, results, data, size);
2377
16
    }
2378
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
26
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
26
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
26
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
54
    do {
2264
54
        auto op = getOp(&parentDs, data, size);
2265
54
        auto module = getModule(parentDs);
2266
54
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
54
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
54
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
3
            break;
2275
3
        }
2276
54
    } while ( parentDs.Get<bool>() == true );
2277
2278
26
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
26
#if 1
2284
26
    {
2285
26
        std::set<uint64_t> moduleIDs;
2286
26
        for (const auto& m : modules ) {
2287
16
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
16
            moduleIDs.insert(moduleID);
2295
16
        }
2296
2297
26
        std::set<uint64_t> operationModuleIDs;
2298
32
        for (const auto& op : operations) {
2299
32
            operationModuleIDs.insert(op.first->ID);
2300
32
        }
2301
2302
26
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
26
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
26
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
26
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
26
    }
2310
26
#endif
2311
2312
26
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
26
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
58
    for (size_t i = 0; i < operations.size(); i++) {
2320
32
        auto& operation = operations[i];
2321
2322
32
        auto& module = operation.first;
2323
32
        auto& op = operation.second;
2324
2325
32
        if ( i > 0 ) {
2326
16
            auto& prevModule = operations[i-1].first;
2327
16
            auto& prevOp = operations[i].second;
2328
2329
16
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
16
                auto& curModifier = op.modifier.GetVectorPtr();
2331
16
                if ( curModifier.size() == 0 ) {
2332
2.05k
                    for (size_t j = 0; j < 512; j++) {
2333
2.04k
                        curModifier.push_back(1);
2334
2.04k
                    }
2335
12
                } else {
2336
306
                    for (auto& c : curModifier) {
2337
306
                        c++;
2338
306
                    }
2339
12
                }
2340
16
            }
2341
16
        }
2342
2343
32
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
32
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
32
        const auto& result = results.back();
2350
2351
32
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
32
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
32
        if ( options.disableTests == false ) {
2369
32
            tests::test(op, result.second);
2370
32
        }
2371
2372
32
        postprocess(module, op, result);
2373
32
    }
2374
2375
26
    if ( options.noCompare == false ) {
2376
16
        compare(operations, results, data, size);
2377
16
    }
2378
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
63
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
63
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
63
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
107
    do {
2264
107
        auto op = getOp(&parentDs, data, size);
2265
107
        auto module = getModule(parentDs);
2266
107
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
107
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
107
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
107
    } while ( parentDs.Get<bool>() == true );
2277
2278
63
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
63
#if 1
2284
63
    {
2285
63
        std::set<uint64_t> moduleIDs;
2286
63
        for (const auto& m : modules ) {
2287
51
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
51
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
51
            moduleIDs.insert(moduleID);
2295
51
        }
2296
2297
63
        std::set<uint64_t> operationModuleIDs;
2298
84
        for (const auto& op : operations) {
2299
84
            operationModuleIDs.insert(op.first->ID);
2300
84
        }
2301
2302
63
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
63
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
63
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
63
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
63
    }
2310
63
#endif
2311
2312
63
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
63
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
147
    for (size_t i = 0; i < operations.size(); i++) {
2320
84
        auto& operation = operations[i];
2321
2322
84
        auto& module = operation.first;
2323
84
        auto& op = operation.second;
2324
2325
84
        if ( i > 0 ) {
2326
33
            auto& prevModule = operations[i-1].first;
2327
33
            auto& prevOp = operations[i].second;
2328
2329
33
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
33
                auto& curModifier = op.modifier.GetVectorPtr();
2331
33
                if ( curModifier.size() == 0 ) {
2332
5.64k
                    for (size_t j = 0; j < 512; j++) {
2333
5.63k
                        curModifier.push_back(1);
2334
5.63k
                    }
2335
22
                } else {
2336
2.67k
                    for (auto& c : curModifier) {
2337
2.67k
                        c++;
2338
2.67k
                    }
2339
22
                }
2340
33
            }
2341
33
        }
2342
2343
84
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
84
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
84
        const auto& result = results.back();
2350
2351
84
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
84
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
84
        if ( options.disableTests == false ) {
2369
84
            tests::test(op, result.second);
2370
84
        }
2371
2372
84
        postprocess(module, op, result);
2373
84
    }
2374
2375
63
    if ( options.noCompare == false ) {
2376
51
        compare(operations, results, data, size);
2377
51
    }
2378
63
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
60
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
60
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
60
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
98
    do {
2264
98
        auto op = getOp(&parentDs, data, size);
2265
98
        auto module = getModule(parentDs);
2266
98
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
98
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
98
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
4
            break;
2275
4
        }
2276
98
    } while ( parentDs.Get<bool>() == true );
2277
2278
60
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
60
#if 1
2284
60
    {
2285
60
        std::set<uint64_t> moduleIDs;
2286
60
        for (const auto& m : modules ) {
2287
47
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
47
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
47
            moduleIDs.insert(moduleID);
2295
47
        }
2296
2297
60
        std::set<uint64_t> operationModuleIDs;
2298
76
        for (const auto& op : operations) {
2299
76
            operationModuleIDs.insert(op.first->ID);
2300
76
        }
2301
2302
60
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
60
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
60
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
60
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
60
    }
2310
60
#endif
2311
2312
60
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
60
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
136
    for (size_t i = 0; i < operations.size(); i++) {
2320
76
        auto& operation = operations[i];
2321
2322
76
        auto& module = operation.first;
2323
76
        auto& op = operation.second;
2324
2325
76
        if ( i > 0 ) {
2326
29
            auto& prevModule = operations[i-1].first;
2327
29
            auto& prevOp = operations[i].second;
2328
2329
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
29
                auto& curModifier = op.modifier.GetVectorPtr();
2331
29
                if ( curModifier.size() == 0 ) {
2332
8.20k
                    for (size_t j = 0; j < 512; j++) {
2333
8.19k
                        curModifier.push_back(1);
2334
8.19k
                    }
2335
16
                } else {
2336
437
                    for (auto& c : curModifier) {
2337
437
                        c++;
2338
437
                    }
2339
13
                }
2340
29
            }
2341
29
        }
2342
2343
76
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
76
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
76
        const auto& result = results.back();
2350
2351
76
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
76
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
76
        if ( options.disableTests == false ) {
2369
76
            tests::test(op, result.second);
2370
76
        }
2371
2372
76
        postprocess(module, op, result);
2373
76
    }
2374
2375
60
    if ( options.noCompare == false ) {
2376
47
        compare(operations, results, data, size);
2377
47
    }
2378
60
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
72
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
72
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
72
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
127
    do {
2264
127
        auto op = getOp(&parentDs, data, size);
2265
127
        auto module = getModule(parentDs);
2266
127
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
127
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
127
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
127
    } while ( parentDs.Get<bool>() == true );
2277
2278
72
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
72
#if 1
2284
72
    {
2285
72
        std::set<uint64_t> moduleIDs;
2286
72
        for (const auto& m : modules ) {
2287
56
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
56
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
56
            moduleIDs.insert(moduleID);
2295
56
        }
2296
2297
72
        std::set<uint64_t> operationModuleIDs;
2298
97
        for (const auto& op : operations) {
2299
97
            operationModuleIDs.insert(op.first->ID);
2300
97
        }
2301
2302
72
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
72
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
72
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
72
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
72
    }
2310
72
#endif
2311
2312
72
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
72
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
169
    for (size_t i = 0; i < operations.size(); i++) {
2320
97
        auto& operation = operations[i];
2321
2322
97
        auto& module = operation.first;
2323
97
        auto& op = operation.second;
2324
2325
97
        if ( i > 0 ) {
2326
41
            auto& prevModule = operations[i-1].first;
2327
41
            auto& prevOp = operations[i].second;
2328
2329
41
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
41
                auto& curModifier = op.modifier.GetVectorPtr();
2331
41
                if ( curModifier.size() == 0 ) {
2332
9.74k
                    for (size_t j = 0; j < 512; j++) {
2333
9.72k
                        curModifier.push_back(1);
2334
9.72k
                    }
2335
22
                } else {
2336
1.47k
                    for (auto& c : curModifier) {
2337
1.47k
                        c++;
2338
1.47k
                    }
2339
22
                }
2340
41
            }
2341
41
        }
2342
2343
97
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
97
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
97
        const auto& result = results.back();
2350
2351
97
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
97
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
97
        if ( options.disableTests == false ) {
2369
97
            tests::test(op, result.second);
2370
97
        }
2371
2372
97
        postprocess(module, op, result);
2373
97
    }
2374
2375
72
    if ( options.noCompare == false ) {
2376
56
        compare(operations, results, data, size);
2377
56
    }
2378
72
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
52
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
52
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
52
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
97
    do {
2264
97
        auto op = getOp(&parentDs, data, size);
2265
97
        auto module = getModule(parentDs);
2266
97
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
97
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
97
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
97
    } while ( parentDs.Get<bool>() == true );
2277
2278
52
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
52
#if 1
2284
52
    {
2285
52
        std::set<uint64_t> moduleIDs;
2286
52
        for (const auto& m : modules ) {
2287
34
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
34
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
34
            moduleIDs.insert(moduleID);
2295
34
        }
2296
2297
52
        std::set<uint64_t> operationModuleIDs;
2298
58
        for (const auto& op : operations) {
2299
58
            operationModuleIDs.insert(op.first->ID);
2300
58
        }
2301
2302
52
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
52
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
52
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
52
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
52
    }
2310
52
#endif
2311
2312
52
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
52
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
110
    for (size_t i = 0; i < operations.size(); i++) {
2320
58
        auto& operation = operations[i];
2321
2322
58
        auto& module = operation.first;
2323
58
        auto& op = operation.second;
2324
2325
58
        if ( i > 0 ) {
2326
24
            auto& prevModule = operations[i-1].first;
2327
24
            auto& prevOp = operations[i].second;
2328
2329
24
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
24
                auto& curModifier = op.modifier.GetVectorPtr();
2331
24
                if ( curModifier.size() == 0 ) {
2332
4.10k
                    for (size_t j = 0; j < 512; j++) {
2333
4.09k
                        curModifier.push_back(1);
2334
4.09k
                    }
2335
16
                } else {
2336
1.33k
                    for (auto& c : curModifier) {
2337
1.33k
                        c++;
2338
1.33k
                    }
2339
16
                }
2340
24
            }
2341
24
        }
2342
2343
58
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
58
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
58
        const auto& result = results.back();
2350
2351
58
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
58
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
58
        if ( options.disableTests == false ) {
2369
58
            tests::test(op, result.second);
2370
58
        }
2371
2372
58
        postprocess(module, op, result);
2373
58
    }
2374
2375
52
    if ( options.noCompare == false ) {
2376
34
        compare(operations, results, data, size);
2377
34
    }
2378
52
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
78
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
78
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
78
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
136
    do {
2264
136
        auto op = getOp(&parentDs, data, size);
2265
136
        auto module = getModule(parentDs);
2266
136
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
136
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
136
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
3
            break;
2275
3
        }
2276
136
    } while ( parentDs.Get<bool>() == true );
2277
2278
78
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
78
#if 1
2284
78
    {
2285
78
        std::set<uint64_t> moduleIDs;
2286
78
        for (const auto& m : modules ) {
2287
58
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
58
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
58
            moduleIDs.insert(moduleID);
2295
58
        }
2296
2297
78
        std::set<uint64_t> operationModuleIDs;
2298
95
        for (const auto& op : operations) {
2299
95
            operationModuleIDs.insert(op.first->ID);
2300
95
        }
2301
2302
78
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
78
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
78
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
78
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
78
    }
2310
78
#endif
2311
2312
78
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
78
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
173
    for (size_t i = 0; i < operations.size(); i++) {
2320
95
        auto& operation = operations[i];
2321
2322
95
        auto& module = operation.first;
2323
95
        auto& op = operation.second;
2324
2325
95
        if ( i > 0 ) {
2326
37
            auto& prevModule = operations[i-1].first;
2327
37
            auto& prevOp = operations[i].second;
2328
2329
37
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
37
                auto& curModifier = op.modifier.GetVectorPtr();
2331
37
                if ( curModifier.size() == 0 ) {
2332
9.23k
                    for (size_t j = 0; j < 512; j++) {
2333
9.21k
                        curModifier.push_back(1);
2334
9.21k
                    }
2335
19
                } else {
2336
1.55k
                    for (auto& c : curModifier) {
2337
1.55k
                        c++;
2338
1.55k
                    }
2339
19
                }
2340
37
            }
2341
37
        }
2342
2343
95
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
95
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
95
        const auto& result = results.back();
2350
2351
95
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
95
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
95
        if ( options.disableTests == false ) {
2369
95
            tests::test(op, result.second);
2370
95
        }
2371
2372
95
        postprocess(module, op, result);
2373
95
    }
2374
2375
78
    if ( options.noCompare == false ) {
2376
58
        compare(operations, results, data, size);
2377
58
    }
2378
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
56
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
56
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
56
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
94
    do {
2264
94
        auto op = getOp(&parentDs, data, size);
2265
94
        auto module = getModule(parentDs);
2266
94
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
94
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
94
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
94
    } while ( parentDs.Get<bool>() == true );
2277
2278
56
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
56
#if 1
2284
56
    {
2285
56
        std::set<uint64_t> moduleIDs;
2286
56
        for (const auto& m : modules ) {
2287
44
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
44
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
44
            moduleIDs.insert(moduleID);
2295
44
        }
2296
2297
56
        std::set<uint64_t> operationModuleIDs;
2298
71
        for (const auto& op : operations) {
2299
71
            operationModuleIDs.insert(op.first->ID);
2300
71
        }
2301
2302
56
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
56
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
56
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
56
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
56
    }
2310
56
#endif
2311
2312
56
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
56
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
127
    for (size_t i = 0; i < operations.size(); i++) {
2320
71
        auto& operation = operations[i];
2321
2322
71
        auto& module = operation.first;
2323
71
        auto& op = operation.second;
2324
2325
71
        if ( i > 0 ) {
2326
27
            auto& prevModule = operations[i-1].first;
2327
27
            auto& prevOp = operations[i].second;
2328
2329
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
27
                auto& curModifier = op.modifier.GetVectorPtr();
2331
27
                if ( curModifier.size() == 0 ) {
2332
4.61k
                    for (size_t j = 0; j < 512; j++) {
2333
4.60k
                        curModifier.push_back(1);
2334
4.60k
                    }
2335
18
                } else {
2336
869
                    for (auto& c : curModifier) {
2337
869
                        c++;
2338
869
                    }
2339
18
                }
2340
27
            }
2341
27
        }
2342
2343
71
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
71
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
71
        const auto& result = results.back();
2350
2351
71
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
71
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
71
        if ( options.disableTests == false ) {
2369
71
            tests::test(op, result.second);
2370
71
        }
2371
2372
71
        postprocess(module, op, result);
2373
71
    }
2374
2375
56
    if ( options.noCompare == false ) {
2376
44
        compare(operations, results, data, size);
2377
44
    }
2378
56
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
75
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
75
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
75
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
123
    do {
2264
123
        auto op = getOp(&parentDs, data, size);
2265
123
        auto module = getModule(parentDs);
2266
123
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
123
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
123
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
123
    } while ( parentDs.Get<bool>() == true );
2277
2278
75
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
75
#if 1
2284
75
    {
2285
75
        std::set<uint64_t> moduleIDs;
2286
75
        for (const auto& m : modules ) {
2287
57
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
57
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
57
            moduleIDs.insert(moduleID);
2295
57
        }
2296
2297
75
        std::set<uint64_t> operationModuleIDs;
2298
86
        for (const auto& op : operations) {
2299
86
            operationModuleIDs.insert(op.first->ID);
2300
86
        }
2301
2302
75
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
75
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
75
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
75
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
75
    }
2310
75
#endif
2311
2312
75
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
75
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
161
    for (size_t i = 0; i < operations.size(); i++) {
2320
86
        auto& operation = operations[i];
2321
2322
86
        auto& module = operation.first;
2323
86
        auto& op = operation.second;
2324
2325
86
        if ( i > 0 ) {
2326
29
            auto& prevModule = operations[i-1].first;
2327
29
            auto& prevOp = operations[i].second;
2328
2329
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
29
                auto& curModifier = op.modifier.GetVectorPtr();
2331
29
                if ( curModifier.size() == 0 ) {
2332
5.64k
                    for (size_t j = 0; j < 512; j++) {
2333
5.63k
                        curModifier.push_back(1);
2334
5.63k
                    }
2335
18
                } else {
2336
614
                    for (auto& c : curModifier) {
2337
614
                        c++;
2338
614
                    }
2339
18
                }
2340
29
            }
2341
29
        }
2342
2343
86
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
86
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
86
        const auto& result = results.back();
2350
2351
86
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
86
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
86
        if ( options.disableTests == false ) {
2369
86
            tests::test(op, result.second);
2370
86
        }
2371
2372
86
        postprocess(module, op, result);
2373
86
    }
2374
2375
75
    if ( options.noCompare == false ) {
2376
57
        compare(operations, results, data, size);
2377
57
    }
2378
75
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
69
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
69
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
69
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
112
    do {
2264
112
        auto op = getOp(&parentDs, data, size);
2265
112
        auto module = getModule(parentDs);
2266
112
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
112
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
112
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
1
            break;
2275
1
        }
2276
112
    } while ( parentDs.Get<bool>() == true );
2277
2278
69
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
69
#if 1
2284
69
    {
2285
69
        std::set<uint64_t> moduleIDs;
2286
69
        for (const auto& m : modules ) {
2287
51
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
51
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
51
            moduleIDs.insert(moduleID);
2295
51
        }
2296
2297
69
        std::set<uint64_t> operationModuleIDs;
2298
69
        for (const auto& op : operations) {
2299
69
            operationModuleIDs.insert(op.first->ID);
2300
69
        }
2301
2302
69
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
69
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
69
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
69
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
69
    }
2310
69
#endif
2311
2312
69
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
69
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
138
    for (size_t i = 0; i < operations.size(); i++) {
2320
69
        auto& operation = operations[i];
2321
2322
69
        auto& module = operation.first;
2323
69
        auto& op = operation.second;
2324
2325
69
        if ( i > 0 ) {
2326
18
            auto& prevModule = operations[i-1].first;
2327
18
            auto& prevOp = operations[i].second;
2328
2329
18
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
18
                auto& curModifier = op.modifier.GetVectorPtr();
2331
18
                if ( curModifier.size() == 0 ) {
2332
4.61k
                    for (size_t j = 0; j < 512; j++) {
2333
4.60k
                        curModifier.push_back(1);
2334
4.60k
                    }
2335
9
                } else {
2336
1.12k
                    for (auto& c : curModifier) {
2337
1.12k
                        c++;
2338
1.12k
                    }
2339
9
                }
2340
18
            }
2341
18
        }
2342
2343
69
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
69
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
69
        const auto& result = results.back();
2350
2351
69
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
69
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
69
        if ( options.disableTests == false ) {
2369
69
            tests::test(op, result.second);
2370
69
        }
2371
2372
69
        postprocess(module, op, result);
2373
69
    }
2374
2375
69
    if ( options.noCompare == false ) {
2376
51
        compare(operations, results, data, size);
2377
51
    }
2378
69
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
26
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
26
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
26
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
67
    do {
2264
67
        auto op = getOp(&parentDs, data, size);
2265
67
        auto module = getModule(parentDs);
2266
67
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
67
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
67
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
3
            break;
2275
3
        }
2276
67
    } while ( parentDs.Get<bool>() == true );
2277
2278
26
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
26
#if 1
2284
26
    {
2285
26
        std::set<uint64_t> moduleIDs;
2286
26
        for (const auto& m : modules ) {
2287
16
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
16
            moduleIDs.insert(moduleID);
2295
16
        }
2296
2297
26
        std::set<uint64_t> operationModuleIDs;
2298
44
        for (const auto& op : operations) {
2299
44
            operationModuleIDs.insert(op.first->ID);
2300
44
        }
2301
2302
26
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
26
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
26
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
26
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
26
    }
2310
26
#endif
2311
2312
26
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
26
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
70
    for (size_t i = 0; i < operations.size(); i++) {
2320
44
        auto& operation = operations[i];
2321
2322
44
        auto& module = operation.first;
2323
44
        auto& op = operation.second;
2324
2325
44
        if ( i > 0 ) {
2326
28
            auto& prevModule = operations[i-1].first;
2327
28
            auto& prevOp = operations[i].second;
2328
2329
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
28
                auto& curModifier = op.modifier.GetVectorPtr();
2331
28
                if ( curModifier.size() == 0 ) {
2332
7.18k
                    for (size_t j = 0; j < 512; j++) {
2333
7.16k
                        curModifier.push_back(1);
2334
7.16k
                    }
2335
14
                } else {
2336
1.13k
                    for (auto& c : curModifier) {
2337
1.13k
                        c++;
2338
1.13k
                    }
2339
14
                }
2340
28
            }
2341
28
        }
2342
2343
44
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
44
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
44
        const auto& result = results.back();
2350
2351
44
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
44
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
44
        if ( options.disableTests == false ) {
2369
44
            tests::test(op, result.second);
2370
44
        }
2371
2372
44
        postprocess(module, op, result);
2373
44
    }
2374
2375
26
    if ( options.noCompare == false ) {
2376
16
        compare(operations, results, data, size);
2377
16
    }
2378
26
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2258
59
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2259
59
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2260
2261
59
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2262
2263
114
    do {
2264
114
        auto op = getOp(&parentDs, data, size);
2265
114
        auto module = getModule(parentDs);
2266
114
        if ( module == nullptr ) {
2267
0
            continue;
2268
0
        }
2269
2270
114
        operations.push_back( {module, op} );
2271
2272
        /* Limit number of operations per run to prevent time-outs */
2273
114
        if ( operations.size() == OperationType::MaxOperations() ) {
2274
2
            break;
2275
2
        }
2276
114
    } while ( parentDs.Get<bool>() == true );
2277
2278
59
    if ( operations.empty() == true ) {
2279
0
        return;
2280
0
    }
2281
2282
    /* Enable this to run every operation on every loaded module */
2283
59
#if 1
2284
59
    {
2285
59
        std::set<uint64_t> moduleIDs;
2286
59
        for (const auto& m : modules ) {
2287
26
            const auto moduleID = m.first;
2288
2289
            /* Skip if this is a disabled module */
2290
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2291
0
                continue;
2292
0
            }
2293
2294
26
            moduleIDs.insert(moduleID);
2295
26
        }
2296
2297
59
        std::set<uint64_t> operationModuleIDs;
2298
59
        for (const auto& op : operations) {
2299
57
            operationModuleIDs.insert(op.first->ID);
2300
57
        }
2301
2302
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2303
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2304
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2305
2306
59
        for (const auto& id : addModuleIDs) {
2307
0
            operations.push_back({ modules.at(id), operations[0].second});
2308
0
        }
2309
59
    }
2310
59
#endif
2311
2312
59
    if ( operations.size() < options.minModules ) {
2313
0
        return;
2314
0
    }
2315
2316
59
    if ( options.debug == true && !operations.empty() ) {
2317
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2318
0
    }
2319
116
    for (size_t i = 0; i < operations.size(); i++) {
2320
57
        auto& operation = operations[i];
2321
2322
57
        auto& module = operation.first;
2323
57
        auto& op = operation.second;
2324
2325
57
        if ( i > 0 ) {
2326
31
            auto& prevModule = operations[i-1].first;
2327
31
            auto& prevOp = operations[i].second;
2328
2329
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2330
31
                auto& curModifier = op.modifier.GetVectorPtr();
2331
31
                if ( curModifier.size() == 0 ) {
2332
9.74k
                    for (size_t j = 0; j < 512; j++) {
2333
9.72k
                        curModifier.push_back(1);
2334
9.72k
                    }
2335
19
                } else {
2336
725
                    for (auto& c : curModifier) {
2337
725
                        c++;
2338
725
                    }
2339
12
                }
2340
31
            }
2341
31
        }
2342
2343
57
        if ( options.debug == true ) {
2344
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2345
0
        }
2346
2347
57
        results.push_back( {module, std::move(callModule(module, op))} );
2348
2349
57
        const auto& result = results.back();
2350
2351
57
        if ( result.second != std::nullopt ) {
2352
0
            if ( options.jsonDumpFP != std::nullopt ) {
2353
0
                nlohmann::json j;
2354
0
                j["operation"] = op.ToJSON();
2355
0
                j["result"] = util::ToJSON(*result.second);
2356
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2357
0
            }
2358
0
        }
2359
2360
57
        if ( options.debug == true ) {
2361
0
            printf("Module %s result:\n\n%s\n\n",
2362
0
                    result.first->name.c_str(),
2363
0
                    result.second == std::nullopt ?
2364
0
                        "(empty)" :
2365
0
                        util::ToString(*result.second).c_str());
2366
0
        }
2367
2368
57
        if ( options.disableTests == false ) {
2369
57
            tests::test(op, result.second);
2370
57
        }
2371
2372
57
        postprocess(module, op, result);
2373
57
    }
2374
2375
59
    if ( options.noCompare == false ) {
2376
26
        compare(operations, results, data, size);
2377
26
    }
2378
59
}
2379
2380
/* Explicit template instantiation */
2381
template class ExecutorBase<component::Digest, operation::Digest>;
2382
template class ExecutorBase<component::MAC, operation::HMAC>;
2383
template class ExecutorBase<component::MAC, operation::UMAC>;
2384
template class ExecutorBase<component::MAC, operation::CMAC>;
2385
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2386
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2387
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2388
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2389
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2390
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2391
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2392
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2393
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2394
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2395
template class ExecutorBase<component::Key, operation::KDF_X963>;
2396
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2397
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2398
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2399
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2400
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2401
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2402
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2403
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2404
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2405
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2406
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2407
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2408
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2409
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2410
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2411
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2412
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2413
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2414
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2415
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2416
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2417
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2418
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2419
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2420
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2421
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2422
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2423
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2424
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2425
template class ExecutorBase<bool, operation::BLS_Verify>;
2426
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2427
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2428
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2429
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2430
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2431
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2432
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2433
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2434
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2435
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2436
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2437
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2438
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2439
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2440
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2441
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2442
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2443
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2444
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2445
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2446
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2447
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2448
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2449
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2450
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2451
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2452
template class ExecutorBase<Buffer, operation::Misc>;
2453
template class ExecutorBase<bool, operation::SR25519_Verify>;
2454
2455
} /* namespace cryptofuzz */