Coverage Report

Created: 2026-01-06 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cryptofuzz-fastmath/executor.cpp
Line
Count
Source
1
#include "executor.h"
2
#include "tests.h"
3
#include "mutatorpool.h"
4
#include "config.h"
5
#include <cryptofuzz/util.h>
6
#include <fuzzing/memory.hpp>
7
#include <algorithm>
8
#include <set>
9
#include <boost/multiprecision/cpp_int.hpp>
10
11
uint32_t PRNG(void);
12
13
155k
#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
1.04k
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
1.04k
    (void)module;
53
1.04k
    (void)op;
54
55
1.04k
    if ( result.second != std::nullopt ) {
56
771
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
771
    }
58
1.04k
}
59
60
1.04k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
1.04k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
1.04k
    return module->OpDigest(op);
64
1.04k
}
65
66
/* Specialization for operation::HMAC */
67
846
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
846
    (void)module;
69
846
    (void)op;
70
71
846
    if ( result.second != std::nullopt ) {
72
422
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
422
    }
74
846
}
75
76
846
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
846
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
846
    return module->OpHMAC(op);
80
846
}
81
82
/* Specialization for operation::UMAC */
83
158
template<> void ExecutorBase<component::MAC, operation::UMAC>::postprocess(std::shared_ptr<Module> module, operation::UMAC& op, const ExecutorBase<component::MAC, operation::UMAC>::ResultPair& result) const {
84
158
    (void)module;
85
158
    (void)op;
86
87
158
    if ( result.second != std::nullopt ) {
88
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
0
    }
90
158
}
91
92
158
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
158
    return module->OpUMAC(op);
94
158
}
95
96
/* Specialization for operation::CMAC */
97
1.00k
template<> void ExecutorBase<component::MAC, operation::CMAC>::postprocess(std::shared_ptr<Module> module, operation::CMAC& op, const ExecutorBase<component::MAC, operation::CMAC>::ResultPair& result) const {
98
1.00k
    (void)module;
99
1.00k
    (void)op;
100
101
1.00k
    if ( result.second != std::nullopt ) {
102
279
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
279
    }
104
1.00k
}
105
106
1.00k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
1.00k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
1.00k
    return module->OpCMAC(op);
110
1.00k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
3.59k
template<> void ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op, const ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::ResultPair& result) const {
114
3.59k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
3.59k
    if ( result.second != std::nullopt ) {
119
1.45k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
1.45k
        if ( result.second->tag != std::nullopt ) {
121
230
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
230
        }
123
1.45k
    }
124
125
3.59k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
1.42k
        using fuzzing::datasource::ID;
127
128
1.42k
        bool tryDecrypt = true;
129
130
1.42k
        if ( module->ID == CF_MODULE("OpenSSL") ) {
131
0
            switch ( op.cipher.cipherType.Get() ) {
132
0
                case    ID("Cryptofuzz/Cipher/AES_128_OCB"):
133
0
                case    ID("Cryptofuzz/Cipher/AES_256_OCB"):
134
0
                    tryDecrypt = false;
135
0
                    break;
136
0
                case    ID("Cryptofuzz/Cipher/AES_128_GCM"):
137
0
                case    ID("Cryptofuzz/Cipher/AES_192_GCM"):
138
0
                case    ID("Cryptofuzz/Cipher/AES_256_GCM"):
139
0
                case    ID("Cryptofuzz/Cipher/AES_128_CCM"):
140
0
                case    ID("Cryptofuzz/Cipher/AES_192_CCM"):
141
0
                case    ID("Cryptofuzz/Cipher/AES_256_CCM"):
142
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_CCM"):
143
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_CCM"):
144
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_CCM"):
145
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_GCM"):
146
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_GCM"):
147
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_GCM"):
148
0
                    if ( op.tagSize == std::nullopt ) {
149
                        /* OpenSSL fails to decrypt its own CCM and GCM ciphertexts if
150
                         * a tag is not included
151
                         */
152
0
                        tryDecrypt = false;
153
0
                    }
154
0
                    break;
155
0
            }
156
0
        }
157
158
1.42k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
1.42k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
1.42k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
1.42k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
1.42k
                    op.cleartext.GetSize() + 32,
171
172
1.42k
                    op.aad,
173
174
                    /* Empty modifier */
175
1.42k
                    {});
176
177
1.42k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
1.42k
            if ( cleartext == std::nullopt ) {
180
                /* Decryption failed, OpSymmetricDecrypt() returned std::nullopt */
181
0
                printf("Cannot decrypt ciphertext\n\n");
182
0
                printf("Operation:\n%s\n", op.ToString().c_str());
183
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
184
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
185
0
                abort(
186
0
                        {module->name},
187
0
                        op.Name(),
188
0
                        op.GetAlgorithmString(),
189
0
                        "cannot decrypt ciphertext"
190
0
                );
191
1.42k
            } else if ( cleartext->Get() != op.cleartext.Get() ) {
192
                /* Decryption ostensibly succeeded, but the cleartext returned by OpSymmetricDecrypt()
193
                 * does not match to original cleartext */
194
195
0
                printf("Cannot decrypt ciphertext (but decryption ostensibly succeeded)\n\n");
196
0
                printf("Operation:\n%s\n", op.ToString().c_str());
197
0
                printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str());
198
0
                printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt");
199
0
                printf("Purported cleartext: %s\n", util::HexDump(cleartext->Get()).c_str());
200
0
                abort(
201
0
                        {module->name},
202
0
                        op.Name(),
203
0
                        op.GetAlgorithmString(),
204
0
                        "cannot decrypt ciphertext"
205
0
                );
206
0
            }
207
1.42k
        }
208
1.42k
    }
209
3.59k
}
210
211
3.59k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
3.59k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
3.59k
    return module->OpSymmetricEncrypt(op);
215
3.59k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
1.62k
template<> void ExecutorBase<component::MAC, operation::SymmetricDecrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op, const ExecutorBase<component::MAC, operation::SymmetricDecrypt>::ResultPair& result) const {
219
1.62k
    (void)module;
220
1.62k
    (void)op;
221
222
1.62k
    if ( result.second != std::nullopt ) {
223
200
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
200
    }
225
1.62k
}
226
227
1.62k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
1.62k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
1.62k
    return module->OpSymmetricDecrypt(op);
231
1.62k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
172
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
172
    (void)module;
236
172
    (void)op;
237
238
172
    if ( result.second != std::nullopt ) {
239
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
0
    }
241
172
}
242
243
172
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
172
    return module->OpKDF_SCRYPT(op);
245
172
}
246
247
/* Specialization for operation::KDF_HKDF */
248
922
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
922
    (void)module;
250
922
    (void)op;
251
252
922
    if ( result.second != std::nullopt ) {
253
399
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
399
    }
255
922
}
256
257
922
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
922
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
922
    return module->OpKDF_HKDF(op);
261
922
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
175
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
175
    (void)module;
266
175
    (void)op;
267
268
175
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
175
}
272
273
175
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
175
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
175
    return module->OpKDF_PBKDF(op);
277
175
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
184
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
184
    (void)module;
282
184
    (void)op;
283
284
184
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
184
}
288
289
184
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
184
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
184
    return module->OpKDF_PBKDF1(op);
293
184
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
587
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
587
    (void)module;
298
587
    (void)op;
299
300
587
    if ( result.second != std::nullopt ) {
301
369
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
369
    }
303
587
}
304
305
587
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
587
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
587
    return module->OpKDF_PBKDF2(op);
309
587
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
24
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
24
    (void)module;
314
24
    (void)op;
315
316
24
    if ( result.second != std::nullopt ) {
317
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
0
    }
319
24
}
320
321
24
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
24
    return module->OpKDF_ARGON2(op);
323
24
}
324
325
/* Specialization for operation::KDF_SSH */
326
210
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
210
    (void)module;
328
210
    (void)op;
329
330
210
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
210
}
334
335
210
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
210
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
210
    return module->OpKDF_SSH(op);
339
210
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
174
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
174
    (void)module;
344
174
    (void)op;
345
346
174
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
174
}
350
351
174
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
174
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
174
    return module->OpKDF_TLS1_PRF(op);
355
174
}
356
357
/* Specialization for operation::KDF_X963 */
358
128
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
128
    (void)module;
360
128
    (void)op;
361
362
128
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
128
}
366
367
128
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
128
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
128
    return module->OpKDF_X963(op);
371
128
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
13
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
13
    (void)module;
376
13
    (void)op;
377
378
13
    if ( result.second != std::nullopt ) {
379
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
0
    }
381
13
}
382
383
13
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
13
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
13
    return module->OpKDF_BCRYPT(op);
387
13
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
203
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
203
    (void)module;
392
203
    (void)op;
393
394
203
    if ( result.second != std::nullopt ) {
395
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
0
    }
397
203
}
398
399
203
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
203
    if ( op.mech.mode == true ) {
401
130
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
130
    }
403
404
203
    return module->OpKDF_SP_800_108(op);
405
203
}
406
407
/* Specialization for operation::KDF_SRTP */
408
191
template<> void ExecutorBase<component::Key3, operation::KDF_SRTP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTP& op, const ExecutorBase<component::Key3, operation::KDF_SRTP>::ResultPair& result) const {
409
191
    (void)module;
410
191
    (void)op;
411
191
    (void)result;
412
191
}
413
414
191
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
191
    return module->OpKDF_SRTP(op);
416
191
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
154
template<> void ExecutorBase<component::Key3, operation::KDF_SRTCP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTCP& op, const ExecutorBase<component::Key3, operation::KDF_SRTCP>::ResultPair& result) const {
420
154
    (void)module;
421
154
    (void)op;
422
154
    (void)result;
423
154
}
424
425
154
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
154
    return module->OpKDF_SRTCP(op);
427
154
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
9.21k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
431
9.21k
    (void)module;
432
433
9.21k
    if ( result.second != std::nullopt  ) {
434
4.11k
        const auto curveID = op.curveType.Get();
435
4.11k
        const auto privkey = op.priv.ToTrimmedString();
436
4.11k
        const auto pub_x = result.second->first.ToTrimmedString();
437
4.11k
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
4.11k
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
4.11k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
4.11k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
4.11k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
4.11k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
4.11k
    }
446
9.21k
}
447
448
9.21k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
449
9.21k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
9.21k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
9.21k
    if ( size == 0 || size > 4096 ) {
454
105
        return std::nullopt;
455
105
    }
456
457
9.11k
    return module->OpECC_PrivateToPublic(op);
458
9.21k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
5.73k
template<> void ExecutorBase<bool, operation::ECC_ValidatePubkey>::postprocess(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op, const ExecutorBase<bool, operation::ECC_ValidatePubkey>::ResultPair& result) const {
462
5.73k
    (void)module;
463
5.73k
    (void)op;
464
5.73k
    (void)result;
465
5.73k
}
466
467
5.73k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
5.73k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
5.73k
    return module->OpECC_ValidatePubkey(op);
471
5.73k
}
472
473
/* Specialization for operation::ECC_GenerateKeyPair */
474
475
/* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */
476
template <>
477
2.94k
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
478
2.94k
    (void)operations;
479
2.94k
    (void)results;
480
2.94k
    (void)data;
481
2.94k
    (void)size;
482
2.94k
}
483
484
8.88k
template<> void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op, const ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::ResultPair& result) const {
485
8.88k
    (void)module;
486
487
8.88k
    if ( result.second != std::nullopt  ) {
488
2.46k
        const auto curveID = op.curveType.Get();
489
2.46k
        const auto privkey = result.second->priv.ToTrimmedString();
490
2.46k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
2.46k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
2.46k
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
2.46k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
2.46k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
2.46k
        {
498
2.46k
            auto opValidate = operation::ECC_ValidatePubkey(
499
2.46k
                    op.curveType,
500
2.46k
                    result.second->pub,
501
2.46k
                    op.modifier);
502
503
2.46k
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
2.46k
            CF_ASSERT(
505
2.46k
                    validateResult == std::nullopt ||
506
2.46k
                    *validateResult == true,
507
2.46k
                    "Cannot validate generated public key");
508
2.46k
        }
509
2.46k
    }
510
8.88k
}
511
512
8.88k
template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const {
513
8.88k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
8.88k
    return module->OpECC_GenerateKeyPair(op);
516
8.88k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
946
template<> void ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECCSI_Sign& op, const ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::ResultPair& result) const {
520
946
    (void)module;
521
522
946
    if ( result.second != std::nullopt  ) {
523
0
        const auto curveID = op.curveType.Get();
524
0
        const auto cleartext = op.cleartext.ToHex();
525
0
        const auto id = op.id.ToHex();
526
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
527
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
528
0
        const auto pvt_x = result.second->pvt.first.ToTrimmedString();
529
0
        const auto pvt_y = result.second->pvt.second.ToTrimmedString();
530
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
531
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
532
533
0
        Pool_CurveECCSISignature.Set({
534
0
                curveID,
535
0
                cleartext,
536
0
                id,
537
0
                pub_x, pub_y,
538
0
                pvt_x, pvt_y,
539
0
                sig_r, sig_s});
540
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
541
0
        Pool_CurveECC_Point.Set({ curveID, pvt_x, pvt_y });
542
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
543
544
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
545
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
546
0
        if ( pvt_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_x); }
547
0
        if ( pvt_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_y); }
548
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
549
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
550
551
0
        {
552
0
            auto opVerify = operation::ECCSI_Verify(
553
0
                    op,
554
0
                    *(result.second),
555
0
                    op.modifier);
556
557
0
            const auto verifyResult = module->OpECCSI_Verify(opVerify);
558
0
            CF_ASSERT(
559
0
                    verifyResult == std::nullopt ||
560
0
                    *verifyResult == true,
561
0
                    "Cannot verify generated signature");
562
0
        }
563
0
    }
564
946
}
565
566
946
template<> std::optional<component::ECCSI_Signature> ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Sign& op) const {
567
946
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
946
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
665
    const size_t size = op.priv.ToTrimmedString().size();
571
572
665
    if ( size == 0 || size > 4096 ) {
573
3
        return std::nullopt;
574
3
    }
575
576
662
    return module->OpECCSI_Sign(op);
577
665
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
11.1k
template<> void ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Sign& op, const ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::ResultPair& result) const {
581
11.1k
    (void)module;
582
583
11.1k
    if ( result.second != std::nullopt  ) {
584
6.87k
        const auto curveID = op.curveType.Get();
585
6.87k
        const auto cleartext = op.cleartext.ToHex();
586
6.87k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
6.87k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
6.87k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
6.87k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
6.87k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
6.87k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
6.87k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
6.87k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
6.87k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
6.87k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
6.87k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
6.87k
        {
601
6.87k
            auto opVerify = operation::ECDSA_Verify(
602
6.87k
                    op,
603
6.87k
                    *(result.second),
604
6.87k
                    op.modifier);
605
606
6.87k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
6.87k
            CF_ASSERT(
608
6.87k
                    verifyResult == std::nullopt ||
609
6.87k
                    *verifyResult == true,
610
6.87k
                    "Cannot verify generated signature");
611
6.87k
        }
612
6.87k
    }
613
11.1k
}
614
615
11.1k
template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const {
616
11.1k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
11.1k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
10.7k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
10.7k
    if ( size == 0 || size > 4096 ) {
622
3
        return std::nullopt;
623
3
    }
624
625
10.7k
    return module->OpECDSA_Sign(op);
626
10.7k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
62
template<> void ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op, const ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::ResultPair& result) const {
630
62
    (void)module;
631
632
62
    if ( result.second != std::nullopt  ) {
633
0
        const auto curveID = op.curveType.Get();
634
0
        const auto cleartext = op.cleartext.ToHex();
635
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
0
    }
649
62
}
650
651
62
template<> std::optional<component::ECGDSA_Signature> ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op) const {
652
62
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
62
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
62
    const size_t size = op.priv.ToTrimmedString().size();
656
657
62
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
62
    return module->OpECGDSA_Sign(op);
662
62
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
62
template<> void ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op, const ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::ResultPair& result) const {
666
62
    (void)module;
667
668
62
    if ( result.second != std::nullopt  ) {
669
0
        const auto curveID = op.curveType.Get();
670
0
        const auto cleartext = op.cleartext.ToHex();
671
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
672
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
673
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
674
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
675
676
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
677
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
678
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
679
680
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
681
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
682
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
683
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
684
0
    }
685
62
}
686
687
62
template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const {
688
62
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
62
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
62
    const size_t size = op.priv.ToTrimmedString().size();
692
693
62
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
62
    return module->OpECRDSA_Sign(op);
698
62
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
51
template<> void ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Sign& op, const ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::ResultPair& result) const {
702
51
    (void)module;
703
704
51
    if ( result.second != std::nullopt  ) {
705
0
        const auto curveID = op.curveType.Get();
706
0
        const auto cleartext = op.cleartext.ToHex();
707
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
708
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
709
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
710
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
711
712
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
713
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
714
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
715
716
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
717
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
718
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
719
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
720
0
    }
721
51
}
722
723
51
template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const {
724
51
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
51
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
51
    const size_t size = op.priv.ToTrimmedString().size();
728
729
51
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
51
    return module->OpSchnorr_Sign(op);
734
51
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
521
template<> void ExecutorBase<bool, operation::ECCSI_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECCSI_Verify& op, const ExecutorBase<bool, operation::ECCSI_Verify>::ResultPair& result) const {
738
521
    (void)module;
739
521
    (void)op;
740
521
    (void)result;
741
521
}
742
743
521
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
521
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
521
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
207
    return module->OpECCSI_Verify(op);
748
521
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
6.59k
template<> void ExecutorBase<bool, operation::ECDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Verify& op, const ExecutorBase<bool, operation::ECDSA_Verify>::ResultPair& result) const {
752
6.59k
    (void)module;
753
6.59k
    (void)op;
754
6.59k
    (void)result;
755
6.59k
}
756
757
6.59k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
6.59k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
6.59k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
760
761
    /* Intentionally do not constrain the size of the public key or
762
     * signature (like we do for BignumCalc).
763
     *
764
     * If any large public key or signature causes a time-out (or
765
     * worse), this is something that needs attention;
766
     * because verifiers sometimes process untrusted public keys,
767
     * signatures or both, they should be resistant to bugs
768
     * arising from large inputs.
769
     */
770
771
6.25k
    return module->OpECDSA_Verify(op);
772
6.59k
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
50
template<> void ExecutorBase<bool, operation::ECGDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op, const ExecutorBase<bool, operation::ECGDSA_Verify>::ResultPair& result) const {
776
50
    (void)module;
777
50
    (void)op;
778
50
    (void)result;
779
50
}
780
781
50
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
50
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
50
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
784
785
    /* Intentionally do not constrain the size of the public key or
786
     * signature (like we do for BignumCalc).
787
     *
788
     * If any large public key or signature causes a time-out (or
789
     * worse), this is something that needs attention;
790
     * because verifiers sometimes process untrusted public keys,
791
     * signatures or both, they should be resistant to bugs
792
     * arising from large inputs.
793
     */
794
795
50
    return module->OpECGDSA_Verify(op);
796
50
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
53
template<> void ExecutorBase<bool, operation::ECRDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op, const ExecutorBase<bool, operation::ECRDSA_Verify>::ResultPair& result) const {
800
53
    (void)module;
801
53
    (void)op;
802
53
    (void)result;
803
53
}
804
805
53
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
53
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
53
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
808
809
    /* Intentionally do not constrain the size of the public key or
810
     * signature (like we do for BignumCalc).
811
     *
812
     * If any large public key or signature causes a time-out (or
813
     * worse), this is something that needs attention;
814
     * because verifiers sometimes process untrusted public keys,
815
     * signatures or both, they should be resistant to bugs
816
     * arising from large inputs.
817
     */
818
819
53
    return module->OpECRDSA_Verify(op);
820
53
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
46
template<> void ExecutorBase<bool, operation::Schnorr_Verify>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Verify& op, const ExecutorBase<bool, operation::Schnorr_Verify>::ResultPair& result) const {
824
46
    (void)module;
825
46
    (void)op;
826
46
    (void)result;
827
46
}
828
829
46
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
46
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
46
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
832
833
    /* Intentionally do not constrain the size of the public key or
834
     * signature (like we do for BignumCalc).
835
     *
836
     * If any large public key or signature causes a time-out (or
837
     * worse), this is something that needs attention;
838
     * because verifiers sometimes process untrusted public keys,
839
     * signatures or both, they should be resistant to bugs
840
     * arising from large inputs.
841
     */
842
843
46
    return module->OpSchnorr_Verify(op);
844
46
}
845
846
55
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Recover& op, const ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::ResultPair& result) const {
847
55
    (void)module;
848
55
    (void)op;
849
55
    (void)result;
850
55
}
851
852
55
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
853
55
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
55
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
55
    return module->OpECDSA_Recover(op);
857
55
}
858
859
/* Specialization for operation::DSA_Verify */
860
0
template<> void ExecutorBase<bool, operation::DSA_Verify>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Verify& op) const {
861
0
    (void)moduleID;
862
0
    (void)op;
863
864
    /* TODO */
865
0
}
866
867
98
template<> void ExecutorBase<bool, operation::DSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::DSA_Verify& op, const ExecutorBase<bool, operation::DSA_Verify>::ResultPair& result) const {
868
98
    (void)module;
869
98
    (void)op;
870
98
    (void)result;
871
98
}
872
873
98
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
98
    const std::vector<size_t> sizes = {
875
98
        op.parameters.p.ToTrimmedString().size(),
876
98
        op.parameters.q.ToTrimmedString().size(),
877
98
        op.parameters.g.ToTrimmedString().size(),
878
98
        op.pub.ToTrimmedString().size(),
879
98
        op.signature.first.ToTrimmedString().size(),
880
98
        op.signature.second.ToTrimmedString().size(),
881
98
    };
882
883
578
    for (const auto& size : sizes) {
884
578
        if ( size == 0 || size > 4096 ) {
885
4
            return std::nullopt;
886
4
        }
887
578
    }
888
889
94
    return module->OpDSA_Verify(op);
890
98
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
43
void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_Sign> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
896
43
    (void)operations;
897
43
    (void)results;
898
43
    (void)data;
899
43
    (void)size;
900
43
}
901
0
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Sign& op) const {
902
0
    (void)moduleID;
903
0
    (void)op;
904
905
    /* TODO */
906
0
}
907
908
92
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::DSA_Sign& op, const ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::ResultPair& result) const {
909
92
    (void)module;
910
92
    (void)op;
911
92
    if ( result.second != std::nullopt ) {
912
0
        const auto cleartext = op.cleartext.ToHex();
913
0
        const auto p = op.parameters.p.ToTrimmedString();
914
0
        const auto q = op.parameters.q.ToTrimmedString();
915
0
        const auto g = op.parameters.g.ToTrimmedString();
916
0
        const auto r = result.second->signature.first.ToTrimmedString();
917
0
        const auto s = result.second->signature.second.ToTrimmedString();
918
0
        const auto pub = result.second->pub.ToTrimmedString();
919
920
0
        Pool_DSASignature.Set({
921
0
                cleartext,
922
0
                p,
923
0
                q,
924
0
                g,
925
0
                pub,
926
0
                r,
927
0
                s
928
0
        });
929
930
0
        if ( r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(r); }
931
0
        if ( s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(s); }
932
0
    }
933
92
}
934
935
92
template<> std::optional<component::DSA_Signature> ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::callModule(std::shared_ptr<Module> module, operation::DSA_Sign& op) const {
936
92
    const std::vector<size_t> sizes = {
937
92
        op.parameters.p.ToTrimmedString().size(),
938
92
        op.parameters.q.ToTrimmedString().size(),
939
92
        op.parameters.g.ToTrimmedString().size(),
940
92
        op.priv.ToTrimmedString().size(),
941
92
    };
942
943
359
    for (const auto& size : sizes) {
944
359
        if ( size == 0 || size > 4096 ) {
945
9
            return std::nullopt;
946
9
        }
947
359
    }
948
949
83
    return module->OpDSA_Sign(op);
950
92
}
951
952
/* Specialization for operation::DSA_PrivateToPublic */
953
954
0
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::updateExtraCounters(const uint64_t moduleID, operation::DSA_PrivateToPublic& op) const {
955
0
    (void)moduleID;
956
0
    (void)op;
957
958
    /* TODO */
959
0
}
960
961
38
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op, const ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::ResultPair& result) const {
962
38
    (void)result;
963
38
    (void)module;
964
38
    (void)op;
965
38
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
38
}
969
970
38
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
38
    return module->OpDSA_PrivateToPublic(op);
972
38
}
973
974
/* Specialization for operation::DSA_GenerateKeyPair */
975
976
/* Do not compare DSA_GenerateKeyPair results, because the result can be produced indeterministically */
977
template <>
978
45
void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
979
45
    (void)operations;
980
45
    (void)results;
981
45
    (void)data;
982
45
    (void)size;
983
45
}
984
985
0
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateKeyPair& op) const {
986
0
    (void)moduleID;
987
0
    (void)op;
988
989
    /* TODO */
990
0
}
991
992
98
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op, const ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::ResultPair& result) const {
993
98
    (void)result;
994
98
    (void)module;
995
98
    (void)op;
996
98
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
997
0
        const auto priv = result.second->first.ToTrimmedString();
998
0
        const auto pub = result.second->second.ToTrimmedString();
999
1000
0
        Pool_DSA_PubPriv.Set({pub, priv});
1001
0
    }
1002
98
}
1003
1004
98
template<> std::optional<component::DSA_KeyPair> ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op) const {
1005
98
    const std::vector<size_t> sizes = {
1006
98
        op.p.ToTrimmedString().size(),
1007
98
        op.q.ToTrimmedString().size(),
1008
98
        op.g.ToTrimmedString().size(),
1009
98
    };
1010
1011
287
    for (const auto& size : sizes) {
1012
287
        if ( size == 0 || size > 4096 ) {
1013
7
            return std::nullopt;
1014
7
        }
1015
287
    }
1016
1017
91
    return module->OpDSA_GenerateKeyPair(op);
1018
98
}
1019
1020
/* Specialization for operation::DSA_GenerateParameters */
1021
1022
/* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */
1023
template <>
1024
21
void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateParameters> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
1025
21
    (void)operations;
1026
21
    (void)results;
1027
21
    (void)data;
1028
21
    (void)size;
1029
21
}
1030
1031
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const {
1032
0
    (void)moduleID;
1033
0
    (void)op;
1034
1035
    /* TODO */
1036
0
}
1037
1038
57
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op, const ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::ResultPair& result) const {
1039
57
    (void)result;
1040
57
    (void)module;
1041
57
    (void)op;
1042
57
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1043
0
        const auto P = result.second->p.ToTrimmedString();
1044
0
        const auto Q = result.second->q.ToTrimmedString();
1045
0
        const auto G = result.second->g.ToTrimmedString();
1046
1047
0
        Pool_DSA_PQG.Set({P, Q, G});
1048
1049
0
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1050
0
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1051
0
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1052
0
    }
1053
57
}
1054
1055
57
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1056
57
    return module->OpDSA_GenerateParameters(op);
1057
57
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
1.29k
template<> void ExecutorBase<component::Secret, operation::ECDH_Derive>::postprocess(std::shared_ptr<Module> module, operation::ECDH_Derive& op, const ExecutorBase<component::Secret, operation::ECDH_Derive>::ResultPair& result) const {
1061
1.29k
    (void)module;
1062
1.29k
    (void)op;
1063
1.29k
    (void)result;
1064
1.29k
}
1065
1066
1.29k
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
1.29k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
1.29k
    return module->OpECDH_Derive(op);
1070
1.29k
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
700
void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECIES_Encrypt> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
1075
700
    (void)operations;
1076
700
    (void)results;
1077
700
    (void)data;
1078
700
    (void)size;
1079
700
}
1080
1.43k
template<> void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op, const ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::ResultPair& result) const {
1081
1.43k
    (void)module;
1082
1.43k
    (void)op;
1083
1.43k
    (void)result;
1084
1.43k
}
1085
1086
1.43k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
1.43k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
1.43k
    return module->OpECIES_Encrypt(op);
1090
1.43k
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
1.50k
template<> void ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op, const ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::ResultPair& result) const {
1094
1.50k
    (void)module;
1095
1.50k
    (void)op;
1096
1.50k
    (void)result;
1097
1.50k
}
1098
1099
1.50k
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
1.50k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
1.50k
    return module->OpECIES_Decrypt(op);
1103
1.50k
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
4.39k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Add& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::ResultPair& result) const {
1107
4.39k
    (void)module;
1108
1109
4.39k
    if ( result.second != std::nullopt  ) {
1110
254
        const auto curveID = op.curveType.Get();
1111
254
        const auto x = result.second->first.ToTrimmedString();
1112
254
        const auto y = result.second->second.ToTrimmedString();
1113
1114
254
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
254
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
254
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
254
    }
1119
4.39k
}
1120
1121
4.39k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Add& op) const {
1122
4.39k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
4.39k
    return module->OpECC_Point_Add(op);
1125
4.39k
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
54
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::ResultPair& result) const {
1129
54
    (void)module;
1130
1131
54
    if ( result.second != std::nullopt  ) {
1132
0
        const auto curveID = op.curveType.Get();
1133
0
        const auto x = result.second->first.ToTrimmedString();
1134
0
        const auto y = result.second->second.ToTrimmedString();
1135
1136
0
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
0
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
0
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
0
    }
1141
54
}
1142
1143
54
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op) const {
1144
54
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
54
    return module->OpECC_Point_Sub(op);
1147
54
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
4.60k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::ResultPair& result) const {
1151
4.60k
    (void)module;
1152
1153
4.60k
    if ( result.second != std::nullopt  ) {
1154
373
        const auto curveID = op.curveType.Get();
1155
373
        const auto x = result.second->first.ToTrimmedString();
1156
373
        const auto y = result.second->second.ToTrimmedString();
1157
1158
373
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
373
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
373
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
373
    }
1163
4.60k
}
1164
1165
4.60k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op) const {
1166
4.60k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
4.60k
    return module->OpECC_Point_Mul(op);
1169
4.60k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
298
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::ResultPair& result) const {
1173
298
    (void)module;
1174
1175
298
    if ( result.second != std::nullopt  ) {
1176
68
        const auto curveID = op.curveType.Get();
1177
68
        const auto x = result.second->first.ToTrimmedString();
1178
68
        const auto y = result.second->second.ToTrimmedString();
1179
1180
68
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
68
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
68
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
68
    }
1185
298
}
1186
1187
298
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op) const {
1188
298
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
298
    return module->OpECC_Point_Neg(op);
1191
298
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
6.93k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::ResultPair& result) const {
1195
6.93k
    (void)module;
1196
1197
6.93k
    if ( result.second != std::nullopt  ) {
1198
125
        const auto curveID = op.curveType.Get();
1199
125
        const auto x = result.second->first.ToTrimmedString();
1200
125
        const auto y = result.second->second.ToTrimmedString();
1201
1202
125
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
125
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
125
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
125
    }
1207
6.93k
}
1208
1209
6.93k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op) const {
1210
6.93k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
6.93k
    return module->OpECC_Point_Dbl(op);
1213
6.93k
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
123
template<> void ExecutorBase<bool, operation::ECC_Point_Cmp>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op, const ExecutorBase<bool, operation::ECC_Point_Cmp>::ResultPair& result) const {
1217
123
    (void)module;
1218
123
    (void)result;
1219
123
    (void)op;
1220
123
}
1221
1222
123
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
123
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
123
    return module->OpECC_Point_Cmp(op);
1226
123
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
2.66k
template<> void ExecutorBase<component::Bignum, operation::DH_Derive>::postprocess(std::shared_ptr<Module> module, operation::DH_Derive& op, const ExecutorBase<component::Bignum, operation::DH_Derive>::ResultPair& result) const {
1230
2.66k
    (void)module;
1231
2.66k
    (void)op;
1232
2.66k
    (void)result;
1233
2.66k
}
1234
1235
2.66k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
2.66k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
2.59k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
2.57k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
2.50k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
2.43k
    return module->OpDH_Derive(op);
1242
2.50k
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
4.34k
template<> void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op, const ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::ResultPair& result) const {
1246
4.34k
    (void)result;
1247
4.34k
    (void)op;
1248
4.34k
    (void)module;
1249
1250
4.34k
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
516
        const auto priv = result.second->first.ToTrimmedString();
1252
516
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
516
        Pool_DH_PrivateKey.Set(priv);
1255
516
        Pool_DH_PublicKey.Set(pub);
1256
516
    }
1257
4.34k
}
1258
1259
4.34k
template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const {
1260
4.34k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
4.31k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
4.24k
    return module->OpDH_GenerateKeyPair(op);
1264
4.31k
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
59.0k
template<> void ExecutorBase<component::Bignum, operation::BignumCalc>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc& op, const ExecutorBase<component::Bignum, operation::BignumCalc>::ResultPair& result) const {
1268
59.0k
    (void)module;
1269
59.0k
    (void)op;
1270
1271
59.0k
    if ( result.second != std::nullopt  ) {
1272
21.7k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
21.7k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
21.6k
            Pool_Bignum.Set(bignum);
1276
21.6k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
776
                Pool_Bignum_Primes.Set(bignum);
1278
776
            }
1279
21.6k
        }
1280
21.7k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
1.56k
            if ( bignum == "1" ) {
1282
629
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
629
            }
1284
1.56k
        }
1285
21.7k
    }
1286
59.0k
}
1287
1288
59.0k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
59.0k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
59.0k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
59.0k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
58.9k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
58.9k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
58.9k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
93
        return std::nullopt;
1299
93
    }
1300
1301
58.8k
    switch ( op.calcOp.Get() ) {
1302
615
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
615
            if ( op.bn1.GetSize() > 4 ) {
1305
83
                return std::nullopt;
1306
83
            }
1307
532
            break;
1308
532
        case    CF_CALCOP("Exp(A,B)"):
1309
236
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
171
                return std::nullopt;
1311
171
            }
1312
65
            break;
1313
173
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
173
            if ( op.bn1.GetSize() > 4 ) {
1315
98
                return std::nullopt;
1316
98
            }
1317
75
            break;
1318
400
        case    CF_CALCOP("Exp2(A)"):
1319
400
            if ( op.bn0.GetSize() > 4 ) {
1320
94
                return std::nullopt;
1321
94
            }
1322
306
            break;
1323
58.8k
    }
1324
1325
58.3k
    return module->OpBignumCalc(op);
1326
58.8k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
130
template<> void ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op, const ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ResultPair& result) const {
1330
130
    (void)module;
1331
130
    (void)op;
1332
1333
130
    if ( result.second != std::nullopt  ) {
1334
0
        const auto bignum_first = result.second->first.ToTrimmedString();
1335
0
        const auto bignum_second = result.second->second.ToTrimmedString();
1336
1337
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1338
0
            Pool_Bignum.Set(bignum_first);
1339
0
        }
1340
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1341
0
            Pool_Bignum.Set(bignum_second);
1342
0
        }
1343
0
    }
1344
130
}
1345
1346
130
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
130
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
130
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
129
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
122
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
112
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
101
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
91
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
81
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
75
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
64
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
64
    return module->OpBignumCalc_Fp2(op);
1364
64
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
710
template<> void ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op, const ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ResultPair& result) const {
1368
710
    (void)module;
1369
710
    (void)op;
1370
1371
710
    if ( result.second != std::nullopt  ) {
1372
0
        Pool_Fp12.Set({
1373
0
                result.second->bn1.ToTrimmedString(),
1374
0
                result.second->bn2.ToTrimmedString(),
1375
0
                result.second->bn3.ToTrimmedString(),
1376
0
                result.second->bn4.ToTrimmedString(),
1377
0
                result.second->bn5.ToTrimmedString(),
1378
0
                result.second->bn6.ToTrimmedString(),
1379
0
                result.second->bn7.ToTrimmedString(),
1380
0
                result.second->bn8.ToTrimmedString(),
1381
0
                result.second->bn9.ToTrimmedString(),
1382
0
                result.second->bn10.ToTrimmedString(),
1383
0
                result.second->bn11.ToTrimmedString(),
1384
0
                result.second->bn12.ToTrimmedString()
1385
0
        });
1386
        /* TODO */
1387
#if 0
1388
        const auto bignum_first = result.second->first.ToTrimmedString();
1389
        const auto bignum_second = result.second->second.ToTrimmedString();
1390
1391
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1392
            Pool_Bignum.Set(bignum_first);
1393
        }
1394
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1395
            Pool_Bignum.Set(bignum_second);
1396
        }
1397
#endif
1398
0
    }
1399
710
}
1400
1401
710
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
710
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
710
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
699
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
683
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
672
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
662
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
652
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
644
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
634
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
624
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
613
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
602
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
592
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
583
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
573
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
563
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
553
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
543
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
532
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
522
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
512
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
502
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
491
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
481
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
471
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
461
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
451
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
441
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
434
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
426
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
416
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
410
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
399
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
389
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
379
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
369
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
358
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
348
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
338
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
328
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
318
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
308
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
298
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
287
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
276
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
266
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
259
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
249
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
241
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
231
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
231
    return module->OpBignumCalc_Fp12(op);
1462
231
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
65
template<> void ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op, const ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::ResultPair& result) const {
1466
65
    (void)module;
1467
1468
65
    if ( result.second != std::nullopt  ) {
1469
0
        const auto curveID = op.curveType.Get();
1470
0
        const auto g1_x = result.second->first.ToTrimmedString();
1471
0
        const auto g1_y = result.second->second.ToTrimmedString();
1472
1473
0
        G1AddToPool(curveID, g1_x, g1_y);
1474
1475
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1476
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1477
0
    }
1478
65
}
1479
1480
65
template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const {
1481
65
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
65
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
65
    if ( size == 0 || size > 4096 ) {
1486
0
        return std::nullopt;
1487
0
    }
1488
1489
65
    return module->OpBLS_PrivateToPublic(op);
1490
65
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
76
template<> void ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op, const ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::ResultPair& result) const {
1494
76
    (void)module;
1495
76
    if ( result.second != std::nullopt  ) {
1496
0
        const auto curveID = op.curveType.Get();
1497
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1498
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1499
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1500
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1501
1502
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1503
1504
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1505
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1506
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1507
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1508
0
    }
1509
76
}
1510
1511
76
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const {
1512
76
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
76
    if ( size == 0 || size > 4096 ) {
1515
1
        return std::nullopt;
1516
1
    }
1517
1518
75
    return module->OpBLS_PrivateToPublic_G2(op);
1519
76
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
64
template<> void ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::postprocess(std::shared_ptr<Module> module, operation::BLS_Sign& op, const ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::ResultPair& result) const {
1523
64
    (void)module;
1524
1525
64
    if ( result.second != std::nullopt  ) {
1526
0
        const auto curveID = op.curveType.Get();
1527
0
        const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : "";
1528
0
        const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : "";
1529
0
        const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : "";
1530
0
        const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : "";
1531
0
        const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : "";
1532
0
        const auto dest = op.dest.ToHex();
1533
0
        const auto aug = op.aug.ToHex();
1534
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
1535
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
1536
0
        const auto sig_v = result.second->signature.first.first.ToTrimmedString();
1537
0
        const auto sig_w = result.second->signature.first.second.ToTrimmedString();
1538
0
        const auto sig_x = result.second->signature.second.first.ToTrimmedString();
1539
0
        const auto sig_y = result.second->signature.second.second.ToTrimmedString();
1540
1541
0
        G1AddToPool(curveID, pub_x, pub_y);
1542
0
        G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y);
1543
0
        Pool_CurveBLSSignature.Set({ curveID, op.hashOrPoint, point_v, point_w, point_x, point_y, cleartext, dest, aug, pub_x, pub_y, sig_v, sig_w, sig_x, sig_y});
1544
1545
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
1546
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
1547
0
        if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); }
1548
0
        if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); }
1549
0
        if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); }
1550
0
        if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); }
1551
0
    }
1552
64
}
1553
1554
64
template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const {
1555
64
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
64
    if ( size == 0 || size > 4096 ) {
1558
1
        return std::nullopt;
1559
1
    }
1560
1561
63
    return module->OpBLS_Sign(op);
1562
64
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
45
template<> void ExecutorBase<bool, operation::BLS_Verify>::postprocess(std::shared_ptr<Module> module, operation::BLS_Verify& op, const ExecutorBase<bool, operation::BLS_Verify>::ResultPair& result) const {
1566
45
    (void)module;
1567
45
    (void)op;
1568
45
    (void)result;
1569
45
}
1570
1571
45
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const {
1572
#if 0
1573
    const std::vector<size_t> sizes = {
1574
        op.pub.first.ToTrimmedString().size(),
1575
        op.pub.second.ToTrimmedString().size(),
1576
        op.signature.first.ToTrimmedString().size(),
1577
        op.signature.second.ToTrimmedString().size(),
1578
    };
1579
1580
    for (const auto& size : sizes) {
1581
        if ( size == 0 || size > 4096 ) {
1582
            return std::nullopt;
1583
        }
1584
    }
1585
#endif
1586
1587
45
    return module->OpBLS_Verify(op);
1588
45
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
74
template<> void ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchSign& op, const ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::ResultPair& result) const {
1592
74
    (void)module;
1593
74
    (void)op;
1594
1595
74
    if ( result.second != std::nullopt  ) {
1596
0
        std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub;
1597
0
        for (const auto& mp : result.second->msgpub) {
1598
0
            msgpub.push_back(
1599
0
                    std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{
1600
0
                        {
1601
0
                            mp.first.first.ToTrimmedString(),
1602
0
                            mp.first.second.ToTrimmedString()
1603
0
                        },
1604
0
                        {
1605
0
                            mp.second.first.first.ToTrimmedString(),
1606
0
                            mp.second.first.second.ToTrimmedString(),
1607
0
                            mp.second.second.first.ToTrimmedString(),
1608
0
                            mp.second.second.second.ToTrimmedString()
1609
0
                        }
1610
0
                    }
1611
0
            );
1612
0
            G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString());
1613
0
            Pool_CurveBLSG2.Set({
1614
0
                    CF_ECC_CURVE("BLS12_381"),
1615
0
                    mp.second.first.first.ToTrimmedString(),
1616
0
                    mp.second.first.second.ToTrimmedString(),
1617
0
                    mp.second.second.first.ToTrimmedString(),
1618
0
                    mp.second.second.second.ToTrimmedString()
1619
0
            });
1620
0
        }
1621
0
        Pool_BLS_BatchSignature.Set({msgpub});
1622
0
    }
1623
74
}
1624
1625
74
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1626
74
    return module->OpBLS_BatchSign(op);
1627
74
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
51
template<> void ExecutorBase<bool, operation::BLS_BatchVerify>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op, const ExecutorBase<bool, operation::BLS_BatchVerify>::ResultPair& result) const {
1631
51
    (void)module;
1632
51
    (void)op;
1633
51
    (void)result;
1634
51
}
1635
1636
51
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
51
    return module->OpBLS_BatchVerify(op);
1638
51
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
50
template<> void ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op, const ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::ResultPair& result) const {
1642
50
    (void)module;
1643
50
    (void)op;
1644
50
    (void)result;
1645
50
}
1646
1647
50
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1648
50
    return module->OpBLS_Aggregate_G1(op);
1649
50
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
59
template<> void ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op, const ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::ResultPair& result) const {
1653
59
    (void)module;
1654
59
    (void)op;
1655
59
    (void)result;
1656
59
}
1657
1658
59
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1659
59
    return module->OpBLS_Aggregate_G2(op);
1660
59
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
54
template<> void ExecutorBase<component::Fp12, operation::BLS_Pairing>::postprocess(std::shared_ptr<Module> module, operation::BLS_Pairing& op, const ExecutorBase<component::Fp12, operation::BLS_Pairing>::ResultPair& result) const {
1664
54
    (void)module;
1665
54
    (void)op;
1666
1667
54
    if ( result.second != std::nullopt  ) {
1668
0
        Pool_Fp12.Set({
1669
0
                result.second->bn1.ToTrimmedString(),
1670
0
                result.second->bn2.ToTrimmedString(),
1671
0
                result.second->bn3.ToTrimmedString(),
1672
0
                result.second->bn4.ToTrimmedString(),
1673
0
                result.second->bn5.ToTrimmedString(),
1674
0
                result.second->bn6.ToTrimmedString(),
1675
0
                result.second->bn7.ToTrimmedString(),
1676
0
                result.second->bn8.ToTrimmedString(),
1677
0
                result.second->bn9.ToTrimmedString(),
1678
0
                result.second->bn10.ToTrimmedString(),
1679
0
                result.second->bn11.ToTrimmedString(),
1680
0
                result.second->bn12.ToTrimmedString()
1681
0
        });
1682
0
    }
1683
54
}
1684
1685
54
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
54
    return module->OpBLS_Pairing(op);
1687
54
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
46
template<> void ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::postprocess(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op, const ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::ResultPair& result) const {
1691
46
    (void)module;
1692
46
    (void)op;
1693
1694
46
    if ( result.second != std::nullopt  ) {
1695
0
        Pool_Fp12.Set({
1696
0
                result.second->bn1.ToTrimmedString(),
1697
0
                result.second->bn2.ToTrimmedString(),
1698
0
                result.second->bn3.ToTrimmedString(),
1699
0
                result.second->bn4.ToTrimmedString(),
1700
0
                result.second->bn5.ToTrimmedString(),
1701
0
                result.second->bn6.ToTrimmedString(),
1702
0
                result.second->bn7.ToTrimmedString(),
1703
0
                result.second->bn8.ToTrimmedString(),
1704
0
                result.second->bn9.ToTrimmedString(),
1705
0
                result.second->bn10.ToTrimmedString(),
1706
0
                result.second->bn11.ToTrimmedString(),
1707
0
                result.second->bn12.ToTrimmedString()
1708
0
        });
1709
0
    }
1710
46
}
1711
1712
46
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
46
    return module->OpBLS_MillerLoop(op);
1714
46
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
54
template<> void ExecutorBase<component::Fp12, operation::BLS_FinalExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_FinalExp& op, const ExecutorBase<component::Fp12, operation::BLS_FinalExp>::ResultPair& result) const {
1718
54
    (void)module;
1719
54
    (void)op;
1720
1721
54
    if ( result.second != std::nullopt  ) {
1722
0
        Pool_Fp12.Set({
1723
0
                result.second->bn1.ToTrimmedString(),
1724
0
                result.second->bn2.ToTrimmedString(),
1725
0
                result.second->bn3.ToTrimmedString(),
1726
0
                result.second->bn4.ToTrimmedString(),
1727
0
                result.second->bn5.ToTrimmedString(),
1728
0
                result.second->bn6.ToTrimmedString(),
1729
0
                result.second->bn7.ToTrimmedString(),
1730
0
                result.second->bn8.ToTrimmedString(),
1731
0
                result.second->bn9.ToTrimmedString(),
1732
0
                result.second->bn10.ToTrimmedString(),
1733
0
                result.second->bn11.ToTrimmedString(),
1734
0
                result.second->bn12.ToTrimmedString()
1735
0
        });
1736
0
    }
1737
54
}
1738
1739
54
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
54
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
54
    return module->OpBLS_FinalExp(op);
1742
54
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
55
template<> void ExecutorBase<component::G1, operation::BLS_HashToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG1& op, const ExecutorBase<component::G1, operation::BLS_HashToG1>::ResultPair& result) const {
1746
55
    (void)module;
1747
1748
55
    if ( result.second != std::nullopt  ) {
1749
0
        const auto curveID = op.curveType.Get();
1750
0
        const auto g1_x = result.second->first.ToTrimmedString();
1751
0
        const auto g1_y = result.second->second.ToTrimmedString();
1752
1753
0
        G1AddToPool(curveID, g1_x, g1_y);
1754
1755
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1756
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1757
0
    }
1758
55
}
1759
1760
55
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
55
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
55
    return module->OpBLS_HashToG1(op);
1763
55
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
51
template<> void ExecutorBase<component::G1, operation::BLS_MapToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG1& op, const ExecutorBase<component::G1, operation::BLS_MapToG1>::ResultPair& result) const {
1767
51
    (void)module;
1768
1769
51
    if ( result.second != std::nullopt  ) {
1770
0
        const auto curveID = op.curveType.Get();
1771
0
        const auto g1_x = result.second->first.ToTrimmedString();
1772
0
        const auto g1_y = result.second->second.ToTrimmedString();
1773
1774
0
        G1AddToPool(curveID, g1_x, g1_y);
1775
1776
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1777
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1778
0
    }
1779
51
}
1780
1781
51
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
51
    return module->OpBLS_MapToG1(op);
1783
51
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
48
template<> void ExecutorBase<component::G2, operation::BLS_MapToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG2& op, const ExecutorBase<component::G2, operation::BLS_MapToG2>::ResultPair& result) const {
1787
48
    (void)module;
1788
1789
48
    if ( result.second != std::nullopt  ) {
1790
0
        const auto curveID = op.curveType.Get();
1791
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1792
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1793
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1794
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1795
1796
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1797
1798
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1799
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1800
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1801
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1802
0
    }
1803
48
}
1804
1805
48
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
48
    return module->OpBLS_MapToG2(op);
1807
48
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
92
template<> void ExecutorBase<bool, operation::BLS_IsG1OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG1OnCurve>::ResultPair& result) const {
1811
92
    (void)module;
1812
92
    (void)op;
1813
92
    (void)result;
1814
92
}
1815
1816
92
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
92
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
92
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
84
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
84
    return module->OpBLS_IsG1OnCurve(op);
1822
84
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
124
template<> void ExecutorBase<bool, operation::BLS_IsG2OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG2OnCurve>::ResultPair& result) const {
1826
124
    (void)module;
1827
124
    (void)op;
1828
124
    (void)result;
1829
124
}
1830
1831
124
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
124
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
114
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
104
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
93
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
90
    return module->OpBLS_IsG2OnCurve(op);
1838
93
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
50
template<> void ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op, const ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::ResultPair& result) const {
1842
50
    (void)module;
1843
1844
50
    if ( result.second != std::nullopt  ) {
1845
0
        const auto curveID = op.curveType.Get();
1846
0
        const auto priv = result.second->priv.ToTrimmedString();
1847
0
        const auto g1_x = result.second->pub.first.ToTrimmedString();
1848
0
        const auto g1_y = result.second->pub.second.ToTrimmedString();
1849
1850
0
        G1AddToPool(curveID, g1_x, g1_y);
1851
1852
0
        if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); }
1853
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1854
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1855
0
    }
1856
50
}
1857
1858
50
template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const {
1859
50
    return module->OpBLS_GenerateKeyPair(op);
1860
50
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
55
template<> void ExecutorBase<component::G1, operation::BLS_Decompress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op, const ExecutorBase<component::G1, operation::BLS_Decompress_G1>::ResultPair& result) const {
1864
55
    (void)module;
1865
1866
55
    if ( result.second != std::nullopt  ) {
1867
0
        const auto curveID = op.curveType.Get();
1868
0
        const auto g1_x = result.second->first.ToTrimmedString();
1869
0
        const auto g1_y = result.second->second.ToTrimmedString();
1870
1871
0
        G1AddToPool(curveID, g1_x, g1_y);
1872
1873
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1874
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1875
0
    }
1876
55
}
1877
1878
55
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const {
1879
55
    return module->OpBLS_Decompress_G1(op);
1880
55
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
54
template<> void ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op, const ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::ResultPair& result) const {
1884
54
    (void)module;
1885
54
    (void)op;
1886
1887
54
    if ( result.second != std::nullopt  ) {
1888
0
        const auto compressed = result.second->ToTrimmedString();
1889
1890
0
        if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); }
1891
0
    }
1892
54
}
1893
1894
54
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const {
1895
54
    return module->OpBLS_Compress_G1(op);
1896
54
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
61
template<> void ExecutorBase<component::G2, operation::BLS_Decompress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op, const ExecutorBase<component::G2, operation::BLS_Decompress_G2>::ResultPair& result) const {
1900
61
    (void)module;
1901
1902
61
    if ( result.second != std::nullopt  ) {
1903
0
        const auto curveID = op.curveType.Get();
1904
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1905
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1906
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1907
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1908
1909
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1910
1911
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1912
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1913
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1914
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1915
0
    }
1916
61
}
1917
1918
61
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1919
61
    return module->OpBLS_Decompress_G2(op);
1920
61
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
55
template<> void ExecutorBase<component::G1, operation::BLS_Compress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op, const ExecutorBase<component::G1, operation::BLS_Compress_G2>::ResultPair& result) const {
1924
55
    (void)module;
1925
1926
55
    if ( result.second != std::nullopt  ) {
1927
0
        const auto curveID = op.curveType.Get();
1928
0
        const auto g1_x = result.second->first.ToTrimmedString();
1929
0
        const auto g1_y = result.second->second.ToTrimmedString();
1930
1931
0
        G1AddToPool(curveID, g1_x, g1_y);
1932
1933
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1934
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1935
0
    }
1936
55
}
1937
1938
55
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const {
1939
55
    return module->OpBLS_Compress_G2(op);
1940
55
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
138
template<> void ExecutorBase<component::G1, operation::BLS_G1_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Add& op, const ExecutorBase<component::G1, operation::BLS_G1_Add>::ResultPair& result) const {
1944
138
    (void)module;
1945
1946
138
    if ( result.second != std::nullopt  ) {
1947
0
        const auto curveID = op.curveType.Get();
1948
0
        const auto g1_x = result.second->first.ToTrimmedString();
1949
0
        const auto g1_y = result.second->second.ToTrimmedString();
1950
1951
0
        G1AddToPool(curveID, g1_x, g1_y);
1952
1953
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1954
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1955
0
    }
1956
138
}
1957
1958
138
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const {
1959
138
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
138
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
127
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
116
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
106
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
96
    return module->OpBLS_G1_Add(op);
1966
106
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
101
template<> void ExecutorBase<component::G1, operation::BLS_G1_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op, const ExecutorBase<component::G1, operation::BLS_G1_Mul>::ResultPair& result) const {
1970
101
    (void)module;
1971
1972
101
    if ( result.second != std::nullopt  ) {
1973
0
        const auto curveID = op.curveType.Get();
1974
0
        const auto g1_x = result.second->first.ToTrimmedString();
1975
0
        const auto g1_y = result.second->second.ToTrimmedString();
1976
1977
0
        G1AddToPool(curveID, g1_x, g1_y);
1978
1979
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1980
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1981
0
    }
1982
101
}
1983
1984
101
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1985
101
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
101
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
101
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
91
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
84
    return module->OpBLS_G1_Mul(op);
1991
91
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
117
template<> void ExecutorBase<bool, operation::BLS_G1_IsEq>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op, const ExecutorBase<bool, operation::BLS_G1_IsEq>::ResultPair& result) const {
1995
117
    (void)module;
1996
117
    (void)op;
1997
117
    (void)result;
1998
117
}
1999
2000
117
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
117
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
117
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
107
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
96
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
85
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
75
    return module->OpBLS_G1_IsEq(op);
2008
85
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
78
template<> void ExecutorBase<component::G1, operation::BLS_G1_Neg>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op, const ExecutorBase<component::G1, operation::BLS_G1_Neg>::ResultPair& result) const {
2012
78
    (void)module;
2013
2014
78
    if ( result.second != std::nullopt  ) {
2015
0
        const auto curveID = op.curveType.Get();
2016
0
        const auto g1_x = result.second->first.ToTrimmedString();
2017
0
        const auto g1_y = result.second->second.ToTrimmedString();
2018
2019
0
        G1AddToPool(curveID, g1_x, g1_y);
2020
2021
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
2022
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
2023
0
    }
2024
78
}
2025
2026
78
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const {
2027
78
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
78
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
71
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
70
    return module->OpBLS_G1_Neg(op);
2032
71
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
160
template<> void ExecutorBase<component::G2, operation::BLS_G2_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Add& op, const ExecutorBase<component::G2, operation::BLS_G2_Add>::ResultPair& result) const {
2036
160
    (void)module;
2037
2038
160
    if ( result.second != std::nullopt  ) {
2039
0
        const auto curveID = op.curveType.Get();
2040
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2041
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2042
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2043
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2044
2045
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2046
2047
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2048
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2049
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2050
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2051
0
    }
2052
160
}
2053
2054
160
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
2055
160
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
160
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
149
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
138
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
130
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
122
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
119
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
108
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
98
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
88
    return module->OpBLS_G2_Add(op);
2066
98
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
104
template<> void ExecutorBase<component::G2, operation::BLS_G2_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op, const ExecutorBase<component::G2, operation::BLS_G2_Mul>::ResultPair& result) const {
2070
104
    (void)module;
2071
2072
104
    if ( result.second != std::nullopt  ) {
2073
0
        const auto curveID = op.curveType.Get();
2074
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2075
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2076
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2077
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2078
2079
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2080
2081
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2082
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2083
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2084
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2085
0
    }
2086
104
}
2087
2088
104
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const {
2089
104
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
104
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
101
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
95
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
92
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
86
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
80
    return module->OpBLS_G2_Mul(op);
2097
86
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
142
template<> void ExecutorBase<bool, operation::BLS_G2_IsEq>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op, const ExecutorBase<bool, operation::BLS_G2_IsEq>::ResultPair& result) const {
2101
142
    (void)module;
2102
142
    (void)op;
2103
142
    (void)result;
2104
142
}
2105
2106
142
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
142
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
142
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
141
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
135
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
130
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
120
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
109
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
101
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
90
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
75
    return module->OpBLS_G2_IsEq(op);
2118
90
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
126
template<> void ExecutorBase<component::G2, operation::BLS_G2_Neg>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op, const ExecutorBase<component::G2, operation::BLS_G2_Neg>::ResultPair& result) const {
2122
126
    (void)module;
2123
2124
126
    if ( result.second != std::nullopt  ) {
2125
0
        const auto curveID = op.curveType.Get();
2126
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2127
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2128
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2129
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2130
2131
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2132
2133
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2134
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2135
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2136
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2137
0
    }
2138
126
}
2139
2140
126
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const {
2141
126
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
126
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
120
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
112
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
111
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
101
    return module->OpBLS_G2_Neg(op);
2148
111
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
120
template<> void ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op, const ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::ResultPair& result) const {
2152
120
    (void)module;
2153
2154
120
    if ( result.second != std::nullopt  ) {
2155
0
        const auto curveID = op.curveType.Get();
2156
0
        const auto g1_x = result.second->first.ToTrimmedString();
2157
0
        const auto g1_y = result.second->second.ToTrimmedString();
2158
2159
0
        G1AddToPool(curveID, g1_x, g1_y);
2160
2161
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
2162
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
2163
0
    }
2164
120
}
2165
2166
120
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op) const {
2167
120
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
1.56k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
1.56k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
1.55k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
1.55k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
1.55k
    }
2174
2175
107
    return module->OpBLS_G1_MultiExp(op);
2176
120
}
2177
2178
/* Specialization for operation::Misc */
2179
40
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
40
    (void)module;
2181
40
    (void)op;
2182
40
    (void)result;
2183
40
}
2184
2185
40
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
40
    return module->OpMisc(op);
2187
40
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
50
template<> void ExecutorBase<component::G2, operation::BLS_HashToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG2& op, const ExecutorBase<component::G2, operation::BLS_HashToG2>::ResultPair& result) const {
2191
50
    (void)module;
2192
2193
50
    if ( result.second != std::nullopt  ) {
2194
0
        const auto curveID = op.curveType.Get();
2195
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2196
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2197
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2198
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2199
2200
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2201
2202
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2203
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2204
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2205
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2206
0
    }
2207
50
}
2208
2209
50
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
50
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
50
    return module->OpBLS_HashToG2(op);
2212
50
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
161
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
161
{ }
2217
154
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
154
    this->modulo = component::Bignum(modulo);
2219
154
}
2220
2221
ExecutorBignumCalc_Mod_BLS12_381_R::ExecutorBignumCalc_Mod_BLS12_381_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2222
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
7
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
7
}
2225
2226
ExecutorBignumCalc_Mod_BLS12_381_P::ExecutorBignumCalc_Mod_BLS12_381_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2227
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
7
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
7
}
2230
2231
ExecutorBignumCalc_Mod_BLS12_377_R::ExecutorBignumCalc_Mod_BLS12_377_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2232
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
7
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
7
}
2235
2236
ExecutorBignumCalc_Mod_BLS12_377_P::ExecutorBignumCalc_Mod_BLS12_377_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2237
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
7
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
7
}
2240
2241
ExecutorBignumCalc_Mod_BN128_R::ExecutorBignumCalc_Mod_BN128_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2242
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
7
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
7
}
2245
2246
ExecutorBignumCalc_Mod_BN128_P::ExecutorBignumCalc_Mod_BN128_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2247
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
7
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
7
}
2250
2251
ExecutorBignumCalc_Mod_Vesta_R::ExecutorBignumCalc_Mod_Vesta_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2252
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
7
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
7
}
2255
2256
ExecutorBignumCalc_Mod_Vesta_P::ExecutorBignumCalc_Mod_Vesta_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2257
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
7
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
7
}
2260
2261
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2262
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
7
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
7
}
2265
2266
ExecutorBignumCalc_Mod_Edwards_R::ExecutorBignumCalc_Mod_Edwards_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2267
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
7
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
7
}
2270
2271
ExecutorBignumCalc_Mod_Edwards_P::ExecutorBignumCalc_Mod_Edwards_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2272
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
7
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
7
}
2275
2276
ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2277
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
7
    CF_NORET(SetModulo("18446744069414584321"));
2279
7
}
2280
2281
ExecutorBignumCalc_Mod_MNT4_R::ExecutorBignumCalc_Mod_MNT4_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2282
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
7
}
2285
2286
ExecutorBignumCalc_Mod_MNT4_P::ExecutorBignumCalc_Mod_MNT4_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2287
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
7
}
2290
2291
ExecutorBignumCalc_Mod_MNT6_R::ExecutorBignumCalc_Mod_MNT6_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2292
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
7
}
2295
2296
ExecutorBignumCalc_Mod_MNT6_P::ExecutorBignumCalc_Mod_MNT6_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2297
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
7
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
7
}
2300
2301
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2302
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
7
    CF_NORET(SetModulo("18446744073709551616"));
2304
7
}
2305
2306
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2307
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
7
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
7
}
2310
2311
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2312
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
7
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
7
}
2315
2316
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2317
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
7
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
7
}
2320
2321
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2322
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
7
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
7
}
2325
2326
ExecutorBignumCalc_Mod_SECP256K1_P::ExecutorBignumCalc_Mod_SECP256K1_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2327
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
7
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
7
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
7
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
7
{ }
2334
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2335
0
    this->modulo = component::Bignum(modulo);
2336
0
}
2337
2338
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2339
7
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
7
{ }
2341
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2342
0
    this->modulo = component::Bignum(modulo);
2343
0
}
2344
2345
template <class ResultType, class OperationType>
2346
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2347
749
    operationID(operationID),
2348
749
    modules(modules),
2349
749
    options(options)
2350
749
{
2351
749
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
161
    operationID(operationID),
2348
161
    modules(modules),
2349
161
    options(options)
2350
161
{
2351
161
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
52
template<> void ExecutorBase<bool, operation::SR25519_Verify>::postprocess(std::shared_ptr<Module> module, operation::SR25519_Verify& op, const ExecutorBase<bool, operation::SR25519_Verify>::ResultPair& result) const {
2355
52
    (void)module;
2356
52
    (void)op;
2357
52
    (void)result;
2358
52
}
2359
2360
52
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
52
    return module->OpSR25519_Verify(op);
2362
52
}
2363
2364
template <class ResultType, class OperationType>
2365
749
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
749
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
161
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
161
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
22.2k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22.2k
    ResultSet ret;
2372
2373
66.1k
    for (const auto& result : results) {
2374
66.1k
        if ( result.second == std::nullopt ) {
2375
42.0k
            continue;
2376
42.0k
        }
2377
2378
24.0k
        ret.push_back(result);
2379
24.0k
    }
2380
2381
22.2k
    return ret;
2382
22.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
169
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
169
    ResultSet ret;
2372
2373
847
    for (const auto& result : results) {
2374
847
        if ( result.second == std::nullopt ) {
2375
218
            continue;
2376
218
        }
2377
2378
629
        ret.push_back(result);
2379
629
    }
2380
2381
169
    return ret;
2382
169
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
133
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
133
    ResultSet ret;
2372
2373
772
    for (const auto& result : results) {
2374
772
        if ( result.second == std::nullopt ) {
2375
404
            continue;
2376
404
        }
2377
2378
368
        ret.push_back(result);
2379
368
    }
2380
2381
133
    return ret;
2382
133
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
157
    for (const auto& result : results) {
2374
157
        if ( result.second == std::nullopt ) {
2375
157
            continue;
2376
157
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
174
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
174
    ResultSet ret;
2372
2373
808
    for (const auto& result : results) {
2374
808
        if ( result.second == std::nullopt ) {
2375
558
            continue;
2376
558
        }
2377
2378
250
        ret.push_back(result);
2379
250
    }
2380
2381
174
    return ret;
2382
174
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const
Line
Count
Source
2370
614
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
614
    ResultSet ret;
2372
2373
2.82k
    for (const auto& result : results) {
2374
2.82k
        if ( result.second == std::nullopt ) {
2375
1.53k
            continue;
2376
1.53k
        }
2377
2378
1.28k
        ret.push_back(result);
2379
1.28k
    }
2380
2381
614
    return ret;
2382
614
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
284
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
284
    ResultSet ret;
2372
2373
1.24k
    for (const auto& result : results) {
2374
1.24k
        if ( result.second == std::nullopt ) {
2375
1.07k
            continue;
2376
1.07k
        }
2377
2378
168
        ret.push_back(result);
2379
168
    }
2380
2381
284
    return ret;
2382
284
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
171
    for (const auto& result : results) {
2374
171
        if ( result.second == std::nullopt ) {
2375
171
            continue;
2376
171
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
116
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
116
    ResultSet ret;
2372
2373
716
    for (const auto& result : results) {
2374
716
        if ( result.second == std::nullopt ) {
2375
496
            continue;
2376
496
        }
2377
2378
220
        ret.push_back(result);
2379
220
    }
2380
2381
116
    return ret;
2382
116
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
173
    for (const auto& result : results) {
2374
173
        if ( result.second == std::nullopt ) {
2375
173
            continue;
2376
173
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
173
    for (const auto& result : results) {
2374
173
        if ( result.second == std::nullopt ) {
2375
173
            continue;
2376
173
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
183
    for (const auto& result : results) {
2374
183
        if ( result.second == std::nullopt ) {
2375
183
            continue;
2376
183
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
88
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
88
    ResultSet ret;
2372
2373
482
    for (const auto& result : results) {
2374
482
        if ( result.second == std::nullopt ) {
2375
211
            continue;
2376
211
        }
2377
2378
271
        ret.push_back(result);
2379
271
    }
2380
2381
88
    return ret;
2382
88
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
11
    ResultSet ret;
2372
2373
23
    for (const auto& result : results) {
2374
23
        if ( result.second == std::nullopt ) {
2375
23
            continue;
2376
23
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
11
    return ret;
2382
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
2370
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
209
    for (const auto& result : results) {
2374
209
        if ( result.second == std::nullopt ) {
2375
209
            continue;
2376
209
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22
    ResultSet ret;
2372
2373
127
    for (const auto& result : results) {
2374
127
        if ( result.second == std::nullopt ) {
2375
127
            continue;
2376
127
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
22
    return ret;
2382
22
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
12
    for (const auto& result : results) {
2374
12
        if ( result.second == std::nullopt ) {
2375
12
            continue;
2376
12
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
31
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
31
    ResultSet ret;
2372
2373
201
    for (const auto& result : results) {
2374
201
        if ( result.second == std::nullopt ) {
2375
201
            continue;
2376
201
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
31
    return ret;
2382
31
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
190
    for (const auto& result : results) {
2374
190
        if ( result.second == std::nullopt ) {
2375
190
            continue;
2376
190
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
153
    for (const auto& result : results) {
2374
153
        if ( result.second == std::nullopt ) {
2375
153
            continue;
2376
153
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1.45k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.45k
    ResultSet ret;
2372
2373
3.91k
    for (const auto& result : results) {
2374
3.91k
        if ( result.second == std::nullopt ) {
2375
2.31k
            continue;
2376
2.31k
        }
2377
2378
1.60k
        ret.push_back(result);
2379
1.60k
    }
2380
2381
1.45k
    return ret;
2382
1.45k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1.01k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.01k
    ResultSet ret;
2372
2373
2.63k
    for (const auto& result : results) {
2374
2.63k
        if ( result.second == std::nullopt ) {
2375
1.97k
            continue;
2376
1.97k
        }
2377
2378
654
        ret.push_back(result);
2379
654
    }
2380
2381
1.01k
    return ret;
2382
1.01k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECC_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECC_KeyPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> > > > const&) const
Line
Count
Source
2370
303
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
303
    ResultSet ret;
2372
2373
863
    for (const auto& result : results) {
2374
863
        if ( result.second == std::nullopt ) {
2375
863
            continue;
2376
863
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
303
    return ret;
2382
303
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
2.76k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.76k
    ResultSet ret;
2372
2373
8.05k
    for (const auto& result : results) {
2374
8.05k
        if ( result.second == std::nullopt ) {
2375
3.03k
            continue;
2376
3.03k
        }
2377
2378
5.02k
        ret.push_back(result);
2379
5.02k
    }
2380
2381
2.76k
    return ret;
2382
2.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
58
    for (const auto& result : results) {
2374
58
        if ( result.second == std::nullopt ) {
2375
58
            continue;
2376
58
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
58
    for (const auto& result : results) {
2374
58
        if ( result.second == std::nullopt ) {
2375
58
            continue;
2376
58
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
49
    for (const auto& result : results) {
2374
49
        if ( result.second == std::nullopt ) {
2375
49
            continue;
2376
49
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
161
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
161
    ResultSet ret;
2372
2373
502
    for (const auto& result : results) {
2374
502
        if ( result.second == std::nullopt ) {
2375
502
            continue;
2376
502
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
161
    return ret;
2382
161
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1.77k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.77k
    ResultSet ret;
2372
2373
4.96k
    for (const auto& result : results) {
2374
4.96k
        if ( result.second == std::nullopt ) {
2375
2.49k
            continue;
2376
2.49k
        }
2377
2378
2.47k
        ret.push_back(result);
2379
2.47k
    }
2380
2381
1.77k
    return ret;
2382
1.77k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
49
    for (const auto& result : results) {
2374
49
        if ( result.second == std::nullopt ) {
2375
49
            continue;
2376
49
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
52
    for (const auto& result : results) {
2374
52
        if ( result.second == std::nullopt ) {
2375
52
            continue;
2376
52
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
45
    for (const auto& result : results) {
2374
45
        if ( result.second == std::nullopt ) {
2375
45
            continue;
2376
45
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
53
    for (const auto& result : results) {
2374
53
        if ( result.second == std::nullopt ) {
2375
53
            continue;
2376
53
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
29
    ResultSet ret;
2372
2373
85
    for (const auto& result : results) {
2374
85
        if ( result.second == std::nullopt ) {
2375
85
            continue;
2376
85
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
29
    return ret;
2382
29
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Signature> > > > const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Parameters> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Parameters> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
12
    ResultSet ret;
2372
2373
37
    for (const auto& result : results) {
2374
37
        if ( result.second == std::nullopt ) {
2375
37
            continue;
2376
37
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
12
    return ret;
2382
12
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
375
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
375
    ResultSet ret;
2372
2373
1.09k
    for (const auto& result : results) {
2374
1.09k
        if ( result.second == std::nullopt ) {
2375
926
            continue;
2376
926
        }
2377
2378
167
        ret.push_back(result);
2379
167
    }
2380
2381
375
    return ret;
2382
375
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
420
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
420
    ResultSet ret;
2372
2373
1.18k
    for (const auto& result : results) {
2374
1.18k
        if ( result.second == std::nullopt ) {
2375
1.17k
            continue;
2376
1.17k
        }
2377
2378
14
        ret.push_back(result);
2379
14
    }
2380
2381
420
    return ret;
2382
420
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1.06k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.06k
    ResultSet ret;
2372
2373
2.79k
    for (const auto& result : results) {
2374
2.79k
        if ( result.second == std::nullopt ) {
2375
2.58k
            continue;
2376
2.58k
        }
2377
2378
210
        ret.push_back(result);
2379
210
    }
2380
2381
1.06k
    return ret;
2382
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
53
    for (const auto& result : results) {
2374
53
        if ( result.second == std::nullopt ) {
2375
53
            continue;
2376
53
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
832
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
832
    ResultSet ret;
2372
2373
2.22k
    for (const auto& result : results) {
2374
2.22k
        if ( result.second == std::nullopt ) {
2375
1.94k
            continue;
2376
1.94k
        }
2377
2378
288
        ret.push_back(result);
2379
288
    }
2380
2381
832
    return ret;
2382
832
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
76
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
76
    ResultSet ret;
2372
2373
218
    for (const auto& result : results) {
2374
218
        if ( result.second == std::nullopt ) {
2375
161
            continue;
2376
161
        }
2377
2378
57
        ret.push_back(result);
2379
57
    }
2380
2381
76
    return ret;
2382
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1.09k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.09k
    ResultSet ret;
2372
2373
2.73k
    for (const auto& result : results) {
2374
2.73k
        if ( result.second == std::nullopt ) {
2375
2.63k
            continue;
2376
2.63k
        }
2377
2378
100
        ret.push_back(result);
2379
100
    }
2380
2381
1.09k
    return ret;
2382
1.09k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
37
    ResultSet ret;
2372
2373
101
    for (const auto& result : results) {
2374
101
        if ( result.second == std::nullopt ) {
2375
67
            continue;
2376
67
        }
2377
2378
34
        ret.push_back(result);
2379
34
    }
2380
2381
37
    return ret;
2382
37
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
768
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
768
    ResultSet ret;
2372
2373
2.14k
    for (const auto& result : results) {
2374
2.14k
        if ( result.second == std::nullopt ) {
2375
1.83k
            continue;
2376
1.83k
        }
2377
2378
309
        ret.push_back(result);
2379
309
    }
2380
2381
768
    return ret;
2382
768
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
7.06k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7.06k
    ResultSet ret;
2372
2373
19.7k
    for (const auto& result : results) {
2374
19.7k
        if ( result.second == std::nullopt ) {
2375
9.85k
            continue;
2376
9.85k
        }
2377
2378
9.93k
        ret.push_back(result);
2379
9.93k
    }
2380
2381
7.06k
    return ret;
2382
7.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
109
    for (const auto& result : results) {
2374
109
        if ( result.second == std::nullopt ) {
2375
109
            continue;
2376
109
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
204
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
204
    ResultSet ret;
2372
2373
578
    for (const auto& result : results) {
2374
578
        if ( result.second == std::nullopt ) {
2375
578
            continue;
2376
578
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
204
    return ret;
2382
204
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22
    ResultSet ret;
2372
2373
58
    for (const auto& result : results) {
2374
58
        if ( result.second == std::nullopt ) {
2375
58
            continue;
2376
58
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
22
    return ret;
2382
22
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
65
    for (const auto& result : results) {
2374
65
        if ( result.second == std::nullopt ) {
2375
65
            continue;
2376
65
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&) const
Line
Count
Source
2370
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
21
    ResultSet ret;
2372
2373
56
    for (const auto& result : results) {
2374
56
        if ( result.second == std::nullopt ) {
2375
56
            continue;
2376
56
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
21
    return ret;
2382
21
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
44
    for (const auto& result : results) {
2374
44
        if ( result.second == std::nullopt ) {
2375
44
            continue;
2376
44
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> > > > const&) const
Line
Count
Source
2370
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
70
    for (const auto& result : results) {
2374
70
        if ( result.second == std::nullopt ) {
2375
70
            continue;
2376
70
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
49
    for (const auto& result : results) {
2374
49
        if ( result.second == std::nullopt ) {
2375
49
            continue;
2376
49
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
13
    ResultSet ret;
2372
2373
48
    for (const auto& result : results) {
2374
48
        if ( result.second == std::nullopt ) {
2375
48
            continue;
2376
48
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
13
    return ret;
2382
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
2370
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
57
    for (const auto& result : results) {
2374
57
        if ( result.second == std::nullopt ) {
2375
57
            continue;
2376
57
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
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
2370
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
53
    for (const auto& result : results) {
2374
53
        if ( result.second == std::nullopt ) {
2375
53
            continue;
2376
53
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
45
    for (const auto& result : results) {
2374
45
        if ( result.second == std::nullopt ) {
2375
45
            continue;
2376
45
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
53
    for (const auto& result : results) {
2374
53
        if ( result.second == std::nullopt ) {
2375
53
            continue;
2376
53
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
54
    for (const auto& result : results) {
2374
54
        if ( result.second == std::nullopt ) {
2375
54
            continue;
2376
54
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
49
    for (const auto& result : results) {
2374
49
        if ( result.second == std::nullopt ) {
2375
49
            continue;
2376
49
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
50
    for (const auto& result : results) {
2374
50
        if ( result.second == std::nullopt ) {
2375
50
            continue;
2376
50
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
47
    for (const auto& result : results) {
2374
47
        if ( result.second == std::nullopt ) {
2375
47
            continue;
2376
47
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
74
    for (const auto& result : results) {
2374
74
        if ( result.second == std::nullopt ) {
2375
74
            continue;
2376
74
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
103
    for (const auto& result : results) {
2374
103
        if ( result.second == std::nullopt ) {
2375
103
            continue;
2376
103
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> > > > const&) const
Line
Count
Source
2370
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
49
    for (const auto& result : results) {
2374
49
        if ( result.second == std::nullopt ) {
2375
49
            continue;
2376
49
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
54
    for (const auto& result : results) {
2374
54
        if ( result.second == std::nullopt ) {
2375
54
            continue;
2376
54
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
53
    for (const auto& result : results) {
2374
53
        if ( result.second == std::nullopt ) {
2375
53
            continue;
2376
53
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22
    ResultSet ret;
2372
2373
59
    for (const auto& result : results) {
2374
59
        if ( result.second == std::nullopt ) {
2375
59
            continue;
2376
59
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
22
    return ret;
2382
22
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
53
    for (const auto& result : results) {
2374
53
        if ( result.second == std::nullopt ) {
2375
53
            continue;
2376
53
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
41
    ResultSet ret;
2372
2373
108
    for (const auto& result : results) {
2374
108
        if ( result.second == std::nullopt ) {
2375
108
            continue;
2376
108
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
41
    return ret;
2382
41
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
84
    for (const auto& result : results) {
2374
84
        if ( result.second == std::nullopt ) {
2375
84
            continue;
2376
84
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
96
    for (const auto& result : results) {
2374
96
        if ( result.second == std::nullopt ) {
2375
96
            continue;
2376
96
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
34
    return ret;
2382
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
64
    for (const auto& result : results) {
2374
64
        if ( result.second == std::nullopt ) {
2375
64
            continue;
2376
64
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
48
    ResultSet ret;
2372
2373
136
    for (const auto& result : results) {
2374
136
        if ( result.second == std::nullopt ) {
2375
136
            continue;
2376
136
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
48
    return ret;
2382
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
74
    for (const auto& result : results) {
2374
74
        if ( result.second == std::nullopt ) {
2375
74
            continue;
2376
74
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
111
    for (const auto& result : results) {
2374
111
        if ( result.second == std::nullopt ) {
2375
111
            continue;
2376
111
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
36
    ResultSet ret;
2372
2373
95
    for (const auto& result : results) {
2374
95
        if ( result.second == std::nullopt ) {
2375
95
            continue;
2376
95
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
36
    return ret;
2382
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
38
    ResultSet ret;
2372
2373
107
    for (const auto& result : results) {
2374
107
        if ( result.second == std::nullopt ) {
2375
107
            continue;
2376
107
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
38
    return ret;
2382
38
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
13
    ResultSet ret;
2372
2373
39
    for (const auto& result : results) {
2374
39
        if ( result.second == std::nullopt ) {
2375
39
            continue;
2376
39
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
13
    return ret;
2382
13
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
18
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
18
    ResultSet ret;
2372
2373
49
    for (const auto& result : results) {
2374
49
        if ( result.second == std::nullopt ) {
2375
49
            continue;
2376
49
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
18
    return ret;
2382
18
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
6.20k
void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECC_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2387
6.20k
    (void)operations;
2388
6.20k
    (void)results;
2389
6.20k
    (void)data;
2390
6.20k
    (void)size;
2391
6.20k
}
2392
2393
template <class ResultType, class OperationType>
2394
2.19k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
2.19k
    (void)operation;
2396
2397
2.19k
    return false;
2398
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
132
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
132
    (void)operation;
2396
2397
132
    return false;
2398
132
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
45
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
45
    (void)operation;
2396
2397
45
    return false;
2398
45
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::dontCompare(cryptofuzz::operation::KDF_TLS1_PRF const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::dontCompare(cryptofuzz::operation::KDF_PBKDF const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::dontCompare(cryptofuzz::operation::KDF_PBKDF1 const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::dontCompare(cryptofuzz::operation::KDF_PBKDF2 const&) const
Line
Count
Source
2394
54
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
54
    (void)operation;
2396
2397
54
    return false;
2398
54
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::dontCompare(cryptofuzz::operation::KDF_SSH const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::dontCompare(cryptofuzz::operation::KDF_X963 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::dontCompare(cryptofuzz::operation::KDF_SRTP const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::dontCompare(cryptofuzz::operation::KDF_SRTCP const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2394
567
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
567
    (void)operation;
2396
2397
567
    return false;
2398
567
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
219
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
219
    (void)operation;
2396
2397
219
    return false;
2398
219
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::dontCompare(cryptofuzz::operation::ECC_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::dontCompare(cryptofuzz::operation::Schnorr_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::dontCompare(cryptofuzz::operation::ECCSI_Verify const&) const
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::dontCompare(cryptofuzz::operation::ECDSA_Verify const&) const
Line
Count
Source
2394
813
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
813
    (void)operation;
2396
2397
813
    return false;
2398
813
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const
Line
Count
Source
2394
51
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
51
    (void)operation;
2396
2397
51
    return false;
2398
51
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const
Line
Count
Source
2394
3
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
3
    (void)operation;
2396
2397
3
    return false;
2398
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2394
65
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
65
    (void)operation;
2396
2397
65
    return false;
2398
65
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2394
89
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
89
    (void)operation;
2396
2397
89
    return false;
2398
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
19
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
19
    (void)operation;
2396
2397
19
    return false;
2398
19
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
31
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
31
    (void)operation;
2396
2397
31
    return false;
2398
31
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
10
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
10
    (void)operation;
2396
2397
10
    return false;
2398
10
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DH_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::dontCompare(cryptofuzz::operation::DH_Derive const&) const
Line
Count
Source
2394
97
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
97
    (void)operation;
2396
2397
97
    return false;
2398
97
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::dontCompare(cryptofuzz::operation::BLS_G1_MultiExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
2399
2400
template <>
2401
3.38k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
3.38k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
3.34k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
3.34k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
3.20k
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
3.20k
    return false;
2408
3.20k
}
2409
2410
template <>
2411
0
bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const {
2412
0
    (void)operation;
2413
0
    return true;
2414
0
}
2415
2416
template <>
2417
1.65k
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
1.65k
    if (
2419
1.65k
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
1.27k
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
807
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
590
            return true;
2424
590
        }
2425
807
    }
2426
2427
1.06k
    return false;
2428
1.65k
}
2429
2430
template <>
2431
0
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2432
0
    if (
2433
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2434
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2435
0
        if ( operation.UseRandomNonce() ) {
2436
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2437
0
            return true;
2438
0
        }
2439
0
    }
2440
2441
0
    return false;
2442
0
}
2443
2444
template <>
2445
0
bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const {
2446
0
    if (
2447
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2448
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2449
0
        if ( operation.UseRandomNonce() ) {
2450
            /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */
2451
0
            return true;
2452
0
        }
2453
0
    }
2454
2455
0
    return false;
2456
0
}
2457
2458
/* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */
2459
template <>
2460
241
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
241
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
241
    return false;
2464
241
}
2465
2466
template <>
2467
32
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
32
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
32
    return false;
2471
32
}
2472
2473
template <>
2474
44
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
44
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
44
    return false;
2478
44
}
2479
2480
template <>
2481
66
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
66
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
65
    return false;
2485
66
}
2486
2487
template <class ResultType, class OperationType>
2488
86.4k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
86.4k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
64.1k
        return;
2492
64.1k
    }
2493
2494
22.2k
    const auto filtered = filter(results);
2495
2496
22.2k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
14.6k
        return;
2499
14.6k
    }
2500
2501
7.61k
    if ( dontCompare(operations[0].second) == true ) {
2502
766
        return;
2503
766
    }
2504
2505
20.7k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
13.8k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
13.8k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
13.8k
        const bool equal = *prev == *cur;
2510
2511
13.8k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
13.8k
    }
2528
6.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
362
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
362
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
193
        return;
2492
193
    }
2493
2494
169
    const auto filtered = filter(results);
2495
2496
169
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
37
        return;
2499
37
    }
2500
2501
132
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
629
    for (size_t i = 1; i < filtered.size(); i++) {
2506
497
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
497
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
497
        const bool equal = *prev == *cur;
2510
2511
497
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
497
    }
2528
132
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::HMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::HMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
207
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
207
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
74
        return;
2492
74
    }
2493
2494
133
    const auto filtered = filter(results);
2495
2496
133
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
67
        return;
2499
67
    }
2500
2501
66
    if ( dontCompare(operations[0].second) == true ) {
2502
1
        return;
2503
1
    }
2504
2505
362
    for (size_t i = 1; i < filtered.size(); i++) {
2506
297
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
297
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
297
        const bool equal = *prev == *cur;
2510
2511
297
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
297
    }
2528
65
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
25
        return;
2499
25
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
373
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
373
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
199
        return;
2492
199
    }
2493
2494
174
    const auto filtered = filter(results);
2495
2496
174
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
130
        return;
2499
130
    }
2500
2501
44
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
250
    for (size_t i = 1; i < filtered.size(); i++) {
2506
206
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
206
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
206
        const bool equal = *prev == *cur;
2510
2511
206
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
206
    }
2528
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.38k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1.38k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
772
        return;
2492
772
    }
2493
2494
614
    const auto filtered = filter(results);
2495
2496
614
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
373
        return;
2499
373
    }
2500
2501
241
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.28k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.04k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.04k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.04k
        const bool equal = *prev == *cur;
2510
2511
1.04k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
1.04k
    }
2528
241
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricDecrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricDecrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
670
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
670
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
386
        return;
2492
386
    }
2493
2494
284
    const auto filtered = filter(results);
2495
2496
284
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
252
        return;
2499
252
    }
2500
2501
32
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
168
    for (size_t i = 1; i < filtered.size(); i++) {
2506
136
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
136
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
136
        const bool equal = *prev == *cur;
2510
2511
136
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
136
    }
2528
32
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
27
    const auto filtered = filter(results);
2495
2496
27
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
27
        return;
2499
27
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
322
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
322
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
206
        return;
2492
206
    }
2493
2494
116
    const auto filtered = filter(results);
2495
2496
116
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
71
        return;
2499
71
    }
2500
2501
45
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
220
    for (size_t i = 1; i < filtered.size(); i++) {
2506
175
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
175
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
175
        const bool equal = *prev == *cur;
2510
2511
175
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
175
    }
2528
45
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
27
    const auto filtered = filter(results);
2495
2496
27
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
27
        return;
2499
27
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
28
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
28
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
193
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
193
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
105
        return;
2492
105
    }
2493
2494
88
    const auto filtered = filter(results);
2495
2496
88
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
54
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
271
    for (size_t i = 1; i < filtered.size(); i++) {
2506
217
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
217
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
217
        const bool equal = *prev == *cur;
2510
2511
217
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
217
    }
2528
54
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
12
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
11
    const auto filtered = filter(results);
2495
2496
11
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
11
        return;
2499
11
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
31
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
31
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
23
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
23
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
22
    const auto filtered = filter(results);
2495
2496
22
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
22
        return;
2499
22
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
7
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
33
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
33
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
31
    const auto filtered = filter(results);
2495
2496
31
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
31
        return;
2499
31
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
25
        return;
2499
25
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
6.75k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
6.75k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
5.30k
        return;
2492
5.30k
    }
2493
2494
1.45k
    const auto filtered = filter(results);
2495
2496
1.45k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
891
        return;
2499
891
    }
2500
2501
567
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.50k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
933
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
933
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
933
        const bool equal = *prev == *cur;
2510
2511
933
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
933
    }
2528
567
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
4.11k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
4.11k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
3.09k
        return;
2492
3.09k
    }
2493
2494
1.01k
    const auto filtered = filter(results);
2495
2496
1.01k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
799
        return;
2499
799
    }
2500
2501
219
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
585
    for (size_t i = 1; i < filtered.size(); i++) {
2506
366
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
366
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
366
        const bool equal = *prev == *cur;
2510
2511
366
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
366
    }
2528
219
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
386
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
386
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
83
        return;
2492
83
    }
2493
2494
303
    const auto filtered = filter(results);
2495
2496
303
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
303
        return;
2499
303
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
5.84k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
5.84k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
3.08k
        return;
2492
3.08k
    }
2493
2494
2.76k
    const auto filtered = filter(results);
2495
2496
2.76k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.10k
        return;
2499
1.10k
    }
2500
2501
1.65k
    if ( dontCompare(operations[0].second) == true ) {
2502
590
        return;
2503
590
    }
2504
2505
3.12k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2.06k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2.06k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2.06k
        const bool equal = *prev == *cur;
2510
2511
2.06k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
2.06k
    }
2528
1.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
4
        return;
2492
4
    }
2493
2494
20
    const auto filtered = filter(results);
2495
2496
20
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
20
        return;
2499
20
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
23
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
23
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
4
        return;
2492
4
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
21
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
180
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
19
        return;
2492
19
    }
2493
2494
161
    const auto filtered = filter(results);
2495
2496
161
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
161
        return;
2499
161
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.40k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3.40k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.63k
        return;
2492
1.63k
    }
2493
2494
1.77k
    const auto filtered = filter(results);
2495
2496
1.77k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
961
        return;
2499
961
    }
2500
2501
813
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.29k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.48k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.48k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.48k
        const bool equal = *prev == *cur;
2510
2511
1.48k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
1.48k
    }
2528
813
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
17
    const auto filtered = filter(results);
2495
2496
17
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
19
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
18
    const auto filtered = filter(results);
2495
2496
18
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
17
    const auto filtered = filter(results);
2495
2496
17
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
21
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
42
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
13
        return;
2492
13
    }
2493
2494
29
    const auto filtered = filter(results);
2495
2496
29
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
29
        return;
2499
29
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
13
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
13
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
12
    const auto filtered = filter(results);
2495
2496
12
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
12
        return;
2499
12
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
574
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
574
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
199
        return;
2492
199
    }
2493
2494
375
    const auto filtered = filter(results);
2495
2496
375
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
324
        return;
2499
324
    }
2500
2501
51
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
148
    for (size_t i = 1; i < filtered.size(); i++) {
2506
97
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
97
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
97
        const bool equal = *prev == *cur;
2510
2511
97
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
97
    }
2528
51
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
739
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
739
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
319
        return;
2492
319
    }
2493
2494
420
    const auto filtered = filter(results);
2495
2496
420
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
417
        return;
2499
417
    }
2500
2501
3
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
7
    for (size_t i = 1; i < filtered.size(); i++) {
2506
4
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
4
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
4
        const bool equal = *prev == *cur;
2510
2511
4
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
4
    }
2528
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2.65k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2.65k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.59k
        return;
2492
1.59k
    }
2493
2494
1.06k
    const auto filtered = filter(results);
2495
2496
1.06k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
996
        return;
2499
996
    }
2500
2501
65
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
200
    for (size_t i = 1; i < filtered.size(); i++) {
2506
135
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
135
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
135
        const bool equal = *prev == *cur;
2510
2511
135
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
135
    }
2528
65
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.20k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3.20k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.37k
        return;
2492
2.37k
    }
2493
2494
832
    const auto filtered = filter(results);
2495
2496
832
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
743
        return;
2499
743
    }
2500
2501
89
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
278
    for (size_t i = 1; i < filtered.size(); i++) {
2506
189
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
189
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
189
        const bool equal = *prev == *cur;
2510
2511
189
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
189
    }
2528
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
156
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
156
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
80
        return;
2492
80
    }
2493
2494
76
    const auto filtered = filter(results);
2495
2496
76
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
57
        return;
2499
57
    }
2500
2501
19
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
57
    for (size_t i = 1; i < filtered.size(); i++) {
2506
38
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
38
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
38
        const bool equal = *prev == *cur;
2510
2511
38
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
38
    }
2528
19
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
5.29k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
5.29k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
4.20k
        return;
2492
4.20k
    }
2493
2494
1.09k
    const auto filtered = filter(results);
2495
2496
1.09k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.06k
        return;
2499
1.06k
    }
2500
2501
31
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
85
    for (size_t i = 1; i < filtered.size(); i++) {
2506
54
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
54
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
54
        const bool equal = *prev == *cur;
2510
2511
54
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
54
    }
2528
31
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Cmp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Cmp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
59
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
59
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
37
    const auto filtered = filter(results);
2495
2496
37
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
27
        return;
2499
27
    }
2500
2501
10
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
34
    for (size_t i = 1; i < filtered.size(); i++) {
2506
24
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
24
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
24
        const bool equal = *prev == *cur;
2510
2511
24
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
24
    }
2528
10
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.29k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1.29k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
526
        return;
2492
526
    }
2493
2494
768
    const auto filtered = filter(results);
2495
2496
768
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
671
        return;
2499
671
    }
2500
2501
97
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
290
    for (size_t i = 1; i < filtered.size(); i++) {
2506
193
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
193
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
193
        const bool equal = *prev == *cur;
2510
2511
193
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
193
    }
2528
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
46.2k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
46.2k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
39.2k
        return;
2492
39.2k
    }
2493
2494
7.06k
    const auto filtered = filter(results);
2495
2496
7.06k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3.68k
        return;
2499
3.68k
    }
2500
2501
3.38k
    if ( dontCompare(operations[0].second) == true ) {
2502
175
        return;
2503
175
    }
2504
2505
8.92k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
5.71k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
5.71k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
5.71k
        const bool equal = *prev == *cur;
2510
2511
5.71k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
5.71k
    }
2528
3.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
60
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
60
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
21
        return;
2492
21
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp12>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp12> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
336
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
336
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
132
        return;
2492
132
    }
2493
2494
204
    const auto filtered = filter(results);
2495
2496
204
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
204
        return;
2499
204
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
29
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
7
        return;
2492
7
    }
2493
2494
22
    const auto filtered = filter(results);
2495
2496
22
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
22
        return;
2499
22
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
11
        return;
2492
11
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
29
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
29
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
8
        return;
2492
8
    }
2493
2494
21
    const auto filtered = filter(results);
2495
2496
21
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
17
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
17
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
16
    const auto filtered = filter(results);
2495
2496
16
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
16
        return;
2499
16
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchSign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchSign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
30
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
30
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
4
        return;
2492
4
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
17
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
17
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
15
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
15
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
13
    const auto filtered = filter(results);
2495
2496
13
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
13
        return;
2499
13
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
16
    const auto filtered = filter(results);
2495
2496
16
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
16
        return;
2499
16
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
19
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
18
    const auto filtered = filter(results);
2495
2496
18
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
17
    const auto filtered = filter(results);
2495
2496
17
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
19
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
18
    const auto filtered = filter(results);
2495
2496
18
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
19
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
18
    const auto filtered = filter(results);
2495
2496
18
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
17
    const auto filtered = filter(results);
2495
2496
17
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
17
    const auto filtered = filter(results);
2495
2496
17
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG1OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG1OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
46
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
18
        return;
2492
18
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
60
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
60
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
21
        return;
2492
21
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_GenerateKeyPair>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_GenerateKeyPair> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
17
    const auto filtered = filter(results);
2495
2496
17
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
24
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
24
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
22
    const auto filtered = filter(results);
2495
2496
22
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
22
        return;
2499
22
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
18
    const auto filtered = filter(results);
2495
2496
18
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
71
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
71
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
30
        return;
2492
30
    }
2493
2494
41
    const auto filtered = filter(results);
2495
2496
41
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
41
        return;
2499
41
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
47
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
47
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
17
        return;
2492
17
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
55
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
21
        return;
2492
21
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
34
        return;
2499
34
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
14
        return;
2492
14
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
72
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
72
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
24
        return;
2492
24
    }
2493
2494
48
    const auto filtered = filter(results);
2495
2496
48
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
48
        return;
2499
48
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
58
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
58
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
30
        return;
2492
30
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
70
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
70
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
31
        return;
2492
31
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
67
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
67
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
31
        return;
2492
31
    }
2493
2494
36
    const auto filtered = filter(results);
2495
2496
36
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_MultiExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_MultiExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
51
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
51
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
13
        return;
2492
13
    }
2493
2494
38
    const auto filtered = filter(results);
2495
2496
38
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
38
        return;
2499
38
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
14
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
13
    const auto filtered = filter(results);
2495
2496
13
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
13
        return;
2499
13
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
21
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
3
        return;
2492
3
    }
2493
2494
18
    const auto filtered = filter(results);
2495
2496
18
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
2529
2530
template <class ResultType, class OperationType>
2531
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2532
0
    std::sort(moduleNames.begin(), moduleNames.end());
2533
2534
0
    printf("CPU:\n");
2535
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2536
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2537
2538
0
    printf("Assertion failure: ");
2539
0
    for (const auto& moduleName : moduleNames) {
2540
0
        printf("%s-", moduleName.c_str());
2541
0
    }
2542
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2543
0
    fflush(stdout);
2544
2545
0
    ::abort();
2546
0
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
2547
2548
template <class ResultType, class OperationType>
2549
153k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
153k
    (void)parentDs;
2551
153k
    return op;
2552
153k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
1.20k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.20k
    (void)parentDs;
2551
1.20k
    return op;
2552
1.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
954
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
954
    (void)parentDs;
2551
954
    return op;
2552
954
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
238
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
238
    (void)parentDs;
2551
238
    return op;
2552
238
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
1.09k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.09k
    (void)parentDs;
2551
1.09k
    return op;
2552
1.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
3.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.74k
    (void)parentDs;
2551
3.74k
    return op;
2552
3.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
1.75k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.75k
    (void)parentDs;
2551
1.75k
    return op;
2552
1.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
275
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
275
    (void)parentDs;
2551
275
    return op;
2552
275
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
1.00k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.00k
    (void)parentDs;
2551
1.00k
    return op;
2552
1.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
298
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
298
    (void)parentDs;
2551
298
    return op;
2552
298
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
293
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
293
    (void)parentDs;
2551
293
    return op;
2552
293
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
334
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
334
    (void)parentDs;
2551
334
    return op;
2552
334
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
783
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
783
    (void)parentDs;
2551
783
    return op;
2552
783
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
33
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
33
    (void)parentDs;
2551
33
    return op;
2552
33
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
336
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
336
    (void)parentDs;
2551
336
    return op;
2552
336
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
281
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
281
    (void)parentDs;
2551
281
    return op;
2552
281
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
20
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
20
    (void)parentDs;
2551
20
    return op;
2552
20
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2549
322
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
322
    (void)parentDs;
2551
322
    return op;
2552
322
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTP) const
Line
Count
Source
2549
338
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
338
    (void)parentDs;
2551
338
    return op;
2552
338
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTCP) const
Line
Count
Source
2549
239
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
239
    (void)parentDs;
2551
239
    return op;
2552
239
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
9.48k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9.48k
    (void)parentDs;
2551
9.48k
    return op;
2552
9.48k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
6.10k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.10k
    (void)parentDs;
2551
6.10k
    return op;
2552
6.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
9.16k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9.16k
    (void)parentDs;
2551
9.16k
    return op;
2552
9.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
1.15k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.15k
    (void)parentDs;
2551
1.15k
    return op;
2552
1.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2549
11.3k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
11.3k
    (void)parentDs;
2551
11.3k
    return op;
2552
11.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
92
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
92
    (void)parentDs;
2551
92
    return op;
2552
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2549
88
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
88
    (void)parentDs;
2551
88
    return op;
2552
88
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
72
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
72
    (void)parentDs;
2551
72
    return op;
2552
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
719
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
719
    (void)parentDs;
2551
719
    return op;
2552
719
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
6.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.86k
    (void)parentDs;
2551
6.86k
    return op;
2552
6.86k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
68
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
68
    (void)parentDs;
2551
68
    return op;
2552
68
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
71
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
71
    (void)parentDs;
2551
71
    return op;
2552
71
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
67
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
67
    (void)parentDs;
2551
67
    return op;
2552
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
74
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
74
    (void)parentDs;
2551
74
    return op;
2552
74
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
128
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
128
    (void)parentDs;
2551
128
    return op;
2552
128
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
114
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
114
    (void)parentDs;
2551
114
    return op;
2552
114
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
97
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
97
    (void)parentDs;
2551
97
    return op;
2552
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
71
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
71
    (void)parentDs;
2551
71
    return op;
2552
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
131
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
131
    (void)parentDs;
2551
131
    return op;
2552
131
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
1.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.50k
    (void)parentDs;
2551
1.50k
    return op;
2552
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
1.74k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.74k
    (void)parentDs;
2551
1.74k
    return op;
2552
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
1.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.84k
    (void)parentDs;
2551
1.84k
    return op;
2552
1.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
4.71k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.71k
    (void)parentDs;
2551
4.71k
    return op;
2552
4.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
86
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
86
    (void)parentDs;
2551
86
    return op;
2552
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
4.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.84k
    (void)parentDs;
2551
4.84k
    return op;
2552
4.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
325
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
325
    (void)parentDs;
2551
325
    return op;
2552
325
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
7.25k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.25k
    (void)parentDs;
2551
7.25k
    return op;
2552
7.25k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
159
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
159
    (void)parentDs;
2551
159
    return op;
2552
159
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
4.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.68k
    (void)parentDs;
2551
4.68k
    return op;
2552
4.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
2.96k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.96k
    (void)parentDs;
2551
2.96k
    return op;
2552
2.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
59.1k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
59.1k
    (void)parentDs;
2551
59.1k
    return op;
2552
59.1k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
157
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
157
    (void)parentDs;
2551
157
    return op;
2552
157
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
739
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
739
    (void)parentDs;
2551
739
    return op;
2552
739
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
96
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
96
    (void)parentDs;
2551
96
    return op;
2552
96
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
103
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
103
    (void)parentDs;
2551
103
    return op;
2552
103
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
88
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
88
    (void)parentDs;
2551
88
    return op;
2552
88
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
63
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
63
    (void)parentDs;
2551
63
    return op;
2552
63
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
175
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
175
    (void)parentDs;
2551
175
    return op;
2552
175
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
122
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
122
    (void)parentDs;
2551
122
    return op;
2552
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
118
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
118
    (void)parentDs;
2551
118
    return op;
2552
118
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
133
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
133
    (void)parentDs;
2551
133
    return op;
2552
133
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
84
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
84
    (void)parentDs;
2551
84
    return op;
2552
84
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
77
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
77
    (void)parentDs;
2551
77
    return op;
2552
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
87
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
87
    (void)parentDs;
2551
87
    return op;
2552
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
85
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
85
    (void)parentDs;
2551
85
    return op;
2552
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
76
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
76
    (void)parentDs;
2551
76
    return op;
2552
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
74
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
74
    (void)parentDs;
2551
74
    return op;
2552
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
73
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
73
    (void)parentDs;
2551
73
    return op;
2552
73
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
126
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
126
    (void)parentDs;
2551
126
    return op;
2552
126
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
153
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
153
    (void)parentDs;
2551
153
    return op;
2552
153
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2549
74
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
74
    (void)parentDs;
2551
74
    return op;
2552
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2549
81
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
81
    (void)parentDs;
2551
81
    return op;
2552
81
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
84
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
84
    (void)parentDs;
2551
84
    return op;
2552
84
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2549
100
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
100
    (void)parentDs;
2551
100
    return op;
2552
100
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
85
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
85
    (void)parentDs;
2551
85
    return op;
2552
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
168
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
168
    (void)parentDs;
2551
168
    return op;
2552
168
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
121
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
121
    (void)parentDs;
2551
121
    return op;
2552
121
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
145
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
145
    (void)parentDs;
2551
145
    return op;
2552
145
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
115
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
115
    (void)parentDs;
2551
115
    return op;
2552
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
192
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
192
    (void)parentDs;
2551
192
    return op;
2552
192
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
132
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
132
    (void)parentDs;
2551
132
    return op;
2552
132
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
183
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
183
    (void)parentDs;
2551
183
    return op;
2552
183
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
159
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
159
    (void)parentDs;
2551
159
    return op;
2552
159
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
195
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
195
    (void)parentDs;
2551
195
    return op;
2552
195
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
67
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
67
    (void)parentDs;
2551
67
    return op;
2552
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
116
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
116
    (void)parentDs;
2551
116
    return op;
2552
116
}
2553
2554
14
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
14
    (void)parentDs;
2556
14
    op.modulo = modulo;
2557
14
    return op;
2558
14
}
2559
2560
19
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
19
    (void)parentDs;
2562
19
    op.modulo = modulo;
2563
19
    return op;
2564
19
}
2565
2566
15
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
15
    (void)parentDs;
2568
15
    op.modulo = modulo;
2569
15
    return op;
2570
15
}
2571
2572
12
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
12
    (void)parentDs;
2574
12
    op.modulo = modulo;
2575
12
    return op;
2576
12
}
2577
2578
10
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
10
    (void)parentDs;
2580
10
    op.modulo = modulo;
2581
10
    return op;
2582
10
}
2583
2584
12
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
12
    (void)parentDs;
2586
12
    op.modulo = modulo;
2587
12
    return op;
2588
12
}
2589
2590
14
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
14
    (void)parentDs;
2592
14
    op.modulo = modulo;
2593
14
    return op;
2594
14
}
2595
2596
12
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
12
    (void)parentDs;
2598
12
    op.modulo = modulo;
2599
12
    return op;
2600
12
}
2601
2602
12
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
12
    (void)parentDs;
2604
12
    op.modulo = modulo;
2605
12
    return op;
2606
12
}
2607
2608
11
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
11
    (void)parentDs;
2610
11
    op.modulo = modulo;
2611
11
    return op;
2612
11
}
2613
2614
20
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
20
    (void)parentDs;
2616
20
    op.modulo = modulo;
2617
20
    return op;
2618
20
}
2619
2620
10
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
10
    (void)parentDs;
2622
10
    op.modulo = modulo;
2623
10
    return op;
2624
10
}
2625
2626
11
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
11
    (void)parentDs;
2628
11
    op.modulo = modulo;
2629
11
    return op;
2630
11
}
2631
2632
14
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
14
    (void)parentDs;
2634
14
    op.modulo = modulo;
2635
14
    return op;
2636
14
}
2637
2638
17
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
17
    (void)parentDs;
2640
17
    op.modulo = modulo;
2641
17
    return op;
2642
17
}
2643
2644
12
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
12
    (void)parentDs;
2646
12
    op.modulo = modulo;
2647
12
    return op;
2648
12
}
2649
2650
13
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
13
    (void)parentDs;
2652
13
    op.modulo = modulo;
2653
13
    return op;
2654
13
}
2655
2656
14
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
14
    (void)parentDs;
2658
14
    op.modulo = modulo;
2659
14
    return op;
2660
14
}
2661
2662
10
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
10
    (void)parentDs;
2664
10
    op.modulo = modulo;
2665
10
    return op;
2666
10
}
2667
2668
15
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
15
    (void)parentDs;
2670
15
    op.modulo = modulo;
2671
15
    return op;
2672
15
}
2673
2674
19
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
19
    (void)parentDs;
2676
19
    op.modulo = modulo;
2677
19
    return op;
2678
19
}
2679
2680
16
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
16
    (void)parentDs;
2682
16
    op.modulo = modulo;
2683
16
    return op;
2684
16
}
2685
2686
template <class ResultType, class OperationType>
2687
156k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
156k
    Datasource ds(data, size);
2689
156k
    if ( parentDs != nullptr ) {
2690
156k
        auto modifier = parentDs->GetData(0);
2691
156k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
156k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
156k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.21k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.21k
    Datasource ds(data, size);
2689
1.21k
    if ( parentDs != nullptr ) {
2690
1.21k
        auto modifier = parentDs->GetData(0);
2691
1.21k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.21k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
964
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
964
    Datasource ds(data, size);
2689
964
    if ( parentDs != nullptr ) {
2690
964
        auto modifier = parentDs->GetData(0);
2691
964
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
964
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
964
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
248
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
248
    Datasource ds(data, size);
2689
248
    if ( parentDs != nullptr ) {
2690
248
        auto modifier = parentDs->GetData(0);
2691
248
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
248
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
248
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.10k
    Datasource ds(data, size);
2689
1.10k
    if ( parentDs != nullptr ) {
2690
1.10k
        auto modifier = parentDs->GetData(0);
2691
1.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.10k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.76k
    Datasource ds(data, size);
2689
3.76k
    if ( parentDs != nullptr ) {
2690
3.76k
        auto modifier = parentDs->GetData(0);
2691
3.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.76k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.77k
    Datasource ds(data, size);
2689
1.77k
    if ( parentDs != nullptr ) {
2690
1.77k
        auto modifier = parentDs->GetData(0);
2691
1.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.77k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
288
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
288
    Datasource ds(data, size);
2689
288
    if ( parentDs != nullptr ) {
2690
288
        auto modifier = parentDs->GetData(0);
2691
288
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
288
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
288
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.02k
    Datasource ds(data, size);
2689
1.02k
    if ( parentDs != nullptr ) {
2690
1.02k
        auto modifier = parentDs->GetData(0);
2691
1.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
307
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
307
    Datasource ds(data, size);
2689
307
    if ( parentDs != nullptr ) {
2690
307
        auto modifier = parentDs->GetData(0);
2691
307
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
307
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
307
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
303
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
303
    Datasource ds(data, size);
2689
303
    if ( parentDs != nullptr ) {
2690
303
        auto modifier = parentDs->GetData(0);
2691
303
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
303
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
303
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
348
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
348
    Datasource ds(data, size);
2689
348
    if ( parentDs != nullptr ) {
2690
348
        auto modifier = parentDs->GetData(0);
2691
348
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
348
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
348
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
795
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
795
    Datasource ds(data, size);
2689
795
    if ( parentDs != nullptr ) {
2690
795
        auto modifier = parentDs->GetData(0);
2691
795
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
795
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
795
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
38
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
38
    Datasource ds(data, size);
2689
38
    if ( parentDs != nullptr ) {
2690
38
        auto modifier = parentDs->GetData(0);
2691
38
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
38
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
38
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
348
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
348
    Datasource ds(data, size);
2689
348
    if ( parentDs != nullptr ) {
2690
348
        auto modifier = parentDs->GetData(0);
2691
348
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
348
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
348
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
292
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
292
    Datasource ds(data, size);
2689
292
    if ( parentDs != nullptr ) {
2690
292
        auto modifier = parentDs->GetData(0);
2691
292
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
292
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
292
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
25
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
25
    Datasource ds(data, size);
2689
25
    if ( parentDs != nullptr ) {
2690
25
        auto modifier = parentDs->GetData(0);
2691
25
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
25
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
25
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
331
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
331
    Datasource ds(data, size);
2689
331
    if ( parentDs != nullptr ) {
2690
331
        auto modifier = parentDs->GetData(0);
2691
331
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
331
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
331
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
349
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
349
    Datasource ds(data, size);
2689
349
    if ( parentDs != nullptr ) {
2690
349
        auto modifier = parentDs->GetData(0);
2691
349
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
349
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
349
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
253
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
253
    Datasource ds(data, size);
2689
253
    if ( parentDs != nullptr ) {
2690
253
        auto modifier = parentDs->GetData(0);
2691
253
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
253
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
253
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9.56k
    Datasource ds(data, size);
2689
9.56k
    if ( parentDs != nullptr ) {
2690
9.56k
        auto modifier = parentDs->GetData(0);
2691
9.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9.56k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9.56k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.18k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.18k
    Datasource ds(data, size);
2689
6.18k
    if ( parentDs != nullptr ) {
2690
6.18k
        auto modifier = parentDs->GetData(0);
2691
6.18k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.18k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9.22k
    Datasource ds(data, size);
2689
9.22k
    if ( parentDs != nullptr ) {
2690
9.22k
        auto modifier = parentDs->GetData(0);
2691
9.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9.22k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.22k
    Datasource ds(data, size);
2689
1.22k
    if ( parentDs != nullptr ) {
2690
1.22k
        auto modifier = parentDs->GetData(0);
2691
1.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.22k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
11.4k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
11.4k
    Datasource ds(data, size);
2689
11.4k
    if ( parentDs != nullptr ) {
2690
11.4k
        auto modifier = parentDs->GetData(0);
2691
11.4k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
11.4k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
11.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
101
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
101
    Datasource ds(data, size);
2689
101
    if ( parentDs != nullptr ) {
2690
101
        auto modifier = parentDs->GetData(0);
2691
101
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
101
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
101
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
97
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
97
    Datasource ds(data, size);
2689
97
    if ( parentDs != nullptr ) {
2690
97
        auto modifier = parentDs->GetData(0);
2691
97
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
97
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
97
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
78
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
78
    Datasource ds(data, size);
2689
78
    if ( parentDs != nullptr ) {
2690
78
        auto modifier = parentDs->GetData(0);
2691
78
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
78
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
793
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
793
    Datasource ds(data, size);
2689
793
    if ( parentDs != nullptr ) {
2690
793
        auto modifier = parentDs->GetData(0);
2691
793
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
793
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
793
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.95k
    Datasource ds(data, size);
2689
6.95k
    if ( parentDs != nullptr ) {
2690
6.95k
        auto modifier = parentDs->GetData(0);
2691
6.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.95k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
72
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
72
    Datasource ds(data, size);
2689
72
    if ( parentDs != nullptr ) {
2690
72
        auto modifier = parentDs->GetData(0);
2691
72
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
72
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
75
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
75
    Datasource ds(data, size);
2689
75
    if ( parentDs != nullptr ) {
2690
75
        auto modifier = parentDs->GetData(0);
2691
75
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
75
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
75
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
75
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
75
    Datasource ds(data, size);
2689
75
    if ( parentDs != nullptr ) {
2690
75
        auto modifier = parentDs->GetData(0);
2691
75
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
75
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
75
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
78
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
78
    Datasource ds(data, size);
2689
78
    if ( parentDs != nullptr ) {
2690
78
        auto modifier = parentDs->GetData(0);
2691
78
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
78
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
139
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
139
    Datasource ds(data, size);
2689
139
    if ( parentDs != nullptr ) {
2690
139
        auto modifier = parentDs->GetData(0);
2691
139
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
139
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
139
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
122
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
122
    Datasource ds(data, size);
2689
122
    if ( parentDs != nullptr ) {
2690
122
        auto modifier = parentDs->GetData(0);
2691
122
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
122
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
102
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
102
    Datasource ds(data, size);
2689
102
    if ( parentDs != nullptr ) {
2690
102
        auto modifier = parentDs->GetData(0);
2691
102
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
102
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
102
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
87
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
87
    Datasource ds(data, size);
2689
87
    if ( parentDs != nullptr ) {
2690
87
        auto modifier = parentDs->GetData(0);
2691
87
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
87
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
140
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
140
    Datasource ds(data, size);
2689
140
    if ( parentDs != nullptr ) {
2690
140
        auto modifier = parentDs->GetData(0);
2691
140
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
140
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
140
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.56k
    Datasource ds(data, size);
2689
1.56k
    if ( parentDs != nullptr ) {
2690
1.56k
        auto modifier = parentDs->GetData(0);
2691
1.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.56k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.82k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.82k
    Datasource ds(data, size);
2689
1.82k
    if ( parentDs != nullptr ) {
2690
1.82k
        auto modifier = parentDs->GetData(0);
2691
1.82k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.82k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.92k
    Datasource ds(data, size);
2689
1.92k
    if ( parentDs != nullptr ) {
2690
1.92k
        auto modifier = parentDs->GetData(0);
2691
1.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.92k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.87k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.87k
    Datasource ds(data, size);
2689
4.87k
    if ( parentDs != nullptr ) {
2690
4.87k
        auto modifier = parentDs->GetData(0);
2691
4.87k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.87k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
93
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
93
    Datasource ds(data, size);
2689
93
    if ( parentDs != nullptr ) {
2690
93
        auto modifier = parentDs->GetData(0);
2691
93
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
93
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.96k
    Datasource ds(data, size);
2689
4.96k
    if ( parentDs != nullptr ) {
2690
4.96k
        auto modifier = parentDs->GetData(0);
2691
4.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
330
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
330
    Datasource ds(data, size);
2689
330
    if ( parentDs != nullptr ) {
2690
330
        auto modifier = parentDs->GetData(0);
2691
330
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
330
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
330
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.41k
    Datasource ds(data, size);
2689
7.41k
    if ( parentDs != nullptr ) {
2690
7.41k
        auto modifier = parentDs->GetData(0);
2691
7.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.41k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.41k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
166
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
166
    Datasource ds(data, size);
2689
166
    if ( parentDs != nullptr ) {
2690
166
        auto modifier = parentDs->GetData(0);
2691
166
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
166
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
166
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.80k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.80k
    Datasource ds(data, size);
2689
4.80k
    if ( parentDs != nullptr ) {
2690
4.80k
        auto modifier = parentDs->GetData(0);
2691
4.80k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.80k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.08k
    Datasource ds(data, size);
2689
3.08k
    if ( parentDs != nullptr ) {
2690
3.08k
        auto modifier = parentDs->GetData(0);
2691
3.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.08k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
59.5k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
59.5k
    Datasource ds(data, size);
2689
59.5k
    if ( parentDs != nullptr ) {
2690
59.5k
        auto modifier = parentDs->GetData(0);
2691
59.5k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
59.5k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
59.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
167
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
167
    Datasource ds(data, size);
2689
167
    if ( parentDs != nullptr ) {
2690
167
        auto modifier = parentDs->GetData(0);
2691
167
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
167
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
167
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
754
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
754
    Datasource ds(data, size);
2689
754
    if ( parentDs != nullptr ) {
2690
754
        auto modifier = parentDs->GetData(0);
2691
754
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
754
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
754
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
103
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
103
    Datasource ds(data, size);
2689
103
    if ( parentDs != nullptr ) {
2690
103
        auto modifier = parentDs->GetData(0);
2691
103
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
103
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
103
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
110
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
110
    Datasource ds(data, size);
2689
110
    if ( parentDs != nullptr ) {
2690
110
        auto modifier = parentDs->GetData(0);
2691
110
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
110
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
98
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
98
    Datasource ds(data, size);
2689
98
    if ( parentDs != nullptr ) {
2690
98
        auto modifier = parentDs->GetData(0);
2691
98
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
98
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
98
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
74
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
74
    Datasource ds(data, size);
2689
74
    if ( parentDs != nullptr ) {
2690
74
        auto modifier = parentDs->GetData(0);
2691
74
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
74
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
234
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
234
    Datasource ds(data, size);
2689
234
    if ( parentDs != nullptr ) {
2690
234
        auto modifier = parentDs->GetData(0);
2691
234
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
234
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
234
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
145
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
145
    Datasource ds(data, size);
2689
145
    if ( parentDs != nullptr ) {
2690
145
        auto modifier = parentDs->GetData(0);
2691
145
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
145
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
145
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
180
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
180
    Datasource ds(data, size);
2689
180
    if ( parentDs != nullptr ) {
2690
180
        auto modifier = parentDs->GetData(0);
2691
180
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
180
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
180
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
182
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
182
    Datasource ds(data, size);
2689
182
    if ( parentDs != nullptr ) {
2690
182
        auto modifier = parentDs->GetData(0);
2691
182
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
182
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
182
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
94
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
94
    Datasource ds(data, size);
2689
94
    if ( parentDs != nullptr ) {
2690
94
        auto modifier = parentDs->GetData(0);
2691
94
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
94
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
94
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
86
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
86
    Datasource ds(data, size);
2689
86
    if ( parentDs != nullptr ) {
2690
86
        auto modifier = parentDs->GetData(0);
2691
86
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
86
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
98
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
98
    Datasource ds(data, size);
2689
98
    if ( parentDs != nullptr ) {
2690
98
        auto modifier = parentDs->GetData(0);
2691
98
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
98
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
93
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
93
    Datasource ds(data, size);
2689
93
    if ( parentDs != nullptr ) {
2690
93
        auto modifier = parentDs->GetData(0);
2691
93
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
93
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
84
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
84
    Datasource ds(data, size);
2689
84
    if ( parentDs != nullptr ) {
2690
84
        auto modifier = parentDs->GetData(0);
2691
84
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
84
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
84
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
80
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
80
    Datasource ds(data, size);
2689
80
    if ( parentDs != nullptr ) {
2690
80
        auto modifier = parentDs->GetData(0);
2691
80
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
80
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
79
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
79
    Datasource ds(data, size);
2689
79
    if ( parentDs != nullptr ) {
2690
79
        auto modifier = parentDs->GetData(0);
2691
79
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
79
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
79
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
133
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
133
    Datasource ds(data, size);
2689
133
    if ( parentDs != nullptr ) {
2690
133
        auto modifier = parentDs->GetData(0);
2691
133
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
133
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
133
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
160
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
160
    Datasource ds(data, size);
2689
160
    if ( parentDs != nullptr ) {
2690
160
        auto modifier = parentDs->GetData(0);
2691
160
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
160
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
160
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
80
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
80
    Datasource ds(data, size);
2689
80
    if ( parentDs != nullptr ) {
2690
80
        auto modifier = parentDs->GetData(0);
2691
80
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
80
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
85
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
85
    Datasource ds(data, size);
2689
85
    if ( parentDs != nullptr ) {
2690
85
        auto modifier = parentDs->GetData(0);
2691
85
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
85
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
85
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
91
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
91
    Datasource ds(data, size);
2689
91
    if ( parentDs != nullptr ) {
2690
91
        auto modifier = parentDs->GetData(0);
2691
91
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
91
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
91
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
107
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
107
    Datasource ds(data, size);
2689
107
    if ( parentDs != nullptr ) {
2690
107
        auto modifier = parentDs->GetData(0);
2691
107
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
107
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
107
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
92
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
92
    Datasource ds(data, size);
2689
92
    if ( parentDs != nullptr ) {
2690
92
        auto modifier = parentDs->GetData(0);
2691
92
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
92
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
175
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
175
    Datasource ds(data, size);
2689
175
    if ( parentDs != nullptr ) {
2690
175
        auto modifier = parentDs->GetData(0);
2691
175
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
175
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
175
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
127
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
127
    Datasource ds(data, size);
2689
127
    if ( parentDs != nullptr ) {
2690
127
        auto modifier = parentDs->GetData(0);
2691
127
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
127
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
127
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
151
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
151
    Datasource ds(data, size);
2689
151
    if ( parentDs != nullptr ) {
2690
151
        auto modifier = parentDs->GetData(0);
2691
151
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
151
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
151
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
121
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
121
    Datasource ds(data, size);
2689
121
    if ( parentDs != nullptr ) {
2690
121
        auto modifier = parentDs->GetData(0);
2691
121
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
121
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
121
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
202
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
202
    Datasource ds(data, size);
2689
202
    if ( parentDs != nullptr ) {
2690
202
        auto modifier = parentDs->GetData(0);
2691
202
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
202
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
202
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
138
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
138
    Datasource ds(data, size);
2689
138
    if ( parentDs != nullptr ) {
2690
138
        auto modifier = parentDs->GetData(0);
2691
138
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
138
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
138
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
194
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
194
    Datasource ds(data, size);
2689
194
    if ( parentDs != nullptr ) {
2690
194
        auto modifier = parentDs->GetData(0);
2691
194
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
194
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
194
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
166
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
166
    Datasource ds(data, size);
2689
166
    if ( parentDs != nullptr ) {
2690
166
        auto modifier = parentDs->GetData(0);
2691
166
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
166
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
166
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
220
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
220
    Datasource ds(data, size);
2689
220
    if ( parentDs != nullptr ) {
2690
220
        auto modifier = parentDs->GetData(0);
2691
220
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
220
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
220
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
73
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
73
    Datasource ds(data, size);
2689
73
    if ( parentDs != nullptr ) {
2690
73
        auto modifier = parentDs->GetData(0);
2691
73
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
73
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
73
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
133
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
133
    Datasource ds(data, size);
2689
133
    if ( parentDs != nullptr ) {
2690
133
        auto modifier = parentDs->GetData(0);
2691
133
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
133
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
133
}
2696
2697
template <class ResultType, class OperationType>
2698
153k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
153k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
153k
    if ( options.forceModule != std::nullopt ) {
2703
152k
        moduleID = *options.forceModule;
2704
152k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
153k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
153k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
153k
    return modules.at(moduleID);
2716
153k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.20k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.20k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.20k
    if ( options.forceModule != std::nullopt ) {
2703
1.19k
        moduleID = *options.forceModule;
2704
1.19k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.20k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.20k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.20k
    return modules.at(moduleID);
2716
1.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
954
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
954
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
954
    if ( options.forceModule != std::nullopt ) {
2703
949
        moduleID = *options.forceModule;
2704
949
    }
2705
2706
    /* Skip if this is a disabled module */
2707
954
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
954
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
954
    return modules.at(moduleID);
2716
954
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
238
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
238
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
238
    if ( options.forceModule != std::nullopt ) {
2703
232
        moduleID = *options.forceModule;
2704
232
    }
2705
2706
    /* Skip if this is a disabled module */
2707
238
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
238
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
238
    return modules.at(moduleID);
2716
238
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.09k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.09k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.09k
    if ( options.forceModule != std::nullopt ) {
2703
1.08k
        moduleID = *options.forceModule;
2704
1.08k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.09k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.09k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.09k
    return modules.at(moduleID);
2716
1.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.74k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.74k
    if ( options.forceModule != std::nullopt ) {
2703
3.73k
        moduleID = *options.forceModule;
2704
3.73k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.74k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3.74k
    return modules.at(moduleID);
2716
3.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.75k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.75k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.75k
    if ( options.forceModule != std::nullopt ) {
2703
1.74k
        moduleID = *options.forceModule;
2704
1.74k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.75k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.75k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.75k
    return modules.at(moduleID);
2716
1.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
275
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
275
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
275
    if ( options.forceModule != std::nullopt ) {
2703
270
        moduleID = *options.forceModule;
2704
270
    }
2705
2706
    /* Skip if this is a disabled module */
2707
275
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
275
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
275
    return modules.at(moduleID);
2716
275
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.00k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.00k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.00k
    if ( options.forceModule != std::nullopt ) {
2703
1.00k
        moduleID = *options.forceModule;
2704
1.00k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.00k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.00k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.00k
    return modules.at(moduleID);
2716
1.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
298
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
298
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
298
    if ( options.forceModule != std::nullopt ) {
2703
291
        moduleID = *options.forceModule;
2704
291
    }
2705
2706
    /* Skip if this is a disabled module */
2707
298
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
298
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
298
    return modules.at(moduleID);
2716
298
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
293
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
293
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
293
    if ( options.forceModule != std::nullopt ) {
2703
288
        moduleID = *options.forceModule;
2704
288
    }
2705
2706
    /* Skip if this is a disabled module */
2707
293
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
293
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
293
    return modules.at(moduleID);
2716
293
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
334
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
334
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
334
    if ( options.forceModule != std::nullopt ) {
2703
328
        moduleID = *options.forceModule;
2704
328
    }
2705
2706
    /* Skip if this is a disabled module */
2707
334
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
334
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
334
    return modules.at(moduleID);
2716
334
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
783
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
783
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
783
    if ( options.forceModule != std::nullopt ) {
2703
777
        moduleID = *options.forceModule;
2704
777
    }
2705
2706
    /* Skip if this is a disabled module */
2707
783
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
783
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
783
    return modules.at(moduleID);
2716
783
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
33
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
33
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
33
    if ( options.forceModule != std::nullopt ) {
2703
30
        moduleID = *options.forceModule;
2704
30
    }
2705
2706
    /* Skip if this is a disabled module */
2707
33
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
33
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
33
    return modules.at(moduleID);
2716
33
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
336
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
336
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
336
    if ( options.forceModule != std::nullopt ) {
2703
328
        moduleID = *options.forceModule;
2704
328
    }
2705
2706
    /* Skip if this is a disabled module */
2707
336
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
336
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
336
    return modules.at(moduleID);
2716
336
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
281
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
281
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
281
    if ( options.forceModule != std::nullopt ) {
2703
275
        moduleID = *options.forceModule;
2704
275
    }
2705
2706
    /* Skip if this is a disabled module */
2707
281
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
281
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
281
    return modules.at(moduleID);
2716
281
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
20
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
20
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
20
    if ( options.forceModule != std::nullopt ) {
2703
17
        moduleID = *options.forceModule;
2704
17
    }
2705
2706
    /* Skip if this is a disabled module */
2707
20
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
20
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
20
    return modules.at(moduleID);
2716
20
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
322
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
322
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
322
    if ( options.forceModule != std::nullopt ) {
2703
314
        moduleID = *options.forceModule;
2704
314
    }
2705
2706
    /* Skip if this is a disabled module */
2707
322
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
322
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
322
    return modules.at(moduleID);
2716
322
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
338
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
338
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
338
    if ( options.forceModule != std::nullopt ) {
2703
330
        moduleID = *options.forceModule;
2704
330
    }
2705
2706
    /* Skip if this is a disabled module */
2707
338
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
338
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
338
    return modules.at(moduleID);
2716
338
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
239
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
239
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
239
    if ( options.forceModule != std::nullopt ) {
2703
235
        moduleID = *options.forceModule;
2704
235
    }
2705
2706
    /* Skip if this is a disabled module */
2707
239
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
239
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
239
    return modules.at(moduleID);
2716
239
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
9.48k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
9.48k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
9.48k
    if ( options.forceModule != std::nullopt ) {
2703
9.40k
        moduleID = *options.forceModule;
2704
9.40k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
9.48k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
9.48k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
9.48k
    return modules.at(moduleID);
2716
9.48k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.10k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.10k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.10k
    if ( options.forceModule != std::nullopt ) {
2703
5.95k
        moduleID = *options.forceModule;
2704
5.95k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.10k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.10k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
6.10k
    return modules.at(moduleID);
2716
6.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
9.16k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
9.16k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
9.16k
    if ( options.forceModule != std::nullopt ) {
2703
9.08k
        moduleID = *options.forceModule;
2704
9.08k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
9.16k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
9.16k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
9.16k
    return modules.at(moduleID);
2716
9.16k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.15k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.15k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.15k
    if ( options.forceModule != std::nullopt ) {
2703
1.12k
        moduleID = *options.forceModule;
2704
1.12k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.15k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.15k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.15k
    return modules.at(moduleID);
2716
1.15k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
11.3k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
11.3k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
11.3k
    if ( options.forceModule != std::nullopt ) {
2703
11.3k
        moduleID = *options.forceModule;
2704
11.3k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
11.3k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
11.3k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
11.3k
    return modules.at(moduleID);
2716
11.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
92
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
92
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
92
    if ( options.forceModule != std::nullopt ) {
2703
88
        moduleID = *options.forceModule;
2704
88
    }
2705
2706
    /* Skip if this is a disabled module */
2707
92
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
92
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
92
    return modules.at(moduleID);
2716
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
88
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
88
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
88
    if ( options.forceModule != std::nullopt ) {
2703
84
        moduleID = *options.forceModule;
2704
84
    }
2705
2706
    /* Skip if this is a disabled module */
2707
88
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
88
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
88
    return modules.at(moduleID);
2716
88
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
72
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
72
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
72
    if ( options.forceModule != std::nullopt ) {
2703
67
        moduleID = *options.forceModule;
2704
67
    }
2705
2706
    /* Skip if this is a disabled module */
2707
72
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
72
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
72
    return modules.at(moduleID);
2716
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
719
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
719
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
719
    if ( options.forceModule != std::nullopt ) {
2703
687
        moduleID = *options.forceModule;
2704
687
    }
2705
2706
    /* Skip if this is a disabled module */
2707
719
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
719
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
719
    return modules.at(moduleID);
2716
719
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.86k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.86k
    if ( options.forceModule != std::nullopt ) {
2703
6.82k
        moduleID = *options.forceModule;
2704
6.82k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.86k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
6.86k
    return modules.at(moduleID);
2716
6.86k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
68
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
68
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
68
    if ( options.forceModule != std::nullopt ) {
2703
63
        moduleID = *options.forceModule;
2704
63
    }
2705
2706
    /* Skip if this is a disabled module */
2707
68
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
68
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
68
    return modules.at(moduleID);
2716
68
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
71
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
71
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
71
    if ( options.forceModule != std::nullopt ) {
2703
66
        moduleID = *options.forceModule;
2704
66
    }
2705
2706
    /* Skip if this is a disabled module */
2707
71
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
71
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
71
    return modules.at(moduleID);
2716
71
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
67
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
67
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
67
    if ( options.forceModule != std::nullopt ) {
2703
63
        moduleID = *options.forceModule;
2704
63
    }
2705
2706
    /* Skip if this is a disabled module */
2707
67
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
67
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
67
    return modules.at(moduleID);
2716
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
74
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
74
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
74
    if ( options.forceModule != std::nullopt ) {
2703
69
        moduleID = *options.forceModule;
2704
69
    }
2705
2706
    /* Skip if this is a disabled module */
2707
74
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
74
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
74
    return modules.at(moduleID);
2716
74
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
128
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
128
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
128
    if ( options.forceModule != std::nullopt ) {
2703
124
        moduleID = *options.forceModule;
2704
124
    }
2705
2706
    /* Skip if this is a disabled module */
2707
128
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
128
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
128
    return modules.at(moduleID);
2716
128
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
114
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
114
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
114
    if ( options.forceModule != std::nullopt ) {
2703
107
        moduleID = *options.forceModule;
2704
107
    }
2705
2706
    /* Skip if this is a disabled module */
2707
114
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
114
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
114
    return modules.at(moduleID);
2716
114
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
97
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
97
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
97
    if ( options.forceModule != std::nullopt ) {
2703
87
        moduleID = *options.forceModule;
2704
87
    }
2705
2706
    /* Skip if this is a disabled module */
2707
97
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
97
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
97
    return modules.at(moduleID);
2716
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
71
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
71
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
71
    if ( options.forceModule != std::nullopt ) {
2703
65
        moduleID = *options.forceModule;
2704
65
    }
2705
2706
    /* Skip if this is a disabled module */
2707
71
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
71
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
71
    return modules.at(moduleID);
2716
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
131
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
131
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
131
    if ( options.forceModule != std::nullopt ) {
2703
125
        moduleID = *options.forceModule;
2704
125
    }
2705
2706
    /* Skip if this is a disabled module */
2707
131
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
131
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
131
    return modules.at(moduleID);
2716
131
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.50k
    if ( options.forceModule != std::nullopt ) {
2703
1.47k
        moduleID = *options.forceModule;
2704
1.47k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.50k
    return modules.at(moduleID);
2716
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.74k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.74k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.74k
    if ( options.forceModule != std::nullopt ) {
2703
1.69k
        moduleID = *options.forceModule;
2704
1.69k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.74k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.74k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.74k
    return modules.at(moduleID);
2716
1.74k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.84k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.84k
    if ( options.forceModule != std::nullopt ) {
2703
1.78k
        moduleID = *options.forceModule;
2704
1.78k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.84k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.84k
    return modules.at(moduleID);
2716
1.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.71k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.71k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.71k
    if ( options.forceModule != std::nullopt ) {
2703
4.64k
        moduleID = *options.forceModule;
2704
4.64k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.71k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.71k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.71k
    return modules.at(moduleID);
2716
4.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
86
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
86
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
86
    if ( options.forceModule != std::nullopt ) {
2703
80
        moduleID = *options.forceModule;
2704
80
    }
2705
2706
    /* Skip if this is a disabled module */
2707
86
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
86
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
86
    return modules.at(moduleID);
2716
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.84k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.84k
    if ( options.forceModule != std::nullopt ) {
2703
4.80k
        moduleID = *options.forceModule;
2704
4.80k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.84k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.84k
    return modules.at(moduleID);
2716
4.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
325
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
325
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
325
    if ( options.forceModule != std::nullopt ) {
2703
321
        moduleID = *options.forceModule;
2704
321
    }
2705
2706
    /* Skip if this is a disabled module */
2707
325
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
325
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
325
    return modules.at(moduleID);
2716
325
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.25k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.25k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.25k
    if ( options.forceModule != std::nullopt ) {
2703
7.15k
        moduleID = *options.forceModule;
2704
7.15k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.25k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.25k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7.25k
    return modules.at(moduleID);
2716
7.25k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
159
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
159
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
159
    if ( options.forceModule != std::nullopt ) {
2703
153
        moduleID = *options.forceModule;
2704
153
    }
2705
2706
    /* Skip if this is a disabled module */
2707
159
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
159
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
159
    return modules.at(moduleID);
2716
159
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.68k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.68k
    if ( options.forceModule != std::nullopt ) {
2703
4.58k
        moduleID = *options.forceModule;
2704
4.58k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.68k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.68k
    return modules.at(moduleID);
2716
4.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.96k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.96k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.96k
    if ( options.forceModule != std::nullopt ) {
2703
2.88k
        moduleID = *options.forceModule;
2704
2.88k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.96k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.96k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.96k
    return modules.at(moduleID);
2716
2.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
59.4k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
59.4k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
59.4k
    if ( options.forceModule != std::nullopt ) {
2703
59.3k
        moduleID = *options.forceModule;
2704
59.3k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
59.4k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
59.4k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
59.4k
    return modules.at(moduleID);
2716
59.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
157
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
157
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
157
    if ( options.forceModule != std::nullopt ) {
2703
153
        moduleID = *options.forceModule;
2704
153
    }
2705
2706
    /* Skip if this is a disabled module */
2707
157
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
157
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
157
    return modules.at(moduleID);
2716
157
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
739
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
739
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
739
    if ( options.forceModule != std::nullopt ) {
2703
734
        moduleID = *options.forceModule;
2704
734
    }
2705
2706
    /* Skip if this is a disabled module */
2707
739
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
739
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
739
    return modules.at(moduleID);
2716
739
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
96
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
96
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
96
    if ( options.forceModule != std::nullopt ) {
2703
91
        moduleID = *options.forceModule;
2704
91
    }
2705
2706
    /* Skip if this is a disabled module */
2707
96
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
96
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
96
    return modules.at(moduleID);
2716
96
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
103
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
103
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
103
    if ( options.forceModule != std::nullopt ) {
2703
99
        moduleID = *options.forceModule;
2704
99
    }
2705
2706
    /* Skip if this is a disabled module */
2707
103
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
103
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
103
    return modules.at(moduleID);
2716
103
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
88
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
88
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
88
    if ( options.forceModule != std::nullopt ) {
2703
84
        moduleID = *options.forceModule;
2704
84
    }
2705
2706
    /* Skip if this is a disabled module */
2707
88
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
88
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
88
    return modules.at(moduleID);
2716
88
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
63
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
63
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
63
    if ( options.forceModule != std::nullopt ) {
2703
61
        moduleID = *options.forceModule;
2704
61
    }
2705
2706
    /* Skip if this is a disabled module */
2707
63
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
63
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
63
    return modules.at(moduleID);
2716
63
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
175
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
175
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
175
    if ( options.forceModule != std::nullopt ) {
2703
147
        moduleID = *options.forceModule;
2704
147
    }
2705
2706
    /* Skip if this is a disabled module */
2707
175
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
175
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
175
    return modules.at(moduleID);
2716
175
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
122
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
122
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
122
    if ( options.forceModule != std::nullopt ) {
2703
107
        moduleID = *options.forceModule;
2704
107
    }
2705
2706
    /* Skip if this is a disabled module */
2707
122
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
122
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
122
    return modules.at(moduleID);
2716
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
118
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
118
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
118
    if ( options.forceModule != std::nullopt ) {
2703
104
        moduleID = *options.forceModule;
2704
104
    }
2705
2706
    /* Skip if this is a disabled module */
2707
118
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
118
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
118
    return modules.at(moduleID);
2716
118
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
133
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
133
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
133
    if ( options.forceModule != std::nullopt ) {
2703
119
        moduleID = *options.forceModule;
2704
119
    }
2705
2706
    /* Skip if this is a disabled module */
2707
133
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
133
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
133
    return modules.at(moduleID);
2716
133
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
84
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
84
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
84
    if ( options.forceModule != std::nullopt ) {
2703
80
        moduleID = *options.forceModule;
2704
80
    }
2705
2706
    /* Skip if this is a disabled module */
2707
84
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
84
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
84
    return modules.at(moduleID);
2716
84
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
77
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
77
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
77
    if ( options.forceModule != std::nullopt ) {
2703
72
        moduleID = *options.forceModule;
2704
72
    }
2705
2706
    /* Skip if this is a disabled module */
2707
77
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
77
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
77
    return modules.at(moduleID);
2716
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
87
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
87
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
87
    if ( options.forceModule != std::nullopt ) {
2703
83
        moduleID = *options.forceModule;
2704
83
    }
2705
2706
    /* Skip if this is a disabled module */
2707
87
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
87
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
87
    return modules.at(moduleID);
2716
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
85
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
85
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
85
    if ( options.forceModule != std::nullopt ) {
2703
81
        moduleID = *options.forceModule;
2704
81
    }
2705
2706
    /* Skip if this is a disabled module */
2707
85
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
85
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
85
    return modules.at(moduleID);
2716
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
76
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
76
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
76
    if ( options.forceModule != std::nullopt ) {
2703
72
        moduleID = *options.forceModule;
2704
72
    }
2705
2706
    /* Skip if this is a disabled module */
2707
76
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
76
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
76
    return modules.at(moduleID);
2716
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
74
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
74
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
74
    if ( options.forceModule != std::nullopt ) {
2703
70
        moduleID = *options.forceModule;
2704
70
    }
2705
2706
    /* Skip if this is a disabled module */
2707
74
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
74
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
74
    return modules.at(moduleID);
2716
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
73
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
73
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
73
    if ( options.forceModule != std::nullopt ) {
2703
70
        moduleID = *options.forceModule;
2704
70
    }
2705
2706
    /* Skip if this is a disabled module */
2707
73
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
73
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
73
    return modules.at(moduleID);
2716
73
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
126
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
126
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
126
    if ( options.forceModule != std::nullopt ) {
2703
119
        moduleID = *options.forceModule;
2704
119
    }
2705
2706
    /* Skip if this is a disabled module */
2707
126
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
126
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
126
    return modules.at(moduleID);
2716
126
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
153
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
153
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
153
    if ( options.forceModule != std::nullopt ) {
2703
147
        moduleID = *options.forceModule;
2704
147
    }
2705
2706
    /* Skip if this is a disabled module */
2707
153
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
153
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
153
    return modules.at(moduleID);
2716
153
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
74
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
74
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
74
    if ( options.forceModule != std::nullopt ) {
2703
70
        moduleID = *options.forceModule;
2704
70
    }
2705
2706
    /* Skip if this is a disabled module */
2707
74
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
74
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
74
    return modules.at(moduleID);
2716
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
81
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
81
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
81
    if ( options.forceModule != std::nullopt ) {
2703
77
        moduleID = *options.forceModule;
2704
77
    }
2705
2706
    /* Skip if this is a disabled module */
2707
81
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
81
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
81
    return modules.at(moduleID);
2716
81
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
84
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
84
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
84
    if ( options.forceModule != std::nullopt ) {
2703
80
        moduleID = *options.forceModule;
2704
80
    }
2705
2706
    /* Skip if this is a disabled module */
2707
84
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
84
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
84
    return modules.at(moduleID);
2716
84
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
100
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
100
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
100
    if ( options.forceModule != std::nullopt ) {
2703
92
        moduleID = *options.forceModule;
2704
92
    }
2705
2706
    /* Skip if this is a disabled module */
2707
100
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
100
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
100
    return modules.at(moduleID);
2716
100
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
85
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
85
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
85
    if ( options.forceModule != std::nullopt ) {
2703
81
        moduleID = *options.forceModule;
2704
81
    }
2705
2706
    /* Skip if this is a disabled module */
2707
85
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
85
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
85
    return modules.at(moduleID);
2716
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
168
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
168
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
168
    if ( options.forceModule != std::nullopt ) {
2703
164
        moduleID = *options.forceModule;
2704
164
    }
2705
2706
    /* Skip if this is a disabled module */
2707
168
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
168
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
168
    return modules.at(moduleID);
2716
168
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
121
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
121
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
121
    if ( options.forceModule != std::nullopt ) {
2703
118
        moduleID = *options.forceModule;
2704
118
    }
2705
2706
    /* Skip if this is a disabled module */
2707
121
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
121
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
121
    return modules.at(moduleID);
2716
121
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
145
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
145
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
145
    if ( options.forceModule != std::nullopt ) {
2703
141
        moduleID = *options.forceModule;
2704
141
    }
2705
2706
    /* Skip if this is a disabled module */
2707
145
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
145
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
145
    return modules.at(moduleID);
2716
145
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
115
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
115
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
115
    if ( options.forceModule != std::nullopt ) {
2703
106
        moduleID = *options.forceModule;
2704
106
    }
2705
2706
    /* Skip if this is a disabled module */
2707
115
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
115
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
115
    return modules.at(moduleID);
2716
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
192
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
192
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
192
    if ( options.forceModule != std::nullopt ) {
2703
189
        moduleID = *options.forceModule;
2704
189
    }
2705
2706
    /* Skip if this is a disabled module */
2707
192
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
192
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
192
    return modules.at(moduleID);
2716
192
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
132
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
132
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
132
    if ( options.forceModule != std::nullopt ) {
2703
127
        moduleID = *options.forceModule;
2704
127
    }
2705
2706
    /* Skip if this is a disabled module */
2707
132
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
132
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
132
    return modules.at(moduleID);
2716
132
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
183
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
183
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
183
    if ( options.forceModule != std::nullopt ) {
2703
177
        moduleID = *options.forceModule;
2704
177
    }
2705
2706
    /* Skip if this is a disabled module */
2707
183
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
183
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
183
    return modules.at(moduleID);
2716
183
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
159
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
159
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
159
    if ( options.forceModule != std::nullopt ) {
2703
153
        moduleID = *options.forceModule;
2704
153
    }
2705
2706
    /* Skip if this is a disabled module */
2707
159
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
159
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
159
    return modules.at(moduleID);
2716
159
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
195
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
195
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
195
    if ( options.forceModule != std::nullopt ) {
2703
175
        moduleID = *options.forceModule;
2704
175
    }
2705
2706
    /* Skip if this is a disabled module */
2707
195
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
195
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
195
    return modules.at(moduleID);
2716
195
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
67
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
67
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
67
    if ( options.forceModule != std::nullopt ) {
2703
63
        moduleID = *options.forceModule;
2704
63
    }
2705
2706
    /* Skip if this is a disabled module */
2707
67
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
67
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
67
    return modules.at(moduleID);
2716
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
116
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
116
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
116
    if ( options.forceModule != std::nullopt ) {
2703
92
        moduleID = *options.forceModule;
2704
92
    }
2705
2706
    /* Skip if this is a disabled module */
2707
116
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
116
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
116
    return modules.at(moduleID);
2716
116
}
2717
2718
template <class ResultType, class OperationType>
2719
101k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
101k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
101k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
156k
    do {
2725
156k
        auto op = getOp(&parentDs, data, size);
2726
156k
        auto module = getModule(parentDs);
2727
156k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
156k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
156k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2.02k
            break;
2736
2.02k
        }
2737
156k
    } while ( parentDs.Get<bool>() == true );
2738
2739
101k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
101k
#if 1
2745
101k
    {
2746
101k
        std::set<uint64_t> moduleIDs;
2747
101k
        for (const auto& m : modules ) {
2748
96.4k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
96.4k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
96.4k
            moduleIDs.insert(moduleID);
2756
96.4k
        }
2757
2758
101k
        std::set<uint64_t> operationModuleIDs;
2759
145k
        for (const auto& op : operations) {
2760
145k
            operationModuleIDs.insert(op.first->ID);
2761
145k
        }
2762
2763
101k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
101k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
101k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
101k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
101k
    }
2771
101k
#endif
2772
2773
101k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
101k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
246k
    for (size_t i = 0; i < operations.size(); i++) {
2781
145k
        auto& operation = operations[i];
2782
2783
145k
        auto& module = operation.first;
2784
145k
        auto& op = operation.second;
2785
2786
145k
        if ( i > 0 ) {
2787
48.8k
            auto& prevModule = operations[i-1].first;
2788
48.8k
            auto& prevOp = operations[i-1].second;
2789
2790
48.8k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
16.8k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16.8k
                if ( curModifier.size() == 0 ) {
2793
4.38M
                    for (size_t j = 0; j < 512; j++) {
2794
4.37M
                        curModifier.push_back(1);
2795
4.37M
                    }
2796
8.54k
                } else {
2797
1.22M
                    for (auto& c : curModifier) {
2798
1.22M
                        c++;
2799
1.22M
                    }
2800
8.29k
                }
2801
16.8k
            }
2802
48.8k
        }
2803
2804
145k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
145k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
145k
        const auto& result = results.back();
2811
2812
145k
        if ( result.second != std::nullopt ) {
2813
48.1k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
48.1k
        }
2820
2821
145k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
145k
        if ( options.disableTests == false ) {
2830
145k
            tests::test(op, result.second);
2831
145k
        }
2832
2833
145k
        postprocess(module, op, result);
2834
145k
    }
2835
2836
101k
    if ( options.noCompare == false ) {
2837
96.4k
        compare(operations, results, data, size);
2838
96.4k
    }
2839
101k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
390
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
390
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
390
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.21k
    do {
2725
1.21k
        auto op = getOp(&parentDs, data, size);
2726
1.21k
        auto module = getModule(parentDs);
2727
1.21k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.21k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.21k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
1.21k
    } while ( parentDs.Get<bool>() == true );
2738
2739
390
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
390
#if 1
2745
390
    {
2746
390
        std::set<uint64_t> moduleIDs;
2747
390
        for (const auto& m : modules ) {
2748
362
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
362
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
362
            moduleIDs.insert(moduleID);
2756
362
        }
2757
2758
390
        std::set<uint64_t> operationModuleIDs;
2759
1.04k
        for (const auto& op : operations) {
2760
1.04k
            operationModuleIDs.insert(op.first->ID);
2761
1.04k
        }
2762
2763
390
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
390
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
390
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
390
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
390
    }
2771
390
#endif
2772
2773
390
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
390
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.43k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.04k
        auto& operation = operations[i];
2782
2783
1.04k
        auto& module = operation.first;
2784
1.04k
        auto& op = operation.second;
2785
2786
1.04k
        if ( i > 0 ) {
2787
678
            auto& prevModule = operations[i-1].first;
2788
678
            auto& prevOp = operations[i-1].second;
2789
2790
678
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
301
                auto& curModifier = op.modifier.GetVectorPtr();
2792
301
                if ( curModifier.size() == 0 ) {
2793
112k
                    for (size_t j = 0; j < 512; j++) {
2794
112k
                        curModifier.push_back(1);
2795
112k
                    }
2796
220
                } else {
2797
51.4k
                    for (auto& c : curModifier) {
2798
51.4k
                        c++;
2799
51.4k
                    }
2800
81
                }
2801
301
            }
2802
678
        }
2803
2804
1.04k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.04k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.04k
        const auto& result = results.back();
2811
2812
1.04k
        if ( result.second != std::nullopt ) {
2813
771
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
771
        }
2820
2821
1.04k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.04k
        if ( options.disableTests == false ) {
2830
1.04k
            tests::test(op, result.second);
2831
1.04k
        }
2832
2833
1.04k
        postprocess(module, op, result);
2834
1.04k
    }
2835
2836
390
    if ( options.noCompare == false ) {
2837
362
        compare(operations, results, data, size);
2838
362
    }
2839
390
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
230
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
230
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
230
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
964
    do {
2725
964
        auto op = getOp(&parentDs, data, size);
2726
964
        auto module = getModule(parentDs);
2727
964
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
964
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
964
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
964
    } while ( parentDs.Get<bool>() == true );
2738
2739
230
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
230
#if 1
2745
230
    {
2746
230
        std::set<uint64_t> moduleIDs;
2747
230
        for (const auto& m : modules ) {
2748
207
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
207
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
207
            moduleIDs.insert(moduleID);
2756
207
        }
2757
2758
230
        std::set<uint64_t> operationModuleIDs;
2759
846
        for (const auto& op : operations) {
2760
846
            operationModuleIDs.insert(op.first->ID);
2761
846
        }
2762
2763
230
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
230
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
230
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
230
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
230
    }
2771
230
#endif
2772
2773
230
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
230
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.07k
    for (size_t i = 0; i < operations.size(); i++) {
2781
846
        auto& operation = operations[i];
2782
2783
846
        auto& module = operation.first;
2784
846
        auto& op = operation.second;
2785
2786
846
        if ( i > 0 ) {
2787
639
            auto& prevModule = operations[i-1].first;
2788
639
            auto& prevOp = operations[i-1].second;
2789
2790
639
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
272
                auto& curModifier = op.modifier.GetVectorPtr();
2792
272
                if ( curModifier.size() == 0 ) {
2793
111k
                    for (size_t j = 0; j < 512; j++) {
2794
111k
                        curModifier.push_back(1);
2795
111k
                    }
2796
218
                } else {
2797
11.6k
                    for (auto& c : curModifier) {
2798
11.6k
                        c++;
2799
11.6k
                    }
2800
54
                }
2801
272
            }
2802
639
        }
2803
2804
846
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
846
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
846
        const auto& result = results.back();
2811
2812
846
        if ( result.second != std::nullopt ) {
2813
422
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
422
        }
2820
2821
846
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
846
        if ( options.disableTests == false ) {
2830
846
            tests::test(op, result.second);
2831
846
        }
2832
2833
846
        postprocess(module, op, result);
2834
846
    }
2835
2836
230
    if ( options.noCompare == false ) {
2837
207
        compare(operations, results, data, size);
2838
207
    }
2839
230
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
50
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
50
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
50
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
248
    do {
2725
248
        auto op = getOp(&parentDs, data, size);
2726
248
        auto module = getModule(parentDs);
2727
248
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
248
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
248
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
248
    } while ( parentDs.Get<bool>() == true );
2738
2739
50
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
50
#if 1
2745
50
    {
2746
50
        std::set<uint64_t> moduleIDs;
2747
50
        for (const auto& m : modules ) {
2748
26
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26
            moduleIDs.insert(moduleID);
2756
26
        }
2757
2758
50
        std::set<uint64_t> operationModuleIDs;
2759
158
        for (const auto& op : operations) {
2760
158
            operationModuleIDs.insert(op.first->ID);
2761
158
        }
2762
2763
50
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
50
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
50
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
50
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
50
    }
2771
50
#endif
2772
2773
50
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
50
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
208
    for (size_t i = 0; i < operations.size(); i++) {
2781
158
        auto& operation = operations[i];
2782
2783
158
        auto& module = operation.first;
2784
158
        auto& op = operation.second;
2785
2786
158
        if ( i > 0 ) {
2787
132
            auto& prevModule = operations[i-1].first;
2788
132
            auto& prevOp = operations[i-1].second;
2789
2790
132
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
68
                auto& curModifier = op.modifier.GetVectorPtr();
2792
68
                if ( curModifier.size() == 0 ) {
2793
26.6k
                    for (size_t j = 0; j < 512; j++) {
2794
26.6k
                        curModifier.push_back(1);
2795
26.6k
                    }
2796
52
                } else {
2797
1.56k
                    for (auto& c : curModifier) {
2798
1.56k
                        c++;
2799
1.56k
                    }
2800
16
                }
2801
68
            }
2802
132
        }
2803
2804
158
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
158
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
158
        const auto& result = results.back();
2811
2812
158
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
158
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
158
        if ( options.disableTests == false ) {
2830
158
            tests::test(op, result.second);
2831
158
        }
2832
2833
158
        postprocess(module, op, result);
2834
158
    }
2835
2836
50
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
395
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
395
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
395
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.10k
    do {
2725
1.10k
        auto op = getOp(&parentDs, data, size);
2726
1.10k
        auto module = getModule(parentDs);
2727
1.10k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.10k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.10k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
1.10k
    } while ( parentDs.Get<bool>() == true );
2738
2739
395
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
395
#if 1
2745
395
    {
2746
395
        std::set<uint64_t> moduleIDs;
2747
395
        for (const auto& m : modules ) {
2748
373
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
373
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
373
            moduleIDs.insert(moduleID);
2756
373
        }
2757
2758
395
        std::set<uint64_t> operationModuleIDs;
2759
1.00k
        for (const auto& op : operations) {
2760
1.00k
            operationModuleIDs.insert(op.first->ID);
2761
1.00k
        }
2762
2763
395
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
395
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
395
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
395
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
395
    }
2771
395
#endif
2772
2773
395
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
395
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.40k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.00k
        auto& operation = operations[i];
2782
2783
1.00k
        auto& module = operation.first;
2784
1.00k
        auto& op = operation.second;
2785
2786
1.00k
        if ( i > 0 ) {
2787
634
            auto& prevModule = operations[i-1].first;
2788
634
            auto& prevOp = operations[i-1].second;
2789
2790
634
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
313
                auto& curModifier = op.modifier.GetVectorPtr();
2792
313
                if ( curModifier.size() == 0 ) {
2793
134k
                    for (size_t j = 0; j < 512; j++) {
2794
134k
                        curModifier.push_back(1);
2795
134k
                    }
2796
263
                } else {
2797
3.99k
                    for (auto& c : curModifier) {
2798
3.99k
                        c++;
2799
3.99k
                    }
2800
50
                }
2801
313
            }
2802
634
        }
2803
2804
1.00k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.00k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.00k
        const auto& result = results.back();
2811
2812
1.00k
        if ( result.second != std::nullopt ) {
2813
279
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
279
        }
2820
2821
1.00k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.00k
        if ( options.disableTests == false ) {
2830
1.00k
            tests::test(op, result.second);
2831
1.00k
        }
2832
2833
1.00k
        postprocess(module, op, result);
2834
1.00k
    }
2835
2836
395
    if ( options.noCompare == false ) {
2837
373
        compare(operations, results, data, size);
2838
373
    }
2839
395
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.42k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.42k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.42k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.76k
    do {
2725
3.76k
        auto op = getOp(&parentDs, data, size);
2726
3.76k
        auto module = getModule(parentDs);
2727
3.76k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.76k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.76k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
3.76k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.42k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.42k
#if 1
2745
1.42k
    {
2746
1.42k
        std::set<uint64_t> moduleIDs;
2747
1.42k
        for (const auto& m : modules ) {
2748
1.38k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.38k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.38k
            moduleIDs.insert(moduleID);
2756
1.38k
        }
2757
2758
1.42k
        std::set<uint64_t> operationModuleIDs;
2759
3.59k
        for (const auto& op : operations) {
2760
3.59k
            operationModuleIDs.insert(op.first->ID);
2761
3.59k
        }
2762
2763
1.42k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.42k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.42k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.42k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.42k
    }
2771
1.42k
#endif
2772
2773
1.42k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.42k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5.02k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.59k
        auto& operation = operations[i];
2782
2783
3.59k
        auto& module = operation.first;
2784
3.59k
        auto& op = operation.second;
2785
2786
3.59k
        if ( i > 0 ) {
2787
2.20k
            auto& prevModule = operations[i-1].first;
2788
2.20k
            auto& prevOp = operations[i-1].second;
2789
2790
2.20k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
848
                auto& curModifier = op.modifier.GetVectorPtr();
2792
848
                if ( curModifier.size() == 0 ) {
2793
328k
                    for (size_t j = 0; j < 512; j++) {
2794
327k
                        curModifier.push_back(1);
2795
327k
                    }
2796
640
                } else {
2797
10.2k
                    for (auto& c : curModifier) {
2798
10.2k
                        c++;
2799
10.2k
                    }
2800
208
                }
2801
848
            }
2802
2.20k
        }
2803
2804
3.59k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.59k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.59k
        const auto& result = results.back();
2811
2812
3.59k
        if ( result.second != std::nullopt ) {
2813
1.45k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.45k
        }
2820
2821
3.59k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3.59k
        if ( options.disableTests == false ) {
2830
3.59k
            tests::test(op, result.second);
2831
3.59k
        }
2832
2833
3.59k
        postprocess(module, op, result);
2834
3.59k
    }
2835
2836
1.42k
    if ( options.noCompare == false ) {
2837
1.38k
        compare(operations, results, data, size);
2838
1.38k
    }
2839
1.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
711
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
711
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
711
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.77k
    do {
2725
1.77k
        auto op = getOp(&parentDs, data, size);
2726
1.77k
        auto module = getModule(parentDs);
2727
1.77k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.77k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.77k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
1.77k
    } while ( parentDs.Get<bool>() == true );
2738
2739
711
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
711
#if 1
2745
711
    {
2746
711
        std::set<uint64_t> moduleIDs;
2747
711
        for (const auto& m : modules ) {
2748
670
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
670
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
670
            moduleIDs.insert(moduleID);
2756
670
        }
2757
2758
711
        std::set<uint64_t> operationModuleIDs;
2759
1.62k
        for (const auto& op : operations) {
2760
1.62k
            operationModuleIDs.insert(op.first->ID);
2761
1.62k
        }
2762
2763
711
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
711
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
711
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
711
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
711
    }
2771
711
#endif
2772
2773
711
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
711
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.33k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.62k
        auto& operation = operations[i];
2782
2783
1.62k
        auto& module = operation.first;
2784
1.62k
        auto& op = operation.second;
2785
2786
1.62k
        if ( i > 0 ) {
2787
956
            auto& prevModule = operations[i-1].first;
2788
956
            auto& prevOp = operations[i-1].second;
2789
2790
956
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
436
                auto& curModifier = op.modifier.GetVectorPtr();
2792
436
                if ( curModifier.size() == 0 ) {
2793
177k
                    for (size_t j = 0; j < 512; j++) {
2794
177k
                        curModifier.push_back(1);
2795
177k
                    }
2796
346
                } else {
2797
13.1k
                    for (auto& c : curModifier) {
2798
13.1k
                        c++;
2799
13.1k
                    }
2800
90
                }
2801
436
            }
2802
956
        }
2803
2804
1.62k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.62k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.62k
        const auto& result = results.back();
2811
2812
1.62k
        if ( result.second != std::nullopt ) {
2813
200
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
200
        }
2820
2821
1.62k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.62k
        if ( options.disableTests == false ) {
2830
1.62k
            tests::test(op, result.second);
2831
1.62k
        }
2832
2833
1.62k
        postprocess(module, op, result);
2834
1.62k
    }
2835
2836
711
    if ( options.noCompare == false ) {
2837
670
        compare(operations, results, data, size);
2838
670
    }
2839
711
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
55
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
55
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
55
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
288
    do {
2725
288
        auto op = getOp(&parentDs, data, size);
2726
288
        auto module = getModule(parentDs);
2727
288
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
288
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
288
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
288
    } while ( parentDs.Get<bool>() == true );
2738
2739
55
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
55
#if 1
2745
55
    {
2746
55
        std::set<uint64_t> moduleIDs;
2747
55
        for (const auto& m : modules ) {
2748
28
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
28
            moduleIDs.insert(moduleID);
2756
28
        }
2757
2758
55
        std::set<uint64_t> operationModuleIDs;
2759
172
        for (const auto& op : operations) {
2760
172
            operationModuleIDs.insert(op.first->ID);
2761
172
        }
2762
2763
55
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
55
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
55
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
55
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
55
    }
2771
55
#endif
2772
2773
55
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
55
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
227
    for (size_t i = 0; i < operations.size(); i++) {
2781
172
        auto& operation = operations[i];
2782
2783
172
        auto& module = operation.first;
2784
172
        auto& op = operation.second;
2785
2786
172
        if ( i > 0 ) {
2787
144
            auto& prevModule = operations[i-1].first;
2788
144
            auto& prevOp = operations[i-1].second;
2789
2790
144
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
77
                auto& curModifier = op.modifier.GetVectorPtr();
2792
77
                if ( curModifier.size() == 0 ) {
2793
25.6k
                    for (size_t j = 0; j < 512; j++) {
2794
25.6k
                        curModifier.push_back(1);
2795
25.6k
                    }
2796
50
                } else {
2797
264
                    for (auto& c : curModifier) {
2798
264
                        c++;
2799
264
                    }
2800
27
                }
2801
77
            }
2802
144
        }
2803
2804
172
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
172
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
172
        const auto& result = results.back();
2811
2812
172
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
172
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
172
        if ( options.disableTests == false ) {
2830
172
            tests::test(op, result.second);
2831
172
        }
2832
2833
172
        postprocess(module, op, result);
2834
172
    }
2835
2836
55
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
55
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
347
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
347
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
347
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.02k
    do {
2725
1.02k
        auto op = getOp(&parentDs, data, size);
2726
1.02k
        auto module = getModule(parentDs);
2727
1.02k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.02k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.02k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
1.02k
    } while ( parentDs.Get<bool>() == true );
2738
2739
347
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
347
#if 1
2745
347
    {
2746
347
        std::set<uint64_t> moduleIDs;
2747
347
        for (const auto& m : modules ) {
2748
322
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
322
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
322
            moduleIDs.insert(moduleID);
2756
322
        }
2757
2758
347
        std::set<uint64_t> operationModuleIDs;
2759
922
        for (const auto& op : operations) {
2760
922
            operationModuleIDs.insert(op.first->ID);
2761
922
        }
2762
2763
347
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
347
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
347
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
347
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
347
    }
2771
347
#endif
2772
2773
347
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
347
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.26k
    for (size_t i = 0; i < operations.size(); i++) {
2781
922
        auto& operation = operations[i];
2782
2783
922
        auto& module = operation.first;
2784
922
        auto& op = operation.second;
2785
2786
922
        if ( i > 0 ) {
2787
600
            auto& prevModule = operations[i-1].first;
2788
600
            auto& prevOp = operations[i-1].second;
2789
2790
600
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
308
                auto& curModifier = op.modifier.GetVectorPtr();
2792
308
                if ( curModifier.size() == 0 ) {
2793
139k
                    for (size_t j = 0; j < 512; j++) {
2794
139k
                        curModifier.push_back(1);
2795
139k
                    }
2796
272
                } else {
2797
716
                    for (auto& c : curModifier) {
2798
716
                        c++;
2799
716
                    }
2800
36
                }
2801
308
            }
2802
600
        }
2803
2804
922
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
922
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
922
        const auto& result = results.back();
2811
2812
922
        if ( result.second != std::nullopt ) {
2813
399
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
399
        }
2820
2821
922
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
922
        if ( options.disableTests == false ) {
2830
922
            tests::test(op, result.second);
2831
922
        }
2832
2833
922
        postprocess(module, op, result);
2834
922
    }
2835
2836
347
    if ( options.noCompare == false ) {
2837
322
        compare(operations, results, data, size);
2838
322
    }
2839
347
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
53
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
53
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
53
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
307
    do {
2725
307
        auto op = getOp(&parentDs, data, size);
2726
307
        auto module = getModule(parentDs);
2727
307
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
307
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
307
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
307
    } while ( parentDs.Get<bool>() == true );
2738
2739
53
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
53
#if 1
2745
53
    {
2746
53
        std::set<uint64_t> moduleIDs;
2747
53
        for (const auto& m : modules ) {
2748
28
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
28
            moduleIDs.insert(moduleID);
2756
28
        }
2757
2758
53
        std::set<uint64_t> operationModuleIDs;
2759
174
        for (const auto& op : operations) {
2760
174
            operationModuleIDs.insert(op.first->ID);
2761
174
        }
2762
2763
53
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
53
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
53
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
53
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
53
    }
2771
53
#endif
2772
2773
53
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
53
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
227
    for (size_t i = 0; i < operations.size(); i++) {
2781
174
        auto& operation = operations[i];
2782
2783
174
        auto& module = operation.first;
2784
174
        auto& op = operation.second;
2785
2786
174
        if ( i > 0 ) {
2787
146
            auto& prevModule = operations[i-1].first;
2788
146
            auto& prevOp = operations[i-1].second;
2789
2790
146
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
71
                auto& curModifier = op.modifier.GetVectorPtr();
2792
71
                if ( curModifier.size() == 0 ) {
2793
27.1k
                    for (size_t j = 0; j < 512; j++) {
2794
27.1k
                        curModifier.push_back(1);
2795
27.1k
                    }
2796
53
                } else {
2797
246
                    for (auto& c : curModifier) {
2798
246
                        c++;
2799
246
                    }
2800
18
                }
2801
71
            }
2802
146
        }
2803
2804
174
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
174
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
174
        const auto& result = results.back();
2811
2812
174
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
174
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
174
        if ( options.disableTests == false ) {
2830
174
            tests::test(op, result.second);
2831
174
        }
2832
2833
174
        postprocess(module, op, result);
2834
174
    }
2835
2836
53
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
53
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
50
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
50
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
50
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
303
    do {
2725
303
        auto op = getOp(&parentDs, data, size);
2726
303
        auto module = getModule(parentDs);
2727
303
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
303
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
303
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
303
    } while ( parentDs.Get<bool>() == true );
2738
2739
50
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
50
#if 1
2745
50
    {
2746
50
        std::set<uint64_t> moduleIDs;
2747
50
        for (const auto& m : modules ) {
2748
28
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
28
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
28
            moduleIDs.insert(moduleID);
2756
28
        }
2757
2758
50
        std::set<uint64_t> operationModuleIDs;
2759
175
        for (const auto& op : operations) {
2760
175
            operationModuleIDs.insert(op.first->ID);
2761
175
        }
2762
2763
50
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
50
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
50
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
50
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
50
    }
2771
50
#endif
2772
2773
50
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
50
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
225
    for (size_t i = 0; i < operations.size(); i++) {
2781
175
        auto& operation = operations[i];
2782
2783
175
        auto& module = operation.first;
2784
175
        auto& op = operation.second;
2785
2786
175
        if ( i > 0 ) {
2787
147
            auto& prevModule = operations[i-1].first;
2788
147
            auto& prevOp = operations[i-1].second;
2789
2790
147
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
68
                auto& curModifier = op.modifier.GetVectorPtr();
2792
68
                if ( curModifier.size() == 0 ) {
2793
27.7k
                    for (size_t j = 0; j < 512; j++) {
2794
27.6k
                        curModifier.push_back(1);
2795
27.6k
                    }
2796
54
                } else {
2797
260
                    for (auto& c : curModifier) {
2798
260
                        c++;
2799
260
                    }
2800
14
                }
2801
68
            }
2802
147
        }
2803
2804
175
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
175
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
175
        const auto& result = results.back();
2811
2812
175
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
175
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
175
        if ( options.disableTests == false ) {
2830
175
            tests::test(op, result.second);
2831
175
        }
2832
2833
175
        postprocess(module, op, result);
2834
175
    }
2835
2836
50
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
58
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
58
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
58
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
348
    do {
2725
348
        auto op = getOp(&parentDs, data, size);
2726
348
        auto module = getModule(parentDs);
2727
348
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
348
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
348
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
348
    } while ( parentDs.Get<bool>() == true );
2738
2739
58
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
58
#if 1
2745
58
    {
2746
58
        std::set<uint64_t> moduleIDs;
2747
58
        for (const auto& m : modules ) {
2748
27
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
27
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
27
            moduleIDs.insert(moduleID);
2756
27
        }
2757
2758
58
        std::set<uint64_t> operationModuleIDs;
2759
184
        for (const auto& op : operations) {
2760
184
            operationModuleIDs.insert(op.first->ID);
2761
184
        }
2762
2763
58
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
58
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
58
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
58
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
58
    }
2771
58
#endif
2772
2773
58
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
58
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
242
    for (size_t i = 0; i < operations.size(); i++) {
2781
184
        auto& operation = operations[i];
2782
2783
184
        auto& module = operation.first;
2784
184
        auto& op = operation.second;
2785
2786
184
        if ( i > 0 ) {
2787
157
            auto& prevModule = operations[i-1].first;
2788
157
            auto& prevOp = operations[i-1].second;
2789
2790
157
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
75
                auto& curModifier = op.modifier.GetVectorPtr();
2792
75
                if ( curModifier.size() == 0 ) {
2793
29.2k
                    for (size_t j = 0; j < 512; j++) {
2794
29.1k
                        curModifier.push_back(1);
2795
29.1k
                    }
2796
57
                } else {
2797
265
                    for (auto& c : curModifier) {
2798
265
                        c++;
2799
265
                    }
2800
18
                }
2801
75
            }
2802
157
        }
2803
2804
184
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
184
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
184
        const auto& result = results.back();
2811
2812
184
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
184
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
184
        if ( options.disableTests == false ) {
2830
184
            tests::test(op, result.second);
2831
184
        }
2832
2833
184
        postprocess(module, op, result);
2834
184
    }
2835
2836
58
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
58
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
225
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
225
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
225
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
795
    do {
2725
795
        auto op = getOp(&parentDs, data, size);
2726
795
        auto module = getModule(parentDs);
2727
795
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
795
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
795
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
795
    } while ( parentDs.Get<bool>() == true );
2738
2739
225
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
225
#if 1
2745
225
    {
2746
225
        std::set<uint64_t> moduleIDs;
2747
225
        for (const auto& m : modules ) {
2748
193
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
193
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
193
            moduleIDs.insert(moduleID);
2756
193
        }
2757
2758
225
        std::set<uint64_t> operationModuleIDs;
2759
587
        for (const auto& op : operations) {
2760
587
            operationModuleIDs.insert(op.first->ID);
2761
587
        }
2762
2763
225
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
225
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
225
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
225
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
225
    }
2771
225
#endif
2772
2773
225
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
225
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
812
    for (size_t i = 0; i < operations.size(); i++) {
2781
587
        auto& operation = operations[i];
2782
2783
587
        auto& module = operation.first;
2784
587
        auto& op = operation.second;
2785
2786
587
        if ( i > 0 ) {
2787
394
            auto& prevModule = operations[i-1].first;
2788
394
            auto& prevOp = operations[i-1].second;
2789
2790
394
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
194
                auto& curModifier = op.modifier.GetVectorPtr();
2792
194
                if ( curModifier.size() == 0 ) {
2793
79.0k
                    for (size_t j = 0; j < 512; j++) {
2794
78.8k
                        curModifier.push_back(1);
2795
78.8k
                    }
2796
154
                } else {
2797
5.08k
                    for (auto& c : curModifier) {
2798
5.08k
                        c++;
2799
5.08k
                    }
2800
40
                }
2801
194
            }
2802
394
        }
2803
2804
587
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
587
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
587
        const auto& result = results.back();
2811
2812
587
        if ( result.second != std::nullopt ) {
2813
369
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
369
        }
2820
2821
587
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
587
        if ( options.disableTests == false ) {
2830
587
            tests::test(op, result.second);
2831
587
        }
2832
2833
587
        postprocess(module, op, result);
2834
587
    }
2835
2836
225
    if ( options.noCompare == false ) {
2837
193
        compare(operations, results, data, size);
2838
193
    }
2839
225
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
22
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
22
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
22
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
38
    do {
2725
38
        auto op = getOp(&parentDs, data, size);
2726
38
        auto module = getModule(parentDs);
2727
38
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
38
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
38
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
38
    } while ( parentDs.Get<bool>() == true );
2738
2739
22
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
22
#if 1
2745
22
    {
2746
22
        std::set<uint64_t> moduleIDs;
2747
22
        for (const auto& m : modules ) {
2748
12
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
12
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
12
            moduleIDs.insert(moduleID);
2756
12
        }
2757
2758
22
        std::set<uint64_t> operationModuleIDs;
2759
24
        for (const auto& op : operations) {
2760
24
            operationModuleIDs.insert(op.first->ID);
2761
24
        }
2762
2763
22
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
22
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
22
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
22
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
22
    }
2771
22
#endif
2772
2773
22
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
22
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
46
    for (size_t i = 0; i < operations.size(); i++) {
2781
24
        auto& operation = operations[i];
2782
2783
24
        auto& module = operation.first;
2784
24
        auto& op = operation.second;
2785
2786
24
        if ( i > 0 ) {
2787
12
            auto& prevModule = operations[i-1].first;
2788
12
            auto& prevOp = operations[i-1].second;
2789
2790
12
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
9
                auto& curModifier = op.modifier.GetVectorPtr();
2792
9
                if ( curModifier.size() == 0 ) {
2793
513
                    for (size_t j = 0; j < 512; j++) {
2794
512
                        curModifier.push_back(1);
2795
512
                    }
2796
8
                } else {
2797
292
                    for (auto& c : curModifier) {
2798
292
                        c++;
2799
292
                    }
2800
8
                }
2801
9
            }
2802
12
        }
2803
2804
24
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
24
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
24
        const auto& result = results.back();
2811
2812
24
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
24
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
24
        if ( options.disableTests == false ) {
2830
24
            tests::test(op, result.second);
2831
24
        }
2832
2833
24
        postprocess(module, op, result);
2834
24
    }
2835
2836
22
    if ( options.noCompare == false ) {
2837
12
        compare(operations, results, data, size);
2838
12
    }
2839
22
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
59
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
59
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
59
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
348
    do {
2725
348
        auto op = getOp(&parentDs, data, size);
2726
348
        auto module = getModule(parentDs);
2727
348
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
348
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
348
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
348
    } while ( parentDs.Get<bool>() == true );
2738
2739
59
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
59
#if 1
2745
59
    {
2746
59
        std::set<uint64_t> moduleIDs;
2747
59
        for (const auto& m : modules ) {
2748
31
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
31
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
31
            moduleIDs.insert(moduleID);
2756
31
        }
2757
2758
59
        std::set<uint64_t> operationModuleIDs;
2759
210
        for (const auto& op : operations) {
2760
210
            operationModuleIDs.insert(op.first->ID);
2761
210
        }
2762
2763
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
59
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
59
    }
2771
59
#endif
2772
2773
59
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
59
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
269
    for (size_t i = 0; i < operations.size(); i++) {
2781
210
        auto& operation = operations[i];
2782
2783
210
        auto& module = operation.first;
2784
210
        auto& op = operation.second;
2785
2786
210
        if ( i > 0 ) {
2787
179
            auto& prevModule = operations[i-1].first;
2788
179
            auto& prevOp = operations[i-1].second;
2789
2790
179
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
88
                auto& curModifier = op.modifier.GetVectorPtr();
2792
88
                if ( curModifier.size() == 0 ) {
2793
29.2k
                    for (size_t j = 0; j < 512; j++) {
2794
29.1k
                        curModifier.push_back(1);
2795
29.1k
                    }
2796
57
                } else {
2797
255
                    for (auto& c : curModifier) {
2798
255
                        c++;
2799
255
                    }
2800
31
                }
2801
88
            }
2802
179
        }
2803
2804
210
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
210
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
210
        const auto& result = results.back();
2811
2812
210
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
210
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
210
        if ( options.disableTests == false ) {
2830
210
            tests::test(op, result.second);
2831
210
        }
2832
2833
210
        postprocess(module, op, result);
2834
210
    }
2835
2836
59
    if ( options.noCompare == false ) {
2837
31
        compare(operations, results, data, size);
2838
31
    }
2839
59
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
52
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
52
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
52
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
292
    do {
2725
292
        auto op = getOp(&parentDs, data, size);
2726
292
        auto module = getModule(parentDs);
2727
292
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
292
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
292
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
292
    } while ( parentDs.Get<bool>() == true );
2738
2739
52
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
52
#if 1
2745
52
    {
2746
52
        std::set<uint64_t> moduleIDs;
2747
52
        for (const auto& m : modules ) {
2748
23
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
23
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
23
            moduleIDs.insert(moduleID);
2756
23
        }
2757
2758
52
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
128
            operationModuleIDs.insert(op.first->ID);
2761
128
        }
2762
2763
52
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
52
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
52
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
52
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
52
    }
2771
52
#endif
2772
2773
52
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
52
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
180
    for (size_t i = 0; i < operations.size(); i++) {
2781
128
        auto& operation = operations[i];
2782
2783
128
        auto& module = operation.first;
2784
128
        auto& op = operation.second;
2785
2786
128
        if ( i > 0 ) {
2787
105
            auto& prevModule = operations[i-1].first;
2788
105
            auto& prevOp = operations[i-1].second;
2789
2790
105
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
57
                auto& curModifier = op.modifier.GetVectorPtr();
2792
57
                if ( curModifier.size() == 0 ) {
2793
21.0k
                    for (size_t j = 0; j < 512; j++) {
2794
20.9k
                        curModifier.push_back(1);
2795
20.9k
                    }
2796
41
                } else {
2797
250
                    for (auto& c : curModifier) {
2798
250
                        c++;
2799
250
                    }
2800
16
                }
2801
57
            }
2802
105
        }
2803
2804
128
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
128
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
128
        const auto& result = results.back();
2811
2812
128
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
128
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
128
        if ( options.disableTests == false ) {
2830
128
            tests::test(op, result.second);
2831
128
        }
2832
2833
128
        postprocess(module, op, result);
2834
128
    }
2835
2836
52
    if ( options.noCompare == false ) {
2837
23
        compare(operations, results, data, size);
2838
23
    }
2839
52
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
16
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
16
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
16
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
25
    do {
2725
25
        auto op = getOp(&parentDs, data, size);
2726
25
        auto module = getModule(parentDs);
2727
25
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
25
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
25
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
25
    } while ( parentDs.Get<bool>() == true );
2738
2739
16
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
16
#if 1
2745
16
    {
2746
16
        std::set<uint64_t> moduleIDs;
2747
16
        for (const auto& m : modules ) {
2748
7
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7
            moduleIDs.insert(moduleID);
2756
7
        }
2757
2758
16
        std::set<uint64_t> operationModuleIDs;
2759
16
        for (const auto& op : operations) {
2760
13
            operationModuleIDs.insert(op.first->ID);
2761
13
        }
2762
2763
16
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
16
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
16
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
16
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
16
    }
2771
16
#endif
2772
2773
16
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
16
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
29
    for (size_t i = 0; i < operations.size(); i++) {
2781
13
        auto& operation = operations[i];
2782
2783
13
        auto& module = operation.first;
2784
13
        auto& op = operation.second;
2785
2786
13
        if ( i > 0 ) {
2787
6
            auto& prevModule = operations[i-1].first;
2788
6
            auto& prevOp = operations[i-1].second;
2789
2790
6
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
5
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5
                if ( curModifier.size() == 0 ) {
2793
513
                    for (size_t j = 0; j < 512; j++) {
2794
512
                        curModifier.push_back(1);
2795
512
                    }
2796
4
                } else {
2797
572
                    for (auto& c : curModifier) {
2798
572
                        c++;
2799
572
                    }
2800
4
                }
2801
5
            }
2802
6
        }
2803
2804
13
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
13
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
13
        const auto& result = results.back();
2811
2812
13
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
13
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
13
        if ( options.disableTests == false ) {
2830
13
            tests::test(op, result.second);
2831
13
        }
2832
2833
13
        postprocess(module, op, result);
2834
13
    }
2835
2836
16
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
16
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
59
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
59
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
59
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
331
    do {
2725
331
        auto op = getOp(&parentDs, data, size);
2726
331
        auto module = getModule(parentDs);
2727
331
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
331
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
331
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
331
    } while ( parentDs.Get<bool>() == true );
2738
2739
59
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
59
#if 1
2745
59
    {
2746
59
        std::set<uint64_t> moduleIDs;
2747
59
        for (const auto& m : modules ) {
2748
33
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
33
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
33
            moduleIDs.insert(moduleID);
2756
33
        }
2757
2758
59
        std::set<uint64_t> operationModuleIDs;
2759
203
        for (const auto& op : operations) {
2760
203
            operationModuleIDs.insert(op.first->ID);
2761
203
        }
2762
2763
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
59
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
59
    }
2771
59
#endif
2772
2773
59
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
59
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
262
    for (size_t i = 0; i < operations.size(); i++) {
2781
203
        auto& operation = operations[i];
2782
2783
203
        auto& module = operation.first;
2784
203
        auto& op = operation.second;
2785
2786
203
        if ( i > 0 ) {
2787
170
            auto& prevModule = operations[i-1].first;
2788
170
            auto& prevOp = operations[i-1].second;
2789
2790
170
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
87
                auto& curModifier = op.modifier.GetVectorPtr();
2792
87
                if ( curModifier.size() == 0 ) {
2793
39.5k
                    for (size_t j = 0; j < 512; j++) {
2794
39.4k
                        curModifier.push_back(1);
2795
39.4k
                    }
2796
77
                } else {
2797
257
                    for (auto& c : curModifier) {
2798
257
                        c++;
2799
257
                    }
2800
10
                }
2801
87
            }
2802
170
        }
2803
2804
203
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
203
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
203
        const auto& result = results.back();
2811
2812
203
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
203
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
203
        if ( options.disableTests == false ) {
2830
203
            tests::test(op, result.second);
2831
203
        }
2832
2833
203
        postprocess(module, op, result);
2834
203
    }
2835
2836
59
    if ( options.noCompare == false ) {
2837
33
        compare(operations, results, data, size);
2838
33
    }
2839
59
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
54
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
54
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
54
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
349
    do {
2725
349
        auto op = getOp(&parentDs, data, size);
2726
349
        auto module = getModule(parentDs);
2727
349
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
349
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
349
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
349
    } while ( parentDs.Get<bool>() == true );
2738
2739
54
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
54
#if 1
2745
54
    {
2746
54
        std::set<uint64_t> moduleIDs;
2747
54
        for (const auto& m : modules ) {
2748
27
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
27
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
27
            moduleIDs.insert(moduleID);
2756
27
        }
2757
2758
54
        std::set<uint64_t> operationModuleIDs;
2759
191
        for (const auto& op : operations) {
2760
191
            operationModuleIDs.insert(op.first->ID);
2761
191
        }
2762
2763
54
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
54
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
54
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
54
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
54
    }
2771
54
#endif
2772
2773
54
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
54
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
245
    for (size_t i = 0; i < operations.size(); i++) {
2781
191
        auto& operation = operations[i];
2782
2783
191
        auto& module = operation.first;
2784
191
        auto& op = operation.second;
2785
2786
191
        if ( i > 0 ) {
2787
164
            auto& prevModule = operations[i-1].first;
2788
164
            auto& prevOp = operations[i-1].second;
2789
2790
164
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
72
                auto& curModifier = op.modifier.GetVectorPtr();
2792
72
                if ( curModifier.size() == 0 ) {
2793
17.4k
                    for (size_t j = 0; j < 512; j++) {
2794
17.4k
                        curModifier.push_back(1);
2795
17.4k
                    }
2796
38
                } else {
2797
264
                    for (auto& c : curModifier) {
2798
264
                        c++;
2799
264
                    }
2800
38
                }
2801
72
            }
2802
164
        }
2803
2804
191
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
191
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
191
        const auto& result = results.back();
2811
2812
191
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
191
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
191
        if ( options.disableTests == false ) {
2830
191
            tests::test(op, result.second);
2831
191
        }
2832
2833
191
        postprocess(module, op, result);
2834
191
    }
2835
2836
54
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
54
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
51
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
51
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
51
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
253
    do {
2725
253
        auto op = getOp(&parentDs, data, size);
2726
253
        auto module = getModule(parentDs);
2727
253
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
253
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
253
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
253
    } while ( parentDs.Get<bool>() == true );
2738
2739
51
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
51
#if 1
2745
51
    {
2746
51
        std::set<uint64_t> moduleIDs;
2747
51
        for (const auto& m : modules ) {
2748
26
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26
            moduleIDs.insert(moduleID);
2756
26
        }
2757
2758
51
        std::set<uint64_t> operationModuleIDs;
2759
154
        for (const auto& op : operations) {
2760
154
            operationModuleIDs.insert(op.first->ID);
2761
154
        }
2762
2763
51
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
51
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
51
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
51
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
51
    }
2771
51
#endif
2772
2773
51
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
51
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
205
    for (size_t i = 0; i < operations.size(); i++) {
2781
154
        auto& operation = operations[i];
2782
2783
154
        auto& module = operation.first;
2784
154
        auto& op = operation.second;
2785
2786
154
        if ( i > 0 ) {
2787
128
            auto& prevModule = operations[i-1].first;
2788
128
            auto& prevOp = operations[i-1].second;
2789
2790
128
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
62
                auto& curModifier = op.modifier.GetVectorPtr();
2792
62
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
34
                } else {
2797
520
                    for (auto& c : curModifier) {
2798
520
                        c++;
2799
520
                    }
2800
34
                }
2801
62
            }
2802
128
        }
2803
2804
154
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
154
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
154
        const auto& result = results.back();
2811
2812
154
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
154
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
154
        if ( options.disableTests == false ) {
2830
154
            tests::test(op, result.second);
2831
154
        }
2832
2833
154
        postprocess(module, op, result);
2834
154
    }
2835
2836
51
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
51
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6.94k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.94k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.94k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9.56k
    do {
2725
9.56k
        auto op = getOp(&parentDs, data, size);
2726
9.56k
        auto module = getModule(parentDs);
2727
9.56k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
9.56k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9.56k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
80
            break;
2736
80
        }
2737
9.56k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.94k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.94k
#if 1
2745
6.94k
    {
2746
6.94k
        std::set<uint64_t> moduleIDs;
2747
6.94k
        for (const auto& m : modules ) {
2748
6.75k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6.75k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6.75k
            moduleIDs.insert(moduleID);
2756
6.75k
        }
2757
2758
6.94k
        std::set<uint64_t> operationModuleIDs;
2759
9.21k
        for (const auto& op : operations) {
2760
9.21k
            operationModuleIDs.insert(op.first->ID);
2761
9.21k
        }
2762
2763
6.94k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.94k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.94k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.94k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6.94k
    }
2771
6.94k
#endif
2772
2773
6.94k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.94k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
16.1k
    for (size_t i = 0; i < operations.size(); i++) {
2781
9.21k
        auto& operation = operations[i];
2782
2783
9.21k
        auto& module = operation.first;
2784
9.21k
        auto& op = operation.second;
2785
2786
9.21k
        if ( i > 0 ) {
2787
2.45k
            auto& prevModule = operations[i-1].first;
2788
2.45k
            auto& prevOp = operations[i-1].second;
2789
2790
2.45k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
917
                auto& curModifier = op.modifier.GetVectorPtr();
2792
917
                if ( curModifier.size() == 0 ) {
2793
233k
                    for (size_t j = 0; j < 512; j++) {
2794
232k
                        curModifier.push_back(1);
2795
232k
                    }
2796
462
                } else {
2797
10.8k
                    for (auto& c : curModifier) {
2798
10.8k
                        c++;
2799
10.8k
                    }
2800
462
                }
2801
917
            }
2802
2.45k
        }
2803
2804
9.21k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9.21k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9.21k
        const auto& result = results.back();
2811
2812
9.21k
        if ( result.second != std::nullopt ) {
2813
4.11k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
4.11k
        }
2820
2821
9.21k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
9.21k
        if ( options.disableTests == false ) {
2830
9.21k
            tests::test(op, result.second);
2831
9.21k
        }
2832
2833
9.21k
        postprocess(module, op, result);
2834
9.21k
    }
2835
2836
6.94k
    if ( options.noCompare == false ) {
2837
6.75k
        compare(operations, results, data, size);
2838
6.75k
    }
2839
6.94k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.36k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.36k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.36k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.18k
    do {
2725
6.18k
        auto op = getOp(&parentDs, data, size);
2726
6.18k
        auto module = getModule(parentDs);
2727
6.18k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
6.18k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6.18k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
56
            break;
2736
56
        }
2737
6.18k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.36k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.36k
#if 1
2745
4.36k
    {
2746
4.36k
        std::set<uint64_t> moduleIDs;
2747
4.36k
        for (const auto& m : modules ) {
2748
4.11k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.11k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.11k
            moduleIDs.insert(moduleID);
2756
4.11k
        }
2757
2758
4.36k
        std::set<uint64_t> operationModuleIDs;
2759
5.73k
        for (const auto& op : operations) {
2760
5.73k
            operationModuleIDs.insert(op.first->ID);
2761
5.73k
        }
2762
2763
4.36k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.36k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.36k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.36k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.36k
    }
2771
4.36k
#endif
2772
2773
4.36k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.36k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
10.0k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.73k
        auto& operation = operations[i];
2782
2783
5.73k
        auto& module = operation.first;
2784
5.73k
        auto& op = operation.second;
2785
2786
5.73k
        if ( i > 0 ) {
2787
1.61k
            auto& prevModule = operations[i-1].first;
2788
1.61k
            auto& prevOp = operations[i-1].second;
2789
2790
1.61k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
557
                auto& curModifier = op.modifier.GetVectorPtr();
2792
557
                if ( curModifier.size() == 0 ) {
2793
74.8k
                    for (size_t j = 0; j < 512; j++) {
2794
74.7k
                        curModifier.push_back(1);
2795
74.7k
                    }
2796
411
                } else {
2797
39.2k
                    for (auto& c : curModifier) {
2798
39.2k
                        c++;
2799
39.2k
                    }
2800
411
                }
2801
557
            }
2802
1.61k
        }
2803
2804
5.73k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.73k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.73k
        const auto& result = results.back();
2811
2812
5.73k
        if ( result.second != std::nullopt ) {
2813
1.98k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.98k
        }
2820
2821
5.73k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
5.73k
        if ( options.disableTests == false ) {
2830
5.73k
            tests::test(op, result.second);
2831
5.73k
        }
2832
2833
5.73k
        postprocess(module, op, result);
2834
5.73k
    }
2835
2836
4.36k
    if ( options.noCompare == false ) {
2837
4.11k
        compare(operations, results, data, size);
2838
4.11k
    }
2839
4.36k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6.39k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.39k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.39k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9.22k
    do {
2725
9.22k
        auto op = getOp(&parentDs, data, size);
2726
9.22k
        auto module = getModule(parentDs);
2727
9.22k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
9.22k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9.22k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
110
            break;
2736
110
        }
2737
9.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.39k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.39k
#if 1
2745
6.39k
    {
2746
6.39k
        std::set<uint64_t> moduleIDs;
2747
6.39k
        for (const auto& m : modules ) {
2748
6.20k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6.20k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6.20k
            moduleIDs.insert(moduleID);
2756
6.20k
        }
2757
2758
6.39k
        std::set<uint64_t> operationModuleIDs;
2759
8.88k
        for (const auto& op : operations) {
2760
8.88k
            operationModuleIDs.insert(op.first->ID);
2761
8.88k
        }
2762
2763
6.39k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.39k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.39k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.39k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6.39k
    }
2771
6.39k
#endif
2772
2773
6.39k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.39k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
15.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
8.88k
        auto& operation = operations[i];
2782
2783
8.88k
        auto& module = operation.first;
2784
8.88k
        auto& op = operation.second;
2785
2786
8.88k
        if ( i > 0 ) {
2787
2.67k
            auto& prevModule = operations[i-1].first;
2788
2.67k
            auto& prevOp = operations[i-1].second;
2789
2790
2.67k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
443
                auto& curModifier = op.modifier.GetVectorPtr();
2792
443
                if ( curModifier.size() == 0 ) {
2793
128k
                    for (size_t j = 0; j < 512; j++) {
2794
128k
                        curModifier.push_back(1);
2795
128k
                    }
2796
250
                } else {
2797
8.78k
                    for (auto& c : curModifier) {
2798
8.78k
                        c++;
2799
8.78k
                    }
2800
193
                }
2801
443
            }
2802
2.67k
        }
2803
2804
8.88k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8.88k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8.88k
        const auto& result = results.back();
2811
2812
8.88k
        if ( result.second != std::nullopt ) {
2813
2.46k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
2.46k
        }
2820
2821
8.88k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
8.88k
        if ( options.disableTests == false ) {
2830
8.88k
            tests::test(op, result.second);
2831
8.88k
        }
2832
2833
8.88k
        postprocess(module, op, result);
2834
8.88k
    }
2835
2836
6.39k
    if ( options.noCompare == false ) {
2837
6.20k
        compare(operations, results, data, size);
2838
6.20k
    }
2839
6.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
511
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
511
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
511
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.22k
    do {
2725
1.22k
        auto op = getOp(&parentDs, data, size);
2726
1.22k
        auto module = getModule(parentDs);
2727
1.22k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.22k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.22k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
37
            break;
2736
37
        }
2737
1.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
511
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
511
#if 1
2745
511
    {
2746
511
        std::set<uint64_t> moduleIDs;
2747
511
        for (const auto& m : modules ) {
2748
386
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
386
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
386
            moduleIDs.insert(moduleID);
2756
386
        }
2757
2758
511
        std::set<uint64_t> operationModuleIDs;
2759
946
        for (const auto& op : operations) {
2760
946
            operationModuleIDs.insert(op.first->ID);
2761
946
        }
2762
2763
511
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
511
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
511
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
511
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
511
    }
2771
511
#endif
2772
2773
511
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
511
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.45k
    for (size_t i = 0; i < operations.size(); i++) {
2781
946
        auto& operation = operations[i];
2782
2783
946
        auto& module = operation.first;
2784
946
        auto& op = operation.second;
2785
2786
946
        if ( i > 0 ) {
2787
560
            auto& prevModule = operations[i-1].first;
2788
560
            auto& prevOp = operations[i-1].second;
2789
2790
560
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
196
                auto& curModifier = op.modifier.GetVectorPtr();
2792
196
                if ( curModifier.size() == 0 ) {
2793
29.7k
                    for (size_t j = 0; j < 512; j++) {
2794
29.6k
                        curModifier.push_back(1);
2795
29.6k
                    }
2796
138
                } else {
2797
2.79k
                    for (auto& c : curModifier) {
2798
2.79k
                        c++;
2799
2.79k
                    }
2800
138
                }
2801
196
            }
2802
560
        }
2803
2804
946
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
946
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
946
        const auto& result = results.back();
2811
2812
946
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
946
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
946
        if ( options.disableTests == false ) {
2830
946
            tests::test(op, result.second);
2831
946
        }
2832
2833
946
        postprocess(module, op, result);
2834
946
    }
2835
2836
511
    if ( options.noCompare == false ) {
2837
386
        compare(operations, results, data, size);
2838
386
    }
2839
511
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
5.99k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
5.99k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
5.99k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
11.4k
    do {
2725
11.4k
        auto op = getOp(&parentDs, data, size);
2726
11.4k
        auto module = getModule(parentDs);
2727
11.4k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
11.4k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
11.4k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
379
            break;
2736
379
        }
2737
11.4k
    } while ( parentDs.Get<bool>() == true );
2738
2739
5.99k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
5.99k
#if 1
2745
5.99k
    {
2746
5.99k
        std::set<uint64_t> moduleIDs;
2747
5.99k
        for (const auto& m : modules ) {
2748
5.84k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5.84k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5.84k
            moduleIDs.insert(moduleID);
2756
5.84k
        }
2757
2758
5.99k
        std::set<uint64_t> operationModuleIDs;
2759
11.1k
        for (const auto& op : operations) {
2760
11.1k
            operationModuleIDs.insert(op.first->ID);
2761
11.1k
        }
2762
2763
5.99k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
5.99k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
5.99k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
5.99k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
5.99k
    }
2771
5.99k
#endif
2772
2773
5.99k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
5.99k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
17.1k
    for (size_t i = 0; i < operations.size(); i++) {
2781
11.1k
        auto& operation = operations[i];
2782
2783
11.1k
        auto& module = operation.first;
2784
11.1k
        auto& op = operation.second;
2785
2786
11.1k
        if ( i > 0 ) {
2787
5.29k
            auto& prevModule = operations[i-1].first;
2788
5.29k
            auto& prevOp = operations[i-1].second;
2789
2790
5.29k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.34k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.34k
                if ( curModifier.size() == 0 ) {
2793
203k
                    for (size_t j = 0; j < 512; j++) {
2794
202k
                        curModifier.push_back(1);
2795
202k
                    }
2796
953
                } else {
2797
18.7k
                    for (auto& c : curModifier) {
2798
18.7k
                        c++;
2799
18.7k
                    }
2800
953
                }
2801
1.34k
            }
2802
5.29k
        }
2803
2804
11.1k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
11.1k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
11.1k
        const auto& result = results.back();
2811
2812
11.1k
        if ( result.second != std::nullopt ) {
2813
6.87k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
6.87k
        }
2820
2821
11.1k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
11.1k
        if ( options.disableTests == false ) {
2830
11.1k
            tests::test(op, result.second);
2831
11.1k
        }
2832
2833
11.1k
        postprocess(module, op, result);
2834
11.1k
    }
2835
2836
5.99k
    if ( options.noCompare == false ) {
2837
5.84k
        compare(operations, results, data, size);
2838
5.84k
    }
2839
5.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
41
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
41
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
41
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
101
    do {
2725
101
        auto op = getOp(&parentDs, data, size);
2726
101
        auto module = getModule(parentDs);
2727
101
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
101
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
101
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
101
    } while ( parentDs.Get<bool>() == true );
2738
2739
41
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
41
#if 1
2745
41
    {
2746
41
        std::set<uint64_t> moduleIDs;
2747
41
        for (const auto& m : modules ) {
2748
24
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
24
            moduleIDs.insert(moduleID);
2756
24
        }
2757
2758
41
        std::set<uint64_t> operationModuleIDs;
2759
62
        for (const auto& op : operations) {
2760
62
            operationModuleIDs.insert(op.first->ID);
2761
62
        }
2762
2763
41
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
41
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
41
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
41
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
41
    }
2771
41
#endif
2772
2773
41
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
41
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
103
    for (size_t i = 0; i < operations.size(); i++) {
2781
62
        auto& operation = operations[i];
2782
2783
62
        auto& module = operation.first;
2784
62
        auto& op = operation.second;
2785
2786
62
        if ( i > 0 ) {
2787
38
            auto& prevModule = operations[i-1].first;
2788
38
            auto& prevOp = operations[i-1].second;
2789
2790
38
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
19
                auto& curModifier = op.modifier.GetVectorPtr();
2792
19
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
12
                } else {
2797
753
                    for (auto& c : curModifier) {
2798
753
                        c++;
2799
753
                    }
2800
12
                }
2801
19
            }
2802
38
        }
2803
2804
62
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
62
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
62
        const auto& result = results.back();
2811
2812
62
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
62
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
62
        if ( options.disableTests == false ) {
2830
62
            tests::test(op, result.second);
2831
62
        }
2832
2833
62
        postprocess(module, op, result);
2834
62
    }
2835
2836
41
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
41
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
97
    do {
2725
97
        auto op = getOp(&parentDs, data, size);
2726
97
        auto module = getModule(parentDs);
2727
97
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
97
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
97
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
97
    } while ( parentDs.Get<bool>() == true );
2738
2739
39
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
39
#if 1
2745
39
    {
2746
39
        std::set<uint64_t> moduleIDs;
2747
39
        for (const auto& m : modules ) {
2748
23
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
23
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
23
            moduleIDs.insert(moduleID);
2756
23
        }
2757
2758
39
        std::set<uint64_t> operationModuleIDs;
2759
62
        for (const auto& op : operations) {
2760
62
            operationModuleIDs.insert(op.first->ID);
2761
62
        }
2762
2763
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
39
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
39
    }
2771
39
#endif
2772
2773
39
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
39
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
101
    for (size_t i = 0; i < operations.size(); i++) {
2781
62
        auto& operation = operations[i];
2782
2783
62
        auto& module = operation.first;
2784
62
        auto& op = operation.second;
2785
2786
62
        if ( i > 0 ) {
2787
39
            auto& prevModule = operations[i-1].first;
2788
39
            auto& prevOp = operations[i-1].second;
2789
2790
39
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
21
                auto& curModifier = op.modifier.GetVectorPtr();
2792
21
                if ( curModifier.size() == 0 ) {
2793
4.10k
                    for (size_t j = 0; j < 512; j++) {
2794
4.09k
                        curModifier.push_back(1);
2795
4.09k
                    }
2796
13
                } else {
2797
246
                    for (auto& c : curModifier) {
2798
246
                        c++;
2799
246
                    }
2800
13
                }
2801
21
            }
2802
39
        }
2803
2804
62
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
62
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
62
        const auto& result = results.back();
2811
2812
62
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
62
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
62
        if ( options.disableTests == false ) {
2830
62
            tests::test(op, result.second);
2831
62
        }
2832
2833
62
        postprocess(module, op, result);
2834
62
    }
2835
2836
39
    if ( options.noCompare == false ) {
2837
23
        compare(operations, results, data, size);
2838
23
    }
2839
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
78
    do {
2725
78
        auto op = getOp(&parentDs, data, size);
2726
78
        auto module = getModule(parentDs);
2727
78
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
78
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
78
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
78
    } while ( parentDs.Get<bool>() == true );
2738
2739
34
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
34
#if 1
2745
34
    {
2746
34
        std::set<uint64_t> moduleIDs;
2747
34
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
34
        std::set<uint64_t> operationModuleIDs;
2759
51
        for (const auto& op : operations) {
2760
51
            operationModuleIDs.insert(op.first->ID);
2761
51
        }
2762
2763
34
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
34
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
34
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
34
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
34
    }
2771
34
#endif
2772
2773
34
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
34
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
85
    for (size_t i = 0; i < operations.size(); i++) {
2781
51
        auto& operation = operations[i];
2782
2783
51
        auto& module = operation.first;
2784
51
        auto& op = operation.second;
2785
2786
51
        if ( i > 0 ) {
2787
30
            auto& prevModule = operations[i-1].first;
2788
30
            auto& prevOp = operations[i-1].second;
2789
2790
30
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
12
                } else {
2797
243
                    for (auto& c : curModifier) {
2798
243
                        c++;
2799
243
                    }
2800
12
                }
2801
16
            }
2802
30
        }
2803
2804
51
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
51
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
51
        const auto& result = results.back();
2811
2812
51
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
51
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
51
        if ( options.disableTests == false ) {
2830
51
            tests::test(op, result.second);
2831
51
        }
2832
2833
51
        postprocess(module, op, result);
2834
51
    }
2835
2836
34
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
34
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
312
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
312
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
312
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
793
    do {
2725
793
        auto op = getOp(&parentDs, data, size);
2726
793
        auto module = getModule(parentDs);
2727
793
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
793
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
793
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
27
            break;
2736
27
        }
2737
793
    } while ( parentDs.Get<bool>() == true );
2738
2739
312
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
312
#if 1
2745
312
    {
2746
312
        std::set<uint64_t> moduleIDs;
2747
312
        for (const auto& m : modules ) {
2748
180
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
180
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
180
            moduleIDs.insert(moduleID);
2756
180
        }
2757
2758
312
        std::set<uint64_t> operationModuleIDs;
2759
521
        for (const auto& op : operations) {
2760
521
            operationModuleIDs.insert(op.first->ID);
2761
521
        }
2762
2763
312
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
312
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
312
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
312
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
312
    }
2771
312
#endif
2772
2773
312
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
312
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
833
    for (size_t i = 0; i < operations.size(); i++) {
2781
521
        auto& operation = operations[i];
2782
2783
521
        auto& module = operation.first;
2784
521
        auto& op = operation.second;
2785
2786
521
        if ( i > 0 ) {
2787
341
            auto& prevModule = operations[i-1].first;
2788
341
            auto& prevOp = operations[i-1].second;
2789
2790
341
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
158
                auto& curModifier = op.modifier.GetVectorPtr();
2792
158
                if ( curModifier.size() == 0 ) {
2793
37.4k
                    for (size_t j = 0; j < 512; j++) {
2794
37.3k
                        curModifier.push_back(1);
2795
37.3k
                    }
2796
85
                } else {
2797
2.13k
                    for (auto& c : curModifier) {
2798
2.13k
                        c++;
2799
2.13k
                    }
2800
85
                }
2801
158
            }
2802
341
        }
2803
2804
521
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
521
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
521
        const auto& result = results.back();
2811
2812
521
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
521
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
521
        if ( options.disableTests == false ) {
2830
521
            tests::test(op, result.second);
2831
521
        }
2832
2833
521
        postprocess(module, op, result);
2834
521
    }
2835
2836
312
    if ( options.noCompare == false ) {
2837
180
        compare(operations, results, data, size);
2838
180
    }
2839
312
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.55k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.55k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.55k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.95k
    do {
2725
6.95k
        auto op = getOp(&parentDs, data, size);
2726
6.95k
        auto module = getModule(parentDs);
2727
6.95k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
6.95k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6.95k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
169
            break;
2736
169
        }
2737
6.95k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.55k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.55k
#if 1
2745
3.55k
    {
2746
3.55k
        std::set<uint64_t> moduleIDs;
2747
3.55k
        for (const auto& m : modules ) {
2748
3.40k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.40k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.40k
            moduleIDs.insert(moduleID);
2756
3.40k
        }
2757
2758
3.55k
        std::set<uint64_t> operationModuleIDs;
2759
6.59k
        for (const auto& op : operations) {
2760
6.59k
            operationModuleIDs.insert(op.first->ID);
2761
6.59k
        }
2762
2763
3.55k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.55k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.55k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.55k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.55k
    }
2771
3.55k
#endif
2772
2773
3.55k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.55k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
10.1k
    for (size_t i = 0; i < operations.size(); i++) {
2781
6.59k
        auto& operation = operations[i];
2782
2783
6.59k
        auto& module = operation.first;
2784
6.59k
        auto& op = operation.second;
2785
2786
6.59k
        if ( i > 0 ) {
2787
3.19k
            auto& prevModule = operations[i-1].first;
2788
3.19k
            auto& prevOp = operations[i-1].second;
2789
2790
3.19k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
957
                auto& curModifier = op.modifier.GetVectorPtr();
2792
957
                if ( curModifier.size() == 0 ) {
2793
175k
                    for (size_t j = 0; j < 512; j++) {
2794
175k
                        curModifier.push_back(1);
2795
175k
                    }
2796
614
                } else {
2797
60.7k
                    for (auto& c : curModifier) {
2798
60.7k
                        c++;
2799
60.7k
                    }
2800
614
                }
2801
957
            }
2802
3.19k
        }
2803
2804
6.59k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6.59k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6.59k
        const auto& result = results.back();
2811
2812
6.59k
        if ( result.second != std::nullopt ) {
2813
3.22k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
3.22k
        }
2820
2821
6.59k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
6.59k
        if ( options.disableTests == false ) {
2830
6.59k
            tests::test(op, result.second);
2831
6.59k
        }
2832
2833
6.59k
        postprocess(module, op, result);
2834
6.59k
    }
2835
2836
3.55k
    if ( options.noCompare == false ) {
2837
3.40k
        compare(operations, results, data, size);
2838
3.40k
    }
2839
3.55k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
72
    do {
2725
72
        auto op = getOp(&parentDs, data, size);
2726
72
        auto module = getModule(parentDs);
2727
72
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
72
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
72
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
72
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
29
        std::set<uint64_t> operationModuleIDs;
2759
50
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
2762
2763
29
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
29
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
29
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
29
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
29
    }
2771
29
#endif
2772
2773
29
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
29
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
79
    for (size_t i = 0; i < operations.size(); i++) {
2781
50
        auto& operation = operations[i];
2782
2783
50
        auto& module = operation.first;
2784
50
        auto& op = operation.second;
2785
2786
50
        if ( i > 0 ) {
2787
32
            auto& prevModule = operations[i-1].first;
2788
32
            auto& prevOp = operations[i-1].second;
2789
2790
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
10
                } else {
2797
260
                    for (auto& c : curModifier) {
2798
260
                        c++;
2799
260
                    }
2800
10
                }
2801
15
            }
2802
32
        }
2803
2804
50
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
50
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
50
        const auto& result = results.back();
2811
2812
50
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
50
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
50
        if ( options.disableTests == false ) {
2830
50
            tests::test(op, result.second);
2831
50
        }
2832
2833
50
        postprocess(module, op, result);
2834
50
    }
2835
2836
29
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
30
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
30
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
30
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
75
    do {
2725
75
        auto op = getOp(&parentDs, data, size);
2726
75
        auto module = getModule(parentDs);
2727
75
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
75
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
75
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
75
    } while ( parentDs.Get<bool>() == true );
2738
2739
30
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
30
#if 1
2745
30
    {
2746
30
        std::set<uint64_t> moduleIDs;
2747
30
        for (const auto& m : modules ) {
2748
19
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
19
            moduleIDs.insert(moduleID);
2756
19
        }
2757
2758
30
        std::set<uint64_t> operationModuleIDs;
2759
53
        for (const auto& op : operations) {
2760
53
            operationModuleIDs.insert(op.first->ID);
2761
53
        }
2762
2763
30
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
30
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
30
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
30
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
30
    }
2771
30
#endif
2772
2773
30
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
30
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
83
    for (size_t i = 0; i < operations.size(); i++) {
2781
53
        auto& operation = operations[i];
2782
2783
53
        auto& module = operation.first;
2784
53
        auto& op = operation.second;
2785
2786
53
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i-1].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
11
                } else {
2797
260
                    for (auto& c : curModifier) {
2798
260
                        c++;
2799
260
                    }
2800
11
                }
2801
18
            }
2802
34
        }
2803
2804
53
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
53
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
53
        const auto& result = results.back();
2811
2812
53
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
53
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
53
        if ( options.disableTests == false ) {
2830
53
            tests::test(op, result.second);
2831
53
        }
2832
2833
53
        postprocess(module, op, result);
2834
53
    }
2835
2836
30
    if ( options.noCompare == false ) {
2837
19
        compare(operations, results, data, size);
2838
19
    }
2839
30
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
32
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
32
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
32
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
75
    do {
2725
75
        auto op = getOp(&parentDs, data, size);
2726
75
        auto module = getModule(parentDs);
2727
75
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
75
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
75
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
75
    } while ( parentDs.Get<bool>() == true );
2738
2739
32
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
32
#if 1
2745
32
    {
2746
32
        std::set<uint64_t> moduleIDs;
2747
32
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
32
        std::set<uint64_t> operationModuleIDs;
2759
46
        for (const auto& op : operations) {
2760
46
            operationModuleIDs.insert(op.first->ID);
2761
46
        }
2762
2763
32
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
32
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
32
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
32
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
32
    }
2771
32
#endif
2772
2773
32
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
32
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
78
    for (size_t i = 0; i < operations.size(); i++) {
2781
46
        auto& operation = operations[i];
2782
2783
46
        auto& module = operation.first;
2784
46
        auto& op = operation.second;
2785
2786
46
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i-1].second;
2789
2790
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
9
                } else {
2797
261
                    for (auto& c : curModifier) {
2798
261
                        c++;
2799
261
                    }
2800
9
                }
2801
16
            }
2802
28
        }
2803
2804
46
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
46
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
46
        const auto& result = results.back();
2811
2812
46
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
46
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
46
        if ( options.disableTests == false ) {
2830
46
            tests::test(op, result.second);
2831
46
        }
2832
2833
46
        postprocess(module, op, result);
2834
46
    }
2835
2836
32
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
32
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
32
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
32
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
32
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
78
    do {
2725
78
        auto op = getOp(&parentDs, data, size);
2726
78
        auto module = getModule(parentDs);
2727
78
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
78
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
78
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
78
    } while ( parentDs.Get<bool>() == true );
2738
2739
32
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
32
#if 1
2745
32
    {
2746
32
        std::set<uint64_t> moduleIDs;
2747
32
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
32
        std::set<uint64_t> operationModuleIDs;
2759
55
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
2762
2763
32
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
32
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
32
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
32
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
32
    }
2771
32
#endif
2772
2773
32
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
32
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
87
    for (size_t i = 0; i < operations.size(); i++) {
2781
55
        auto& operation = operations[i];
2782
2783
55
        auto& module = operation.first;
2784
55
        auto& op = operation.second;
2785
2786
55
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i-1].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
15
                } else {
2797
254
                    for (auto& c : curModifier) {
2798
254
                        c++;
2799
254
                    }
2800
15
                }
2801
18
            }
2802
34
        }
2803
2804
55
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
55
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
55
        const auto& result = results.back();
2811
2812
55
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
55
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
55
        if ( options.disableTests == false ) {
2830
55
            tests::test(op, result.second);
2831
55
        }
2832
2833
55
        postprocess(module, op, result);
2834
55
    }
2835
2836
32
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
61
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
61
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
61
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
139
    do {
2725
139
        auto op = getOp(&parentDs, data, size);
2726
139
        auto module = getModule(parentDs);
2727
139
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
139
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
139
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
139
    } while ( parentDs.Get<bool>() == true );
2738
2739
61
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
61
#if 1
2745
61
    {
2746
61
        std::set<uint64_t> moduleIDs;
2747
61
        for (const auto& m : modules ) {
2748
42
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
42
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
42
            moduleIDs.insert(moduleID);
2756
42
        }
2757
2758
61
        std::set<uint64_t> operationModuleIDs;
2759
98
        for (const auto& op : operations) {
2760
98
            operationModuleIDs.insert(op.first->ID);
2761
98
        }
2762
2763
61
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
61
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
61
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
61
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
61
    }
2771
61
#endif
2772
2773
61
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
61
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
159
    for (size_t i = 0; i < operations.size(); i++) {
2781
98
        auto& operation = operations[i];
2782
2783
98
        auto& module = operation.first;
2784
98
        auto& op = operation.second;
2785
2786
98
        if ( i > 0 ) {
2787
56
            auto& prevModule = operations[i-1].first;
2788
56
            auto& prevOp = operations[i-1].second;
2789
2790
56
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
19
                } else {
2797
990
                    for (auto& c : curModifier) {
2798
990
                        c++;
2799
990
                    }
2800
11
                }
2801
30
            }
2802
56
        }
2803
2804
98
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
98
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
98
        const auto& result = results.back();
2811
2812
98
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
98
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
98
        if ( options.disableTests == false ) {
2830
98
            tests::test(op, result.second);
2831
98
        }
2832
2833
98
        postprocess(module, op, result);
2834
98
    }
2835
2836
61
    if ( options.noCompare == false ) {
2837
42
        compare(operations, results, data, size);
2838
42
    }
2839
61
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
59
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
59
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
59
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
122
    do {
2725
122
        auto op = getOp(&parentDs, data, size);
2726
122
        auto module = getModule(parentDs);
2727
122
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
122
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
122
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
122
    } while ( parentDs.Get<bool>() == true );
2738
2739
59
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
59
#if 1
2745
59
    {
2746
59
        std::set<uint64_t> moduleIDs;
2747
59
        for (const auto& m : modules ) {
2748
43
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
43
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
43
            moduleIDs.insert(moduleID);
2756
43
        }
2757
2758
59
        std::set<uint64_t> operationModuleIDs;
2759
92
        for (const auto& op : operations) {
2760
92
            operationModuleIDs.insert(op.first->ID);
2761
92
        }
2762
2763
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
59
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
59
    }
2771
59
#endif
2772
2773
59
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
59
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
151
    for (size_t i = 0; i < operations.size(); i++) {
2781
92
        auto& operation = operations[i];
2782
2783
92
        auto& module = operation.first;
2784
92
        auto& op = operation.second;
2785
2786
92
        if ( i > 0 ) {
2787
49
            auto& prevModule = operations[i-1].first;
2788
49
            auto& prevOp = operations[i-1].second;
2789
2790
49
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
22
                auto& curModifier = op.modifier.GetVectorPtr();
2792
22
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
11
                } else {
2797
257
                    for (auto& c : curModifier) {
2798
257
                        c++;
2799
257
                    }
2800
11
                }
2801
22
            }
2802
49
        }
2803
2804
92
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
92
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
92
        const auto& result = results.back();
2811
2812
92
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
92
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
92
        if ( options.disableTests == false ) {
2830
92
            tests::test(op, result.second);
2831
92
        }
2832
2833
92
        postprocess(module, op, result);
2834
92
    }
2835
2836
59
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
59
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
43
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
43
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
43
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
102
    do {
2725
102
        auto op = getOp(&parentDs, data, size);
2726
102
        auto module = getModule(parentDs);
2727
102
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
102
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
102
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
102
    } while ( parentDs.Get<bool>() == true );
2738
2739
43
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
43
#if 1
2745
43
    {
2746
43
        std::set<uint64_t> moduleIDs;
2747
43
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
43
        std::set<uint64_t> operationModuleIDs;
2759
57
        for (const auto& op : operations) {
2760
57
            operationModuleIDs.insert(op.first->ID);
2761
57
        }
2762
2763
43
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
43
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
43
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
43
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
43
    }
2771
43
#endif
2772
2773
43
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
43
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
100
    for (size_t i = 0; i < operations.size(); i++) {
2781
57
        auto& operation = operations[i];
2782
2783
57
        auto& module = operation.first;
2784
57
        auto& op = operation.second;
2785
2786
57
        if ( i > 0 ) {
2787
36
            auto& prevModule = operations[i-1].first;
2788
36
            auto& prevOp = operations[i-1].second;
2789
2790
36
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
17
                auto& curModifier = op.modifier.GetVectorPtr();
2792
17
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
11
                } else {
2797
248
                    for (auto& c : curModifier) {
2798
248
                        c++;
2799
248
                    }
2800
11
                }
2801
17
            }
2802
36
        }
2803
2804
57
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
57
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
57
        const auto& result = results.back();
2811
2812
57
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
57
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
57
        if ( options.disableTests == false ) {
2830
57
            tests::test(op, result.second);
2831
57
        }
2832
2833
57
        postprocess(module, op, result);
2834
57
    }
2835
2836
43
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
43
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
87
    do {
2725
87
        auto op = getOp(&parentDs, data, size);
2726
87
        auto module = getModule(parentDs);
2727
87
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
87
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
87
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
87
    } while ( parentDs.Get<bool>() == true );
2738
2739
39
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
39
#if 1
2745
39
    {
2746
39
        std::set<uint64_t> moduleIDs;
2747
39
        for (const auto& m : modules ) {
2748
13
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
13
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
13
            moduleIDs.insert(moduleID);
2756
13
        }
2757
2758
39
        std::set<uint64_t> operationModuleIDs;
2759
39
        for (const auto& op : operations) {
2760
38
            operationModuleIDs.insert(op.first->ID);
2761
38
        }
2762
2763
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
39
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
39
    }
2771
39
#endif
2772
2773
39
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
39
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
77
    for (size_t i = 0; i < operations.size(); i++) {
2781
38
        auto& operation = operations[i];
2782
2783
38
        auto& module = operation.first;
2784
38
        auto& op = operation.second;
2785
2786
38
        if ( i > 0 ) {
2787
25
            auto& prevModule = operations[i-1].first;
2788
25
            auto& prevOp = operations[i-1].second;
2789
2790
25
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
12
                auto& curModifier = op.modifier.GetVectorPtr();
2792
12
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
6
                } else {
2797
2.09k
                    for (auto& c : curModifier) {
2798
2.09k
                        c++;
2799
2.09k
                    }
2800
6
                }
2801
12
            }
2802
25
        }
2803
2804
38
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
38
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
38
        const auto& result = results.back();
2811
2812
38
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
38
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
38
        if ( options.disableTests == false ) {
2830
38
            tests::test(op, result.second);
2831
38
        }
2832
2833
38
        postprocess(module, op, result);
2834
38
    }
2835
2836
39
    if ( options.noCompare == false ) {
2837
13
        compare(operations, results, data, size);
2838
13
    }
2839
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
64
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
64
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
64
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
140
    do {
2725
140
        auto op = getOp(&parentDs, data, size);
2726
140
        auto module = getModule(parentDs);
2727
140
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
140
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
140
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
140
    } while ( parentDs.Get<bool>() == true );
2738
2739
64
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
64
#if 1
2745
64
    {
2746
64
        std::set<uint64_t> moduleIDs;
2747
64
        for (const auto& m : modules ) {
2748
45
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
45
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
45
            moduleIDs.insert(moduleID);
2756
45
        }
2757
2758
64
        std::set<uint64_t> operationModuleIDs;
2759
98
        for (const auto& op : operations) {
2760
98
            operationModuleIDs.insert(op.first->ID);
2761
98
        }
2762
2763
64
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
64
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
64
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
64
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
64
    }
2771
64
#endif
2772
2773
64
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
64
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
162
    for (size_t i = 0; i < operations.size(); i++) {
2781
98
        auto& operation = operations[i];
2782
2783
98
        auto& module = operation.first;
2784
98
        auto& op = operation.second;
2785
2786
98
        if ( i > 0 ) {
2787
53
            auto& prevModule = operations[i-1].first;
2788
53
            auto& prevOp = operations[i-1].second;
2789
2790
53
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
22
                auto& curModifier = op.modifier.GetVectorPtr();
2792
22
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
16
                } else {
2797
494
                    for (auto& c : curModifier) {
2798
494
                        c++;
2799
494
                    }
2800
16
                }
2801
22
            }
2802
53
        }
2803
2804
98
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
98
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
98
        const auto& result = results.back();
2811
2812
98
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
98
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
98
        if ( options.disableTests == false ) {
2830
98
            tests::test(op, result.second);
2831
98
        }
2832
2833
98
        postprocess(module, op, result);
2834
98
    }
2835
2836
64
    if ( options.noCompare == false ) {
2837
45
        compare(operations, results, data, size);
2838
45
    }
2839
64
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
691
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
691
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
691
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.56k
    do {
2725
1.56k
        auto op = getOp(&parentDs, data, size);
2726
1.56k
        auto module = getModule(parentDs);
2727
1.56k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.56k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.56k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
43
            break;
2736
43
        }
2737
1.56k
    } while ( parentDs.Get<bool>() == true );
2738
2739
691
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
691
#if 1
2745
691
    {
2746
691
        std::set<uint64_t> moduleIDs;
2747
691
        for (const auto& m : modules ) {
2748
574
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
574
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
574
            moduleIDs.insert(moduleID);
2756
574
        }
2757
2758
691
        std::set<uint64_t> operationModuleIDs;
2759
1.29k
        for (const auto& op : operations) {
2760
1.29k
            operationModuleIDs.insert(op.first->ID);
2761
1.29k
        }
2762
2763
691
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
691
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
691
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
691
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
691
    }
2771
691
#endif
2772
2773
691
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
691
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.98k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.29k
        auto& operation = operations[i];
2782
2783
1.29k
        auto& module = operation.first;
2784
1.29k
        auto& op = operation.second;
2785
2786
1.29k
        if ( i > 0 ) {
2787
718
            auto& prevModule = operations[i-1].first;
2788
718
            auto& prevOp = operations[i-1].second;
2789
2790
718
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
278
                auto& curModifier = op.modifier.GetVectorPtr();
2792
278
                if ( curModifier.size() == 0 ) {
2793
28.2k
                    for (size_t j = 0; j < 512; j++) {
2794
28.1k
                        curModifier.push_back(1);
2795
28.1k
                    }
2796
223
                } else {
2797
2.60k
                    for (auto& c : curModifier) {
2798
2.60k
                        c++;
2799
2.60k
                    }
2800
223
                }
2801
278
            }
2802
718
        }
2803
2804
1.29k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.29k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.29k
        const auto& result = results.back();
2811
2812
1.29k
        if ( result.second != std::nullopt ) {
2813
219
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
219
        }
2820
2821
1.29k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.29k
        if ( options.disableTests == false ) {
2830
1.29k
            tests::test(op, result.second);
2831
1.29k
        }
2832
2833
1.29k
        postprocess(module, op, result);
2834
1.29k
    }
2835
2836
691
    if ( options.noCompare == false ) {
2837
574
        compare(operations, results, data, size);
2838
574
    }
2839
691
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
877
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
877
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
877
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.82k
    do {
2725
1.82k
        auto op = getOp(&parentDs, data, size);
2726
1.82k
        auto module = getModule(parentDs);
2727
1.82k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.82k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.82k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
59
            break;
2736
59
        }
2737
1.82k
    } while ( parentDs.Get<bool>() == true );
2738
2739
877
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
877
#if 1
2745
877
    {
2746
877
        std::set<uint64_t> moduleIDs;
2747
877
        for (const auto& m : modules ) {
2748
700
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
700
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
700
            moduleIDs.insert(moduleID);
2756
700
        }
2757
2758
877
        std::set<uint64_t> operationModuleIDs;
2759
1.43k
        for (const auto& op : operations) {
2760
1.43k
            operationModuleIDs.insert(op.first->ID);
2761
1.43k
        }
2762
2763
877
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
877
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
877
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
877
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
877
    }
2771
877
#endif
2772
2773
877
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
877
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.31k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.43k
        auto& operation = operations[i];
2782
2783
1.43k
        auto& module = operation.first;
2784
1.43k
        auto& op = operation.second;
2785
2786
1.43k
        if ( i > 0 ) {
2787
739
            auto& prevModule = operations[i-1].first;
2788
739
            auto& prevOp = operations[i-1].second;
2789
2790
739
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
218
                auto& curModifier = op.modifier.GetVectorPtr();
2792
218
                if ( curModifier.size() == 0 ) {
2793
41.5k
                    for (size_t j = 0; j < 512; j++) {
2794
41.4k
                        curModifier.push_back(1);
2795
41.4k
                    }
2796
137
                } else {
2797
9.43k
                    for (auto& c : curModifier) {
2798
9.43k
                        c++;
2799
9.43k
                    }
2800
137
                }
2801
218
            }
2802
739
        }
2803
2804
1.43k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.43k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.43k
        const auto& result = results.back();
2811
2812
1.43k
        if ( result.second != std::nullopt ) {
2813
186
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
186
        }
2820
2821
1.43k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.43k
        if ( options.disableTests == false ) {
2830
1.43k
            tests::test(op, result.second);
2831
1.43k
        }
2832
2833
1.43k
        postprocess(module, op, result);
2834
1.43k
    }
2835
2836
877
    if ( options.noCompare == false ) {
2837
700
        compare(operations, results, data, size);
2838
700
    }
2839
877
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
930
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
930
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
930
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.92k
    do {
2725
1.92k
        auto op = getOp(&parentDs, data, size);
2726
1.92k
        auto module = getModule(parentDs);
2727
1.92k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.92k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.92k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
49
            break;
2736
49
        }
2737
1.92k
    } while ( parentDs.Get<bool>() == true );
2738
2739
930
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
930
#if 1
2745
930
    {
2746
930
        std::set<uint64_t> moduleIDs;
2747
930
        for (const auto& m : modules ) {
2748
739
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
739
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
739
            moduleIDs.insert(moduleID);
2756
739
        }
2757
2758
930
        std::set<uint64_t> operationModuleIDs;
2759
1.50k
        for (const auto& op : operations) {
2760
1.50k
            operationModuleIDs.insert(op.first->ID);
2761
1.50k
        }
2762
2763
930
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
930
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
930
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
930
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
930
    }
2771
930
#endif
2772
2773
930
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
930
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.43k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.50k
        auto& operation = operations[i];
2782
2783
1.50k
        auto& module = operation.first;
2784
1.50k
        auto& op = operation.second;
2785
2786
1.50k
        if ( i > 0 ) {
2787
764
            auto& prevModule = operations[i-1].first;
2788
764
            auto& prevOp = operations[i-1].second;
2789
2790
764
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
240
                auto& curModifier = op.modifier.GetVectorPtr();
2792
240
                if ( curModifier.size() == 0 ) {
2793
46.1k
                    for (size_t j = 0; j < 512; j++) {
2794
46.0k
                        curModifier.push_back(1);
2795
46.0k
                    }
2796
150
                } else {
2797
6.48k
                    for (auto& c : curModifier) {
2798
6.48k
                        c++;
2799
6.48k
                    }
2800
150
                }
2801
240
            }
2802
764
        }
2803
2804
1.50k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.50k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.50k
        const auto& result = results.back();
2811
2812
1.50k
        if ( result.second != std::nullopt ) {
2813
21
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
21
        }
2820
2821
1.50k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.50k
        if ( options.disableTests == false ) {
2830
1.50k
            tests::test(op, result.second);
2831
1.50k
        }
2832
2833
1.50k
        postprocess(module, op, result);
2834
1.50k
    }
2835
2836
930
    if ( options.noCompare == false ) {
2837
739
        compare(operations, results, data, size);
2838
739
    }
2839
930
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.92k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.92k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.92k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.87k
    do {
2725
4.87k
        auto op = getOp(&parentDs, data, size);
2726
4.87k
        auto module = getModule(parentDs);
2727
4.87k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.87k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.87k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
88
            break;
2736
88
        }
2737
4.87k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.92k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.92k
#if 1
2745
2.92k
    {
2746
2.92k
        std::set<uint64_t> moduleIDs;
2747
2.92k
        for (const auto& m : modules ) {
2748
2.65k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.65k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.65k
            moduleIDs.insert(moduleID);
2756
2.65k
        }
2757
2758
2.92k
        std::set<uint64_t> operationModuleIDs;
2759
4.39k
        for (const auto& op : operations) {
2760
4.39k
            operationModuleIDs.insert(op.first->ID);
2761
4.39k
        }
2762
2763
2.92k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.92k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.92k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.92k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.92k
    }
2771
2.92k
#endif
2772
2773
2.92k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.92k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.31k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.39k
        auto& operation = operations[i];
2782
2783
4.39k
        auto& module = operation.first;
2784
4.39k
        auto& op = operation.second;
2785
2786
4.39k
        if ( i > 0 ) {
2787
1.73k
            auto& prevModule = operations[i-1].first;
2788
1.73k
            auto& prevOp = operations[i-1].second;
2789
2790
1.73k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
558
                auto& curModifier = op.modifier.GetVectorPtr();
2792
558
                if ( curModifier.size() == 0 ) {
2793
52.8k
                    for (size_t j = 0; j < 512; j++) {
2794
52.7k
                        curModifier.push_back(1);
2795
52.7k
                    }
2796
455
                } else {
2797
48.5k
                    for (auto& c : curModifier) {
2798
48.5k
                        c++;
2799
48.5k
                    }
2800
455
                }
2801
558
            }
2802
1.73k
        }
2803
2804
4.39k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.39k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.39k
        const auto& result = results.back();
2811
2812
4.39k
        if ( result.second != std::nullopt ) {
2813
254
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
254
        }
2820
2821
4.39k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.39k
        if ( options.disableTests == false ) {
2830
4.39k
            tests::test(op, result.second);
2831
4.39k
        }
2832
2833
4.39k
        postprocess(module, op, result);
2834
4.39k
    }
2835
2836
2.92k
    if ( options.noCompare == false ) {
2837
2.65k
        compare(operations, results, data, size);
2838
2.65k
    }
2839
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
38
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
38
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
38
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
93
    do {
2725
93
        auto op = getOp(&parentDs, data, size);
2726
93
        auto module = getModule(parentDs);
2727
93
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
93
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
93
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
93
    } while ( parentDs.Get<bool>() == true );
2738
2739
38
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
38
#if 1
2745
38
    {
2746
38
        std::set<uint64_t> moduleIDs;
2747
38
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
38
        std::set<uint64_t> operationModuleIDs;
2759
54
        for (const auto& op : operations) {
2760
54
            operationModuleIDs.insert(op.first->ID);
2761
54
        }
2762
2763
38
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
38
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
38
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
38
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
38
    }
2771
38
#endif
2772
2773
38
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
38
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
92
    for (size_t i = 0; i < operations.size(); i++) {
2781
54
        auto& operation = operations[i];
2782
2783
54
        auto& module = operation.first;
2784
54
        auto& op = operation.second;
2785
2786
54
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i-1].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
11
                } else {
2797
320
                    for (auto& c : curModifier) {
2798
320
                        c++;
2799
320
                    }
2800
11
                }
2801
18
            }
2802
34
        }
2803
2804
54
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
54
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
54
        const auto& result = results.back();
2811
2812
54
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
54
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
54
        if ( options.disableTests == false ) {
2830
54
            tests::test(op, result.second);
2831
54
        }
2832
2833
54
        postprocess(module, op, result);
2834
54
    }
2835
2836
38
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
38
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.39k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.39k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.39k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.96k
    do {
2725
4.96k
        auto op = getOp(&parentDs, data, size);
2726
4.96k
        auto module = getModule(parentDs);
2727
4.96k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.96k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.96k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
50
            break;
2736
50
        }
2737
4.96k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.39k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.39k
#if 1
2745
3.39k
    {
2746
3.39k
        std::set<uint64_t> moduleIDs;
2747
3.39k
        for (const auto& m : modules ) {
2748
3.20k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.20k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.20k
            moduleIDs.insert(moduleID);
2756
3.20k
        }
2757
2758
3.39k
        std::set<uint64_t> operationModuleIDs;
2759
4.60k
        for (const auto& op : operations) {
2760
4.60k
            operationModuleIDs.insert(op.first->ID);
2761
4.60k
        }
2762
2763
3.39k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.39k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.39k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.39k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.39k
    }
2771
3.39k
#endif
2772
2773
3.39k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.39k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.99k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.60k
        auto& operation = operations[i];
2782
2783
4.60k
        auto& module = operation.first;
2784
4.60k
        auto& op = operation.second;
2785
2786
4.60k
        if ( i > 0 ) {
2787
1.39k
            auto& prevModule = operations[i-1].first;
2788
1.39k
            auto& prevOp = operations[i-1].second;
2789
2790
1.39k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
433
                auto& curModifier = op.modifier.GetVectorPtr();
2792
433
                if ( curModifier.size() == 0 ) {
2793
66.1k
                    for (size_t j = 0; j < 512; j++) {
2794
66.0k
                        curModifier.push_back(1);
2795
66.0k
                    }
2796
304
                } else {
2797
13.0k
                    for (auto& c : curModifier) {
2798
13.0k
                        c++;
2799
13.0k
                    }
2800
304
                }
2801
433
            }
2802
1.39k
        }
2803
2804
4.60k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.60k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.60k
        const auto& result = results.back();
2811
2812
4.60k
        if ( result.second != std::nullopt ) {
2813
373
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
373
        }
2820
2821
4.60k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.60k
        if ( options.disableTests == false ) {
2830
4.60k
            tests::test(op, result.second);
2831
4.60k
        }
2832
2833
4.60k
        postprocess(module, op, result);
2834
4.60k
    }
2835
2836
3.39k
    if ( options.noCompare == false ) {
2837
3.20k
        compare(operations, results, data, size);
2838
3.20k
    }
2839
3.39k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
169
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
169
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
169
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
330
    do {
2725
330
        auto op = getOp(&parentDs, data, size);
2726
330
        auto module = getModule(parentDs);
2727
330
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
330
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
330
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
330
    } while ( parentDs.Get<bool>() == true );
2738
2739
169
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
169
#if 1
2745
169
    {
2746
169
        std::set<uint64_t> moduleIDs;
2747
169
        for (const auto& m : modules ) {
2748
156
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
156
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
156
            moduleIDs.insert(moduleID);
2756
156
        }
2757
2758
169
        std::set<uint64_t> operationModuleIDs;
2759
298
        for (const auto& op : operations) {
2760
298
            operationModuleIDs.insert(op.first->ID);
2761
298
        }
2762
2763
169
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
169
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
169
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
169
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
169
    }
2771
169
#endif
2772
2773
169
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
169
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
467
    for (size_t i = 0; i < operations.size(); i++) {
2781
298
        auto& operation = operations[i];
2782
2783
298
        auto& module = operation.first;
2784
298
        auto& op = operation.second;
2785
2786
298
        if ( i > 0 ) {
2787
142
            auto& prevModule = operations[i-1].first;
2788
142
            auto& prevOp = operations[i-1].second;
2789
2790
142
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
49
                auto& curModifier = op.modifier.GetVectorPtr();
2792
49
                if ( curModifier.size() == 0 ) {
2793
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
28
                } else {
2797
454
                    for (auto& c : curModifier) {
2798
454
                        c++;
2799
454
                    }
2800
21
                }
2801
49
            }
2802
142
        }
2803
2804
298
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
298
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
298
        const auto& result = results.back();
2811
2812
298
        if ( result.second != std::nullopt ) {
2813
68
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
68
        }
2820
2821
298
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
298
        if ( options.disableTests == false ) {
2830
298
            tests::test(op, result.second);
2831
298
        }
2832
2833
298
        postprocess(module, op, result);
2834
298
    }
2835
2836
169
    if ( options.noCompare == false ) {
2837
156
        compare(operations, results, data, size);
2838
156
    }
2839
169
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
5.58k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
5.58k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
5.58k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.41k
    do {
2725
7.41k
        auto op = getOp(&parentDs, data, size);
2726
7.41k
        auto module = getModule(parentDs);
2727
7.41k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7.41k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.41k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
69
            break;
2736
69
        }
2737
7.41k
    } while ( parentDs.Get<bool>() == true );
2738
2739
5.58k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
5.58k
#if 1
2745
5.58k
    {
2746
5.58k
        std::set<uint64_t> moduleIDs;
2747
5.58k
        for (const auto& m : modules ) {
2748
5.29k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5.29k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5.29k
            moduleIDs.insert(moduleID);
2756
5.29k
        }
2757
2758
5.58k
        std::set<uint64_t> operationModuleIDs;
2759
6.93k
        for (const auto& op : operations) {
2760
6.93k
            operationModuleIDs.insert(op.first->ID);
2761
6.93k
        }
2762
2763
5.58k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
5.58k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
5.58k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
5.58k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
5.58k
    }
2771
5.58k
#endif
2772
2773
5.58k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
5.58k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12.5k
    for (size_t i = 0; i < operations.size(); i++) {
2781
6.93k
        auto& operation = operations[i];
2782
2783
6.93k
        auto& module = operation.first;
2784
6.93k
        auto& op = operation.second;
2785
2786
6.93k
        if ( i > 0 ) {
2787
1.63k
            auto& prevModule = operations[i-1].first;
2788
1.63k
            auto& prevOp = operations[i-1].second;
2789
2790
1.63k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
474
                auto& curModifier = op.modifier.GetVectorPtr();
2792
474
                if ( curModifier.size() == 0 ) {
2793
42.0k
                    for (size_t j = 0; j < 512; j++) {
2794
41.9k
                        curModifier.push_back(1);
2795
41.9k
                    }
2796
392
                } else {
2797
17.7k
                    for (auto& c : curModifier) {
2798
17.7k
                        c++;
2799
17.7k
                    }
2800
392
                }
2801
474
            }
2802
1.63k
        }
2803
2804
6.93k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6.93k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6.93k
        const auto& result = results.back();
2811
2812
6.93k
        if ( result.second != std::nullopt ) {
2813
125
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
125
        }
2820
2821
6.93k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
6.93k
        if ( options.disableTests == false ) {
2830
6.93k
            tests::test(op, result.second);
2831
6.93k
        }
2832
2833
6.93k
        postprocess(module, op, result);
2834
6.93k
    }
2835
2836
5.58k
    if ( options.noCompare == false ) {
2837
5.29k
        compare(operations, results, data, size);
2838
5.29k
    }
2839
5.58k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
77
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
77
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
77
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
166
    do {
2725
166
        auto op = getOp(&parentDs, data, size);
2726
166
        auto module = getModule(parentDs);
2727
166
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
166
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
166
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
166
    } while ( parentDs.Get<bool>() == true );
2738
2739
77
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
77
#if 1
2745
77
    {
2746
77
        std::set<uint64_t> moduleIDs;
2747
77
        for (const auto& m : modules ) {
2748
59
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
59
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
59
            moduleIDs.insert(moduleID);
2756
59
        }
2757
2758
77
        std::set<uint64_t> operationModuleIDs;
2759
123
        for (const auto& op : operations) {
2760
123
            operationModuleIDs.insert(op.first->ID);
2761
123
        }
2762
2763
77
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
77
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
77
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
77
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
77
    }
2771
77
#endif
2772
2773
77
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
77
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
200
    for (size_t i = 0; i < operations.size(); i++) {
2781
123
        auto& operation = operations[i];
2782
2783
123
        auto& module = operation.first;
2784
123
        auto& op = operation.second;
2785
2786
123
        if ( i > 0 ) {
2787
64
            auto& prevModule = operations[i-1].first;
2788
64
            auto& prevOp = operations[i-1].second;
2789
2790
64
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
17
                } else {
2797
898
                    for (auto& c : curModifier) {
2798
898
                        c++;
2799
898
                    }
2800
14
                }
2801
31
            }
2802
64
        }
2803
2804
123
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
123
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
123
        const auto& result = results.back();
2811
2812
123
        if ( result.second != std::nullopt ) {
2813
37
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
37
        }
2820
2821
123
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
123
        if ( options.disableTests == false ) {
2830
123
            tests::test(op, result.second);
2831
123
        }
2832
2833
123
        postprocess(module, op, result);
2834
123
    }
2835
2836
77
    if ( options.noCompare == false ) {
2837
59
        compare(operations, results, data, size);
2838
59
    }
2839
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.21k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.21k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.21k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.80k
    do {
2725
4.80k
        auto op = getOp(&parentDs, data, size);
2726
4.80k
        auto module = getModule(parentDs);
2727
4.80k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.80k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.80k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
47
            break;
2736
47
        }
2737
4.80k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.21k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.21k
#if 1
2745
3.21k
    {
2746
3.21k
        std::set<uint64_t> moduleIDs;
2747
3.21k
        for (const auto& m : modules ) {
2748
2.94k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.94k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.94k
            moduleIDs.insert(moduleID);
2756
2.94k
        }
2757
2758
3.21k
        std::set<uint64_t> operationModuleIDs;
2759
4.34k
        for (const auto& op : operations) {
2760
4.34k
            operationModuleIDs.insert(op.first->ID);
2761
4.34k
        }
2762
2763
3.21k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.21k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.21k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.21k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.21k
    }
2771
3.21k
#endif
2772
2773
3.21k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.21k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.56k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.34k
        auto& operation = operations[i];
2782
2783
4.34k
        auto& module = operation.first;
2784
4.34k
        auto& op = operation.second;
2785
2786
4.34k
        if ( i > 0 ) {
2787
1.40k
            auto& prevModule = operations[i-1].first;
2788
1.40k
            auto& prevOp = operations[i-1].second;
2789
2790
1.40k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
550
                auto& curModifier = op.modifier.GetVectorPtr();
2792
550
                if ( curModifier.size() == 0 ) {
2793
94.9k
                    for (size_t j = 0; j < 512; j++) {
2794
94.7k
                        curModifier.push_back(1);
2795
94.7k
                    }
2796
365
                } else {
2797
32.4k
                    for (auto& c : curModifier) {
2798
32.4k
                        c++;
2799
32.4k
                    }
2800
365
                }
2801
550
            }
2802
1.40k
        }
2803
2804
4.34k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.34k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.34k
        const auto& result = results.back();
2811
2812
4.34k
        if ( result.second != std::nullopt ) {
2813
2.12k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
2.12k
        }
2820
2821
4.34k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.34k
        if ( options.disableTests == false ) {
2830
4.34k
            tests::test(op, result.second);
2831
4.34k
        }
2832
2833
4.34k
        postprocess(module, op, result);
2834
4.34k
    }
2835
2836
3.21k
    if ( options.noCompare == false ) {
2837
2.94k
        compare(operations, results, data, size);
2838
2.94k
    }
2839
3.21k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.52k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.52k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.52k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.08k
    do {
2725
3.08k
        auto op = getOp(&parentDs, data, size);
2726
3.08k
        auto module = getModule(parentDs);
2727
3.08k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.08k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.08k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
66
            break;
2736
66
        }
2737
3.08k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.52k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.52k
#if 1
2745
1.52k
    {
2746
1.52k
        std::set<uint64_t> moduleIDs;
2747
1.52k
        for (const auto& m : modules ) {
2748
1.29k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.29k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.29k
            moduleIDs.insert(moduleID);
2756
1.29k
        }
2757
2758
1.52k
        std::set<uint64_t> operationModuleIDs;
2759
2.66k
        for (const auto& op : operations) {
2760
2.66k
            operationModuleIDs.insert(op.first->ID);
2761
2.66k
        }
2762
2763
1.52k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.52k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.52k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.52k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.52k
    }
2771
1.52k
#endif
2772
2773
1.52k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.52k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.19k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.66k
        auto& operation = operations[i];
2782
2783
2.66k
        auto& module = operation.first;
2784
2.66k
        auto& op = operation.second;
2785
2786
2.66k
        if ( i > 0 ) {
2787
1.37k
            auto& prevModule = operations[i-1].first;
2788
1.37k
            auto& prevOp = operations[i-1].second;
2789
2790
1.37k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
518
                auto& curModifier = op.modifier.GetVectorPtr();
2792
518
                if ( curModifier.size() == 0 ) {
2793
135k
                    for (size_t j = 0; j < 512; j++) {
2794
135k
                        curModifier.push_back(1);
2795
135k
                    }
2796
264
                } else {
2797
27.6k
                    for (auto& c : curModifier) {
2798
27.6k
                        c++;
2799
27.6k
                    }
2800
254
                }
2801
518
            }
2802
1.37k
        }
2803
2804
2.66k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.66k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.66k
        const auto& result = results.back();
2811
2812
2.66k
        if ( result.second != std::nullopt ) {
2813
419
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
419
        }
2820
2821
2.66k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.66k
        if ( options.disableTests == false ) {
2830
2.66k
            tests::test(op, result.second);
2831
2.66k
        }
2832
2833
2.66k
        postprocess(module, op, result);
2834
2.66k
    }
2835
2836
1.52k
    if ( options.noCompare == false ) {
2837
1.29k
        compare(operations, results, data, size);
2838
1.29k
    }
2839
1.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
46.5k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
46.5k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
46.5k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
59.5k
    do {
2725
59.5k
        auto op = getOp(&parentDs, data, size);
2726
59.5k
        auto module = getModule(parentDs);
2727
59.5k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
59.5k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
59.5k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
487
            break;
2736
487
        }
2737
59.5k
    } while ( parentDs.Get<bool>() == true );
2738
2739
46.5k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
46.5k
#if 1
2745
46.5k
    {
2746
46.5k
        std::set<uint64_t> moduleIDs;
2747
46.5k
        for (const auto& m : modules ) {
2748
46.2k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
46.2k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
46.2k
            moduleIDs.insert(moduleID);
2756
46.2k
        }
2757
2758
46.5k
        std::set<uint64_t> operationModuleIDs;
2759
59.0k
        for (const auto& op : operations) {
2760
59.0k
            operationModuleIDs.insert(op.first->ID);
2761
59.0k
        }
2762
2763
46.5k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
46.5k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
46.5k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
46.5k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
46.5k
    }
2771
46.5k
#endif
2772
2773
46.5k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
46.5k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
105k
    for (size_t i = 0; i < operations.size(); i++) {
2781
59.0k
        auto& operation = operations[i];
2782
2783
59.0k
        auto& module = operation.first;
2784
59.0k
        auto& op = operation.second;
2785
2786
59.0k
        if ( i > 0 ) {
2787
12.7k
            auto& prevModule = operations[i-1].first;
2788
12.7k
            auto& prevOp = operations[i-1].second;
2789
2790
12.7k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4.35k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4.35k
                if ( curModifier.size() == 0 ) {
2793
1.34M
                    for (size_t j = 0; j < 512; j++) {
2794
1.34M
                        curModifier.push_back(1);
2795
1.34M
                    }
2796
2.62k
                } else {
2797
752k
                    for (auto& c : curModifier) {
2798
752k
                        c++;
2799
752k
                    }
2800
1.73k
                }
2801
4.35k
            }
2802
12.7k
        }
2803
2804
59.0k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
59.0k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
59.0k
        const auto& result = results.back();
2811
2812
59.0k
        if ( result.second != std::nullopt ) {
2813
21.7k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
21.7k
        }
2820
2821
59.0k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
59.0k
        if ( options.disableTests == false ) {
2830
59.0k
            tests::test(op, result.second);
2831
59.0k
        }
2832
2833
59.0k
        postprocess(module, op, result);
2834
59.0k
    }
2835
2836
46.5k
    if ( options.noCompare == false ) {
2837
46.2k
        compare(operations, results, data, size);
2838
46.2k
    }
2839
46.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
77
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
77
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
77
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
167
    do {
2725
167
        auto op = getOp(&parentDs, data, size);
2726
167
        auto module = getModule(parentDs);
2727
167
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
167
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
167
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
167
    } while ( parentDs.Get<bool>() == true );
2738
2739
77
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
77
#if 1
2745
77
    {
2746
77
        std::set<uint64_t> moduleIDs;
2747
77
        for (const auto& m : modules ) {
2748
60
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60
            moduleIDs.insert(moduleID);
2756
60
        }
2757
2758
77
        std::set<uint64_t> operationModuleIDs;
2759
130
        for (const auto& op : operations) {
2760
130
            operationModuleIDs.insert(op.first->ID);
2761
130
        }
2762
2763
77
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
77
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
77
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
77
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
77
    }
2771
77
#endif
2772
2773
77
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
77
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
207
    for (size_t i = 0; i < operations.size(); i++) {
2781
130
        auto& operation = operations[i];
2782
2783
130
        auto& module = operation.first;
2784
130
        auto& op = operation.second;
2785
2786
130
        if ( i > 0 ) {
2787
70
            auto& prevModule = operations[i-1].first;
2788
70
            auto& prevOp = operations[i-1].second;
2789
2790
70
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
32
                auto& curModifier = op.modifier.GetVectorPtr();
2792
32
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
18
                } else {
2797
257
                    for (auto& c : curModifier) {
2798
257
                        c++;
2799
257
                    }
2800
14
                }
2801
32
            }
2802
70
        }
2803
2804
130
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
130
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
130
        const auto& result = results.back();
2811
2812
130
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
130
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
130
        if ( options.disableTests == false ) {
2830
130
            tests::test(op, result.second);
2831
130
        }
2832
2833
130
        postprocess(module, op, result);
2834
130
    }
2835
2836
77
    if ( options.noCompare == false ) {
2837
60
        compare(operations, results, data, size);
2838
60
    }
2839
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
360
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
360
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
360
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
754
    do {
2725
754
        auto op = getOp(&parentDs, data, size);
2726
754
        auto module = getModule(parentDs);
2727
754
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
754
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
754
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
17
            break;
2736
17
        }
2737
754
    } while ( parentDs.Get<bool>() == true );
2738
2739
360
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
360
#if 1
2745
360
    {
2746
360
        std::set<uint64_t> moduleIDs;
2747
360
        for (const auto& m : modules ) {
2748
336
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
336
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
336
            moduleIDs.insert(moduleID);
2756
336
        }
2757
2758
360
        std::set<uint64_t> operationModuleIDs;
2759
710
        for (const auto& op : operations) {
2760
710
            operationModuleIDs.insert(op.first->ID);
2761
710
        }
2762
2763
360
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
360
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
360
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
360
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
360
    }
2771
360
#endif
2772
2773
360
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
360
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.07k
    for (size_t i = 0; i < operations.size(); i++) {
2781
710
        auto& operation = operations[i];
2782
2783
710
        auto& module = operation.first;
2784
710
        auto& op = operation.second;
2785
2786
710
        if ( i > 0 ) {
2787
374
            auto& prevModule = operations[i-1].first;
2788
374
            auto& prevOp = operations[i-1].second;
2789
2790
374
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
168
                auto& curModifier = op.modifier.GetVectorPtr();
2792
168
                if ( curModifier.size() == 0 ) {
2793
64.6k
                    for (size_t j = 0; j < 512; j++) {
2794
64.5k
                        curModifier.push_back(1);
2795
64.5k
                    }
2796
126
                } else {
2797
27.0k
                    for (auto& c : curModifier) {
2798
27.0k
                        c++;
2799
27.0k
                    }
2800
42
                }
2801
168
            }
2802
374
        }
2803
2804
710
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
710
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
710
        const auto& result = results.back();
2811
2812
710
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
710
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
710
        if ( options.disableTests == false ) {
2830
710
            tests::test(op, result.second);
2831
710
        }
2832
2833
710
        postprocess(module, op, result);
2834
710
    }
2835
2836
360
    if ( options.noCompare == false ) {
2837
336
        compare(operations, results, data, size);
2838
336
    }
2839
360
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
45
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
45
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
45
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
103
    do {
2725
103
        auto op = getOp(&parentDs, data, size);
2726
103
        auto module = getModule(parentDs);
2727
103
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
103
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
103
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
103
    } while ( parentDs.Get<bool>() == true );
2738
2739
45
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
45
#if 1
2745
45
    {
2746
45
        std::set<uint64_t> moduleIDs;
2747
45
        for (const auto& m : modules ) {
2748
29
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
29
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
29
            moduleIDs.insert(moduleID);
2756
29
        }
2757
2758
45
        std::set<uint64_t> operationModuleIDs;
2759
65
        for (const auto& op : operations) {
2760
65
            operationModuleIDs.insert(op.first->ID);
2761
65
        }
2762
2763
45
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
45
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
45
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
45
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
45
    }
2771
45
#endif
2772
2773
45
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
45
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
110
    for (size_t i = 0; i < operations.size(); i++) {
2781
65
        auto& operation = operations[i];
2782
2783
65
        auto& module = operation.first;
2784
65
        auto& op = operation.second;
2785
2786
65
        if ( i > 0 ) {
2787
36
            auto& prevModule = operations[i-1].first;
2788
36
            auto& prevOp = operations[i-1].second;
2789
2790
36
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
20
                auto& curModifier = op.modifier.GetVectorPtr();
2792
20
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
15
                } else {
2797
252
                    for (auto& c : curModifier) {
2798
252
                        c++;
2799
252
                    }
2800
15
                }
2801
20
            }
2802
36
        }
2803
2804
65
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
65
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
65
        const auto& result = results.back();
2811
2812
65
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
65
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
65
        if ( options.disableTests == false ) {
2830
65
            tests::test(op, result.second);
2831
65
        }
2832
2833
65
        postprocess(module, op, result);
2834
65
    }
2835
2836
45
    if ( options.noCompare == false ) {
2837
29
        compare(operations, results, data, size);
2838
29
    }
2839
45
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
52
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
52
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
52
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
110
    do {
2725
110
        auto op = getOp(&parentDs, data, size);
2726
110
        auto module = getModule(parentDs);
2727
110
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
110
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
110
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
110
    } while ( parentDs.Get<bool>() == true );
2738
2739
52
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
52
#if 1
2745
52
    {
2746
52
        std::set<uint64_t> moduleIDs;
2747
52
        for (const auto& m : modules ) {
2748
37
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
37
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
37
            moduleIDs.insert(moduleID);
2756
37
        }
2757
2758
52
        std::set<uint64_t> operationModuleIDs;
2759
76
        for (const auto& op : operations) {
2760
76
            operationModuleIDs.insert(op.first->ID);
2761
76
        }
2762
2763
52
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
52
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
52
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
52
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
52
    }
2771
52
#endif
2772
2773
52
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
52
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
128
    for (size_t i = 0; i < operations.size(); i++) {
2781
76
        auto& operation = operations[i];
2782
2783
76
        auto& module = operation.first;
2784
76
        auto& op = operation.second;
2785
2786
76
        if ( i > 0 ) {
2787
39
            auto& prevModule = operations[i-1].first;
2788
39
            auto& prevOp = operations[i-1].second;
2789
2790
39
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
19
                auto& curModifier = op.modifier.GetVectorPtr();
2792
19
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
14
                } else {
2797
232
                    for (auto& c : curModifier) {
2798
232
                        c++;
2799
232
                    }
2800
14
                }
2801
19
            }
2802
39
        }
2803
2804
76
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
76
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
76
        const auto& result = results.back();
2811
2812
76
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
76
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
76
        if ( options.disableTests == false ) {
2830
76
            tests::test(op, result.second);
2831
76
        }
2832
2833
76
        postprocess(module, op, result);
2834
76
    }
2835
2836
52
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
52
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
46
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
46
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
46
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
98
    do {
2725
98
        auto op = getOp(&parentDs, data, size);
2726
98
        auto module = getModule(parentDs);
2727
98
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
98
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
98
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
98
    } while ( parentDs.Get<bool>() == true );
2738
2739
46
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
46
#if 1
2745
46
    {
2746
46
        std::set<uint64_t> moduleIDs;
2747
46
        for (const auto& m : modules ) {
2748
29
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
29
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
29
            moduleIDs.insert(moduleID);
2756
29
        }
2757
2758
46
        std::set<uint64_t> operationModuleIDs;
2759
64
        for (const auto& op : operations) {
2760
64
            operationModuleIDs.insert(op.first->ID);
2761
64
        }
2762
2763
46
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
46
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
46
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
46
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
46
    }
2771
46
#endif
2772
2773
46
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
46
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
110
    for (size_t i = 0; i < operations.size(); i++) {
2781
64
        auto& operation = operations[i];
2782
2783
64
        auto& module = operation.first;
2784
64
        auto& op = operation.second;
2785
2786
64
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i-1].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
20
                auto& curModifier = op.modifier.GetVectorPtr();
2792
20
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
15
                } else {
2797
387
                    for (auto& c : curModifier) {
2798
387
                        c++;
2799
387
                    }
2800
15
                }
2801
20
            }
2802
35
        }
2803
2804
64
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
64
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
64
        const auto& result = results.back();
2811
2812
64
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
64
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
64
        if ( options.disableTests == false ) {
2830
64
            tests::test(op, result.second);
2831
64
        }
2832
2833
64
        postprocess(module, op, result);
2834
64
    }
2835
2836
46
    if ( options.noCompare == false ) {
2837
29
        compare(operations, results, data, size);
2838
29
    }
2839
46
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
33
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
33
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
33
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
74
    do {
2725
74
        auto op = getOp(&parentDs, data, size);
2726
74
        auto module = getModule(parentDs);
2727
74
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
74
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
74
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
74
    } while ( parentDs.Get<bool>() == true );
2738
2739
33
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
33
#if 1
2745
33
    {
2746
33
        std::set<uint64_t> moduleIDs;
2747
33
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
33
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
45
            operationModuleIDs.insert(op.first->ID);
2761
45
        }
2762
2763
33
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
33
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
33
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
33
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
33
    }
2771
33
#endif
2772
2773
33
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
33
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
78
    for (size_t i = 0; i < operations.size(); i++) {
2781
45
        auto& operation = operations[i];
2782
2783
45
        auto& module = operation.first;
2784
45
        auto& op = operation.second;
2785
2786
45
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i-1].second;
2789
2790
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
14
                auto& curModifier = op.modifier.GetVectorPtr();
2792
14
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
8
                } else {
2797
245
                    for (auto& c : curModifier) {
2798
245
                        c++;
2799
245
                    }
2800
8
                }
2801
14
            }
2802
28
        }
2803
2804
45
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
45
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
45
        const auto& result = results.back();
2811
2812
45
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
45
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
45
        if ( options.disableTests == false ) {
2830
45
            tests::test(op, result.second);
2831
45
        }
2832
2833
45
        postprocess(module, op, result);
2834
45
    }
2835
2836
33
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
128
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
128
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
128
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
234
    do {
2725
234
        auto op = getOp(&parentDs, data, size);
2726
234
        auto module = getModule(parentDs);
2727
234
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
234
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
234
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
234
    } while ( parentDs.Get<bool>() == true );
2738
2739
128
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
128
#if 1
2745
128
    {
2746
128
        std::set<uint64_t> moduleIDs;
2747
128
        for (const auto& m : modules ) {
2748
30
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
30
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
30
            moduleIDs.insert(moduleID);
2756
30
        }
2757
2758
128
        std::set<uint64_t> operationModuleIDs;
2759
128
        for (const auto& op : operations) {
2760
74
            operationModuleIDs.insert(op.first->ID);
2761
74
        }
2762
2763
128
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
128
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
128
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
128
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
128
    }
2771
128
#endif
2772
2773
128
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
128
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
202
    for (size_t i = 0; i < operations.size(); i++) {
2781
74
        auto& operation = operations[i];
2782
2783
74
        auto& module = operation.first;
2784
74
        auto& op = operation.second;
2785
2786
74
        if ( i > 0 ) {
2787
44
            auto& prevModule = operations[i-1].first;
2788
44
            auto& prevOp = operations[i-1].second;
2789
2790
44
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
20
                auto& curModifier = op.modifier.GetVectorPtr();
2792
20
                if ( curModifier.size() == 0 ) {
2793
4.61k
                    for (size_t j = 0; j < 512; j++) {
2794
4.60k
                        curModifier.push_back(1);
2795
4.60k
                    }
2796
11
                } else {
2797
413
                    for (auto& c : curModifier) {
2798
413
                        c++;
2799
413
                    }
2800
11
                }
2801
20
            }
2802
44
        }
2803
2804
74
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
74
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
74
        const auto& result = results.back();
2811
2812
74
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
74
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
74
        if ( options.disableTests == false ) {
2830
74
            tests::test(op, result.second);
2831
74
        }
2832
2833
74
        postprocess(module, op, result);
2834
74
    }
2835
2836
128
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
128
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
67
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
67
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
67
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
145
    do {
2725
145
        auto op = getOp(&parentDs, data, size);
2726
145
        auto module = getModule(parentDs);
2727
145
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
145
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
145
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
145
    } while ( parentDs.Get<bool>() == true );
2738
2739
67
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
67
#if 1
2745
67
    {
2746
67
        std::set<uint64_t> moduleIDs;
2747
67
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
67
        std::set<uint64_t> operationModuleIDs;
2759
67
        for (const auto& op : operations) {
2760
51
            operationModuleIDs.insert(op.first->ID);
2761
51
        }
2762
2763
67
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
67
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
67
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
67
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
67
    }
2771
67
#endif
2772
2773
67
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
67
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
118
    for (size_t i = 0; i < operations.size(); i++) {
2781
51
        auto& operation = operations[i];
2782
2783
51
        auto& module = operation.first;
2784
51
        auto& op = operation.second;
2785
2786
51
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i-1].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
11
                } else {
2797
176
                    for (auto& c : curModifier) {
2798
176
                        c++;
2799
176
                    }
2800
5
                }
2801
16
            }
2802
34
        }
2803
2804
51
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
51
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
51
        const auto& result = results.back();
2811
2812
51
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
51
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
51
        if ( options.disableTests == false ) {
2830
51
            tests::test(op, result.second);
2831
51
        }
2832
2833
51
        postprocess(module, op, result);
2834
51
    }
2835
2836
67
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
102
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
102
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
102
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
180
    do {
2725
180
        auto op = getOp(&parentDs, data, size);
2726
180
        auto module = getModule(parentDs);
2727
180
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
180
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
180
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
180
    } while ( parentDs.Get<bool>() == true );
2738
2739
102
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
102
#if 1
2745
102
    {
2746
102
        std::set<uint64_t> moduleIDs;
2747
102
        for (const auto& m : modules ) {
2748
15
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
15
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
15
            moduleIDs.insert(moduleID);
2756
15
        }
2757
2758
102
        std::set<uint64_t> operationModuleIDs;
2759
102
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
2762
2763
102
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
102
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
102
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
102
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
102
    }
2771
102
#endif
2772
2773
102
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
102
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
152
    for (size_t i = 0; i < operations.size(); i++) {
2781
50
        auto& operation = operations[i];
2782
2783
50
        auto& module = operation.first;
2784
50
        auto& op = operation.second;
2785
2786
50
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i-1].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
12
                auto& curModifier = op.modifier.GetVectorPtr();
2792
12
                if ( curModifier.size() == 0 ) {
2793
4.10k
                    for (size_t j = 0; j < 512; j++) {
2794
4.09k
                        curModifier.push_back(1);
2795
4.09k
                    }
2796
8
                } else {
2797
21
                    for (auto& c : curModifier) {
2798
21
                        c++;
2799
21
                    }
2800
4
                }
2801
12
            }
2802
35
        }
2803
2804
50
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
50
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
50
        const auto& result = results.back();
2811
2812
50
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
50
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
50
        if ( options.disableTests == false ) {
2830
50
            tests::test(op, result.second);
2831
50
        }
2832
2833
50
        postprocess(module, op, result);
2834
50
    }
2835
2836
102
    if ( options.noCompare == false ) {
2837
15
        compare(operations, results, data, size);
2838
15
    }
2839
102
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
92
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
92
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
92
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
182
    do {
2725
182
        auto op = getOp(&parentDs, data, size);
2726
182
        auto module = getModule(parentDs);
2727
182
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
182
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
182
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
182
    } while ( parentDs.Get<bool>() == true );
2738
2739
92
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
92
#if 1
2745
92
    {
2746
92
        std::set<uint64_t> moduleIDs;
2747
92
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
92
        std::set<uint64_t> operationModuleIDs;
2759
92
        for (const auto& op : operations) {
2760
59
            operationModuleIDs.insert(op.first->ID);
2761
59
        }
2762
2763
92
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
92
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
92
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
92
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
92
    }
2771
92
#endif
2772
2773
92
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
92
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
151
    for (size_t i = 0; i < operations.size(); i++) {
2781
59
        auto& operation = operations[i];
2782
2783
59
        auto& module = operation.first;
2784
59
        auto& op = operation.second;
2785
2786
59
        if ( i > 0 ) {
2787
41
            auto& prevModule = operations[i-1].first;
2788
41
            auto& prevOp = operations[i-1].second;
2789
2790
41
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
16
                } else {
2797
3
                    for (auto& c : curModifier) {
2798
3
                        c++;
2799
3
                    }
2800
2
                }
2801
18
            }
2802
41
        }
2803
2804
59
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
59
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
59
        const auto& result = results.back();
2811
2812
59
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
59
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
59
        if ( options.disableTests == false ) {
2830
59
            tests::test(op, result.second);
2831
59
        }
2832
2833
59
        postprocess(module, op, result);
2834
59
    }
2835
2836
92
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
92
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
37
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
37
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
37
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
94
    do {
2725
94
        auto op = getOp(&parentDs, data, size);
2726
94
        auto module = getModule(parentDs);
2727
94
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
94
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
94
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
94
    } while ( parentDs.Get<bool>() == true );
2738
2739
37
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
37
#if 1
2745
37
    {
2746
37
        std::set<uint64_t> moduleIDs;
2747
37
        for (const auto& m : modules ) {
2748
19
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
19
            moduleIDs.insert(moduleID);
2756
19
        }
2757
2758
37
        std::set<uint64_t> operationModuleIDs;
2759
54
        for (const auto& op : operations) {
2760
54
            operationModuleIDs.insert(op.first->ID);
2761
54
        }
2762
2763
37
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
37
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
37
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
37
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
37
    }
2771
37
#endif
2772
2773
37
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
37
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
91
    for (size_t i = 0; i < operations.size(); i++) {
2781
54
        auto& operation = operations[i];
2782
2783
54
        auto& module = operation.first;
2784
54
        auto& op = operation.second;
2785
2786
54
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i-1].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
12
                } else {
2797
821
                    for (auto& c : curModifier) {
2798
821
                        c++;
2799
821
                    }
2800
12
                }
2801
18
            }
2802
35
        }
2803
2804
54
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
54
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
54
        const auto& result = results.back();
2811
2812
54
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
54
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
54
        if ( options.disableTests == false ) {
2830
54
            tests::test(op, result.second);
2831
54
        }
2832
2833
54
        postprocess(module, op, result);
2834
54
    }
2835
2836
37
    if ( options.noCompare == false ) {
2837
19
        compare(operations, results, data, size);
2838
19
    }
2839
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
86
    do {
2725
86
        auto op = getOp(&parentDs, data, size);
2726
86
        auto module = getModule(parentDs);
2727
86
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
86
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
86
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
86
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
36
        std::set<uint64_t> operationModuleIDs;
2759
46
        for (const auto& op : operations) {
2760
46
            operationModuleIDs.insert(op.first->ID);
2761
46
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
82
    for (size_t i = 0; i < operations.size(); i++) {
2781
46
        auto& operation = operations[i];
2782
2783
46
        auto& module = operation.first;
2784
46
        auto& op = operation.second;
2785
2786
46
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i-1].second;
2789
2790
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
14
                auto& curModifier = op.modifier.GetVectorPtr();
2792
14
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
10
                } else {
2797
232
                    for (auto& c : curModifier) {
2798
232
                        c++;
2799
232
                    }
2800
10
                }
2801
14
            }
2802
28
        }
2803
2804
46
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
46
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
46
        const auto& result = results.back();
2811
2812
46
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
46
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
46
        if ( options.disableTests == false ) {
2830
46
            tests::test(op, result.second);
2831
46
        }
2832
2833
46
        postprocess(module, op, result);
2834
46
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
38
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
38
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
38
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
98
    do {
2725
98
        auto op = getOp(&parentDs, data, size);
2726
98
        auto module = getModule(parentDs);
2727
98
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
98
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
98
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
98
    } while ( parentDs.Get<bool>() == true );
2738
2739
38
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
38
#if 1
2745
38
    {
2746
38
        std::set<uint64_t> moduleIDs;
2747
38
        for (const auto& m : modules ) {
2748
19
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
19
            moduleIDs.insert(moduleID);
2756
19
        }
2757
2758
38
        std::set<uint64_t> operationModuleIDs;
2759
54
        for (const auto& op : operations) {
2760
54
            operationModuleIDs.insert(op.first->ID);
2761
54
        }
2762
2763
38
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
38
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
38
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
38
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
38
    }
2771
38
#endif
2772
2773
38
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
38
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
92
    for (size_t i = 0; i < operations.size(); i++) {
2781
54
        auto& operation = operations[i];
2782
2783
54
        auto& module = operation.first;
2784
54
        auto& op = operation.second;
2785
2786
54
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i-1].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
17
                auto& curModifier = op.modifier.GetVectorPtr();
2792
17
                if ( curModifier.size() == 0 ) {
2793
4.10k
                    for (size_t j = 0; j < 512; j++) {
2794
4.09k
                        curModifier.push_back(1);
2795
4.09k
                    }
2796
9
                } else {
2797
860
                    for (auto& c : curModifier) {
2798
860
                        c++;
2799
860
                    }
2800
9
                }
2801
17
            }
2802
35
        }
2803
2804
54
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
54
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
54
        const auto& result = results.back();
2811
2812
54
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
54
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
54
        if ( options.disableTests == false ) {
2830
54
            tests::test(op, result.second);
2831
54
        }
2832
2833
54
        postprocess(module, op, result);
2834
54
    }
2835
2836
38
    if ( options.noCompare == false ) {
2837
19
        compare(operations, results, data, size);
2838
19
    }
2839
38
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
93
    do {
2725
93
        auto op = getOp(&parentDs, data, size);
2726
93
        auto module = getModule(parentDs);
2727
93
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
93
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
93
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
93
    } while ( parentDs.Get<bool>() == true );
2738
2739
35
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
35
#if 1
2745
35
    {
2746
35
        std::set<uint64_t> moduleIDs;
2747
35
        for (const auto& m : modules ) {
2748
19
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
19
            moduleIDs.insert(moduleID);
2756
19
        }
2757
2758
35
        std::set<uint64_t> operationModuleIDs;
2759
55
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
2762
2763
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
35
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
35
    }
2771
35
#endif
2772
2773
35
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
35
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
90
    for (size_t i = 0; i < operations.size(); i++) {
2781
55
        auto& operation = operations[i];
2782
2783
55
        auto& module = operation.first;
2784
55
        auto& op = operation.second;
2785
2786
55
        if ( i > 0 ) {
2787
36
            auto& prevModule = operations[i-1].first;
2788
36
            auto& prevOp = operations[i-1].second;
2789
2790
36
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
19
                auto& curModifier = op.modifier.GetVectorPtr();
2792
19
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
13
                } else {
2797
224
                    for (auto& c : curModifier) {
2798
224
                        c++;
2799
224
                    }
2800
13
                }
2801
19
            }
2802
36
        }
2803
2804
55
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
55
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
55
        const auto& result = results.back();
2811
2812
55
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
55
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
55
        if ( options.disableTests == false ) {
2830
55
            tests::test(op, result.second);
2831
55
        }
2832
2833
55
        postprocess(module, op, result);
2834
55
    }
2835
2836
35
    if ( options.noCompare == false ) {
2837
19
        compare(operations, results, data, size);
2838
19
    }
2839
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
33
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
33
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
33
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
84
    do {
2725
84
        auto op = getOp(&parentDs, data, size);
2726
84
        auto module = getModule(parentDs);
2727
84
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
84
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
84
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
84
    } while ( parentDs.Get<bool>() == true );
2738
2739
33
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
33
#if 1
2745
33
    {
2746
33
        std::set<uint64_t> moduleIDs;
2747
33
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
33
        std::set<uint64_t> operationModuleIDs;
2759
50
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
2762
2763
33
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
33
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
33
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
33
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
33
    }
2771
33
#endif
2772
2773
33
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
33
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
83
    for (size_t i = 0; i < operations.size(); i++) {
2781
50
        auto& operation = operations[i];
2782
2783
50
        auto& module = operation.first;
2784
50
        auto& op = operation.second;
2785
2786
50
        if ( i > 0 ) {
2787
32
            auto& prevModule = operations[i-1].first;
2788
32
            auto& prevOp = operations[i-1].second;
2789
2790
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
9
                } else {
2797
246
                    for (auto& c : curModifier) {
2798
246
                        c++;
2799
246
                    }
2800
9
                }
2801
15
            }
2802
32
        }
2803
2804
50
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
50
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
50
        const auto& result = results.back();
2811
2812
50
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
50
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
50
        if ( options.disableTests == false ) {
2830
50
            tests::test(op, result.second);
2831
50
        }
2832
2833
50
        postprocess(module, op, result);
2834
50
    }
2835
2836
33
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
32
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
32
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
32
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
80
    do {
2725
80
        auto op = getOp(&parentDs, data, size);
2726
80
        auto module = getModule(parentDs);
2727
80
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
80
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
80
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
80
    } while ( parentDs.Get<bool>() == true );
2738
2739
32
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
32
#if 1
2745
32
    {
2746
32
        std::set<uint64_t> moduleIDs;
2747
32
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
32
        std::set<uint64_t> operationModuleIDs;
2759
51
        for (const auto& op : operations) {
2760
51
            operationModuleIDs.insert(op.first->ID);
2761
51
        }
2762
2763
32
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
32
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
32
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
32
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
32
    }
2771
32
#endif
2772
2773
32
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
32
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
83
    for (size_t i = 0; i < operations.size(); i++) {
2781
51
        auto& operation = operations[i];
2782
2783
51
        auto& module = operation.first;
2784
51
        auto& op = operation.second;
2785
2786
51
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i-1].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
12
                } else {
2797
249
                    for (auto& c : curModifier) {
2798
249
                        c++;
2799
249
                    }
2800
12
                }
2801
15
            }
2802
31
        }
2803
2804
51
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
51
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
51
        const auto& result = results.back();
2811
2812
51
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
51
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
51
        if ( options.disableTests == false ) {
2830
51
            tests::test(op, result.second);
2831
51
        }
2832
2833
51
        postprocess(module, op, result);
2834
51
    }
2835
2836
32
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
32
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
31
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
31
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
31
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
79
    do {
2725
79
        auto op = getOp(&parentDs, data, size);
2726
79
        auto module = getModule(parentDs);
2727
79
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
79
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
79
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
79
    } while ( parentDs.Get<bool>() == true );
2738
2739
31
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
31
#if 1
2745
31
    {
2746
31
        std::set<uint64_t> moduleIDs;
2747
31
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
31
        std::set<uint64_t> operationModuleIDs;
2759
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
2762
2763
31
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
31
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
31
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
31
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
31
    }
2771
31
#endif
2772
2773
31
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
31
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
79
    for (size_t i = 0; i < operations.size(); i++) {
2781
48
        auto& operation = operations[i];
2782
2783
48
        auto& module = operation.first;
2784
48
        auto& op = operation.second;
2785
2786
48
        if ( i > 0 ) {
2787
30
            auto& prevModule = operations[i-1].first;
2788
30
            auto& prevOp = operations[i-1].second;
2789
2790
30
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
9
                } else {
2797
224
                    for (auto& c : curModifier) {
2798
224
                        c++;
2799
224
                    }
2800
9
                }
2801
15
            }
2802
30
        }
2803
2804
48
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
48
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
48
        const auto& result = results.back();
2811
2812
48
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
48
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
48
        if ( options.disableTests == false ) {
2830
48
            tests::test(op, result.second);
2831
48
        }
2832
2833
48
        postprocess(module, op, result);
2834
48
    }
2835
2836
31
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
31
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
64
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
64
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
64
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
133
    do {
2725
133
        auto op = getOp(&parentDs, data, size);
2726
133
        auto module = getModule(parentDs);
2727
133
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
133
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
133
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
133
    } while ( parentDs.Get<bool>() == true );
2738
2739
64
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
64
#if 1
2745
64
    {
2746
64
        std::set<uint64_t> moduleIDs;
2747
64
        for (const auto& m : modules ) {
2748
46
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
46
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
46
            moduleIDs.insert(moduleID);
2756
46
        }
2757
2758
64
        std::set<uint64_t> operationModuleIDs;
2759
92
        for (const auto& op : operations) {
2760
92
            operationModuleIDs.insert(op.first->ID);
2761
92
        }
2762
2763
64
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
64
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
64
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
64
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
64
    }
2771
64
#endif
2772
2773
64
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
64
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
156
    for (size_t i = 0; i < operations.size(); i++) {
2781
92
        auto& operation = operations[i];
2782
2783
92
        auto& module = operation.first;
2784
92
        auto& op = operation.second;
2785
2786
92
        if ( i > 0 ) {
2787
46
            auto& prevModule = operations[i-1].first;
2788
46
            auto& prevOp = operations[i-1].second;
2789
2790
46
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
23
                auto& curModifier = op.modifier.GetVectorPtr();
2792
23
                if ( curModifier.size() == 0 ) {
2793
4.10k
                    for (size_t j = 0; j < 512; j++) {
2794
4.09k
                        curModifier.push_back(1);
2795
4.09k
                    }
2796
15
                } else {
2797
287
                    for (auto& c : curModifier) {
2798
287
                        c++;
2799
287
                    }
2800
15
                }
2801
23
            }
2802
46
        }
2803
2804
92
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
92
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
92
        const auto& result = results.back();
2811
2812
92
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
92
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
92
        if ( options.disableTests == false ) {
2830
92
            tests::test(op, result.second);
2831
92
        }
2832
2833
92
        postprocess(module, op, result);
2834
92
    }
2835
2836
64
    if ( options.noCompare == false ) {
2837
46
        compare(operations, results, data, size);
2838
46
    }
2839
64
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
76
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
76
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
76
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
160
    do {
2725
160
        auto op = getOp(&parentDs, data, size);
2726
160
        auto module = getModule(parentDs);
2727
160
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
160
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
160
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
160
    } while ( parentDs.Get<bool>() == true );
2738
2739
76
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
76
#if 1
2745
76
    {
2746
76
        std::set<uint64_t> moduleIDs;
2747
76
        for (const auto& m : modules ) {
2748
60
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
60
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
60
            moduleIDs.insert(moduleID);
2756
60
        }
2757
2758
76
        std::set<uint64_t> operationModuleIDs;
2759
124
        for (const auto& op : operations) {
2760
124
            operationModuleIDs.insert(op.first->ID);
2761
124
        }
2762
2763
76
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
76
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
76
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
76
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
76
    }
2771
76
#endif
2772
2773
76
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
76
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
200
    for (size_t i = 0; i < operations.size(); i++) {
2781
124
        auto& operation = operations[i];
2782
2783
124
        auto& module = operation.first;
2784
124
        auto& op = operation.second;
2785
2786
124
        if ( i > 0 ) {
2787
64
            auto& prevModule = operations[i-1].first;
2788
64
            auto& prevOp = operations[i-1].second;
2789
2790
64
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
18
                } else {
2797
958
                    for (auto& c : curModifier) {
2798
958
                        c++;
2799
958
                    }
2800
18
                }
2801
35
            }
2802
64
        }
2803
2804
124
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
124
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
124
        const auto& result = results.back();
2811
2812
124
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
124
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
124
        if ( options.disableTests == false ) {
2830
124
            tests::test(op, result.second);
2831
124
        }
2832
2833
124
        postprocess(module, op, result);
2834
124
    }
2835
2836
76
    if ( options.noCompare == false ) {
2837
60
        compare(operations, results, data, size);
2838
60
    }
2839
76
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
31
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
31
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
31
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
80
    do {
2725
80
        auto op = getOp(&parentDs, data, size);
2726
80
        auto module = getModule(parentDs);
2727
80
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
80
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
80
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
80
    } while ( parentDs.Get<bool>() == true );
2738
2739
31
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
31
#if 1
2745
31
    {
2746
31
        std::set<uint64_t> moduleIDs;
2747
31
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
31
        std::set<uint64_t> operationModuleIDs;
2759
50
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
2762
2763
31
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
31
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
31
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
31
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
31
    }
2771
31
#endif
2772
2773
31
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
31
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
81
    for (size_t i = 0; i < operations.size(); i++) {
2781
50
        auto& operation = operations[i];
2782
2783
50
        auto& module = operation.first;
2784
50
        auto& op = operation.second;
2785
2786
50
        if ( i > 0 ) {
2787
32
            auto& prevModule = operations[i-1].first;
2788
32
            auto& prevOp = operations[i-1].second;
2789
2790
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
10
                } else {
2797
281
                    for (auto& c : curModifier) {
2798
281
                        c++;
2799
281
                    }
2800
10
                }
2801
16
            }
2802
32
        }
2803
2804
50
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
50
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
50
        const auto& result = results.back();
2811
2812
50
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
50
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
50
        if ( options.disableTests == false ) {
2830
50
            tests::test(op, result.second);
2831
50
        }
2832
2833
50
        postprocess(module, op, result);
2834
50
    }
2835
2836
31
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
32
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
32
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
32
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
85
    do {
2725
85
        auto op = getOp(&parentDs, data, size);
2726
85
        auto module = getModule(parentDs);
2727
85
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
85
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
85
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
85
    } while ( parentDs.Get<bool>() == true );
2738
2739
32
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
32
#if 1
2745
32
    {
2746
32
        std::set<uint64_t> moduleIDs;
2747
32
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
32
        std::set<uint64_t> operationModuleIDs;
2759
55
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
2762
2763
32
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
32
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
32
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
32
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
32
    }
2771
32
#endif
2772
2773
32
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
32
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
87
    for (size_t i = 0; i < operations.size(); i++) {
2781
55
        auto& operation = operations[i];
2782
2783
55
        auto& module = operation.first;
2784
55
        auto& op = operation.second;
2785
2786
55
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i-1].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
17
                auto& curModifier = op.modifier.GetVectorPtr();
2792
17
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
10
                } else {
2797
229
                    for (auto& c : curModifier) {
2798
229
                        c++;
2799
229
                    }
2800
10
                }
2801
17
            }
2802
35
        }
2803
2804
55
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
55
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
55
        const auto& result = results.back();
2811
2812
55
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
55
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
55
        if ( options.disableTests == false ) {
2830
55
            tests::test(op, result.second);
2831
55
        }
2832
2833
55
        postprocess(module, op, result);
2834
55
    }
2835
2836
32
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
32
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
91
    do {
2725
91
        auto op = getOp(&parentDs, data, size);
2726
91
        auto module = getModule(parentDs);
2727
91
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
91
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
91
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
91
    } while ( parentDs.Get<bool>() == true );
2738
2739
35
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
35
#if 1
2745
35
    {
2746
35
        std::set<uint64_t> moduleIDs;
2747
35
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
35
        std::set<uint64_t> operationModuleIDs;
2759
54
        for (const auto& op : operations) {
2760
54
            operationModuleIDs.insert(op.first->ID);
2761
54
        }
2762
2763
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
35
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
35
    }
2771
35
#endif
2772
2773
35
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
35
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
89
    for (size_t i = 0; i < operations.size(); i++) {
2781
54
        auto& operation = operations[i];
2782
2783
54
        auto& module = operation.first;
2784
54
        auto& op = operation.second;
2785
2786
54
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i-1].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
10
                } else {
2797
293
                    for (auto& c : curModifier) {
2798
293
                        c++;
2799
293
                    }
2800
10
                }
2801
15
            }
2802
34
        }
2803
2804
54
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
54
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
54
        const auto& result = results.back();
2811
2812
54
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
54
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
54
        if ( options.disableTests == false ) {
2830
54
            tests::test(op, result.second);
2831
54
        }
2832
2833
54
        postprocess(module, op, result);
2834
54
    }
2835
2836
35
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
44
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
44
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
44
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
107
    do {
2725
107
        auto op = getOp(&parentDs, data, size);
2726
107
        auto module = getModule(parentDs);
2727
107
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
107
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
107
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
107
    } while ( parentDs.Get<bool>() == true );
2738
2739
44
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
44
#if 1
2745
44
    {
2746
44
        std::set<uint64_t> moduleIDs;
2747
44
        for (const auto& m : modules ) {
2748
24
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
24
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
24
            moduleIDs.insert(moduleID);
2756
24
        }
2757
2758
44
        std::set<uint64_t> operationModuleIDs;
2759
61
        for (const auto& op : operations) {
2760
61
            operationModuleIDs.insert(op.first->ID);
2761
61
        }
2762
2763
44
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
44
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
44
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
44
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
44
    }
2771
44
#endif
2772
2773
44
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
44
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
105
    for (size_t i = 0; i < operations.size(); i++) {
2781
61
        auto& operation = operations[i];
2782
2783
61
        auto& module = operation.first;
2784
61
        auto& op = operation.second;
2785
2786
61
        if ( i > 0 ) {
2787
37
            auto& prevModule = operations[i-1].first;
2788
37
            auto& prevOp = operations[i-1].second;
2789
2790
37
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
19
                auto& curModifier = op.modifier.GetVectorPtr();
2792
19
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
14
                } else {
2797
262
                    for (auto& c : curModifier) {
2798
262
                        c++;
2799
262
                    }
2800
14
                }
2801
19
            }
2802
37
        }
2803
2804
61
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
61
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
61
        const auto& result = results.back();
2811
2812
61
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
61
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
61
        if ( options.disableTests == false ) {
2830
61
            tests::test(op, result.second);
2831
61
        }
2832
2833
61
        postprocess(module, op, result);
2834
61
    }
2835
2836
44
    if ( options.noCompare == false ) {
2837
24
        compare(operations, results, data, size);
2838
24
    }
2839
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
35
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
35
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
35
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
92
    do {
2725
92
        auto op = getOp(&parentDs, data, size);
2726
92
        auto module = getModule(parentDs);
2727
92
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
92
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
92
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
92
    } while ( parentDs.Get<bool>() == true );
2738
2739
35
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
35
#if 1
2745
35
    {
2746
35
        std::set<uint64_t> moduleIDs;
2747
35
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
35
        std::set<uint64_t> operationModuleIDs;
2759
55
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
2762
2763
35
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
35
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
35
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
35
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
35
    }
2771
35
#endif
2772
2773
35
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
35
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
90
    for (size_t i = 0; i < operations.size(); i++) {
2781
55
        auto& operation = operations[i];
2782
2783
55
        auto& module = operation.first;
2784
55
        auto& op = operation.second;
2785
2786
55
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i-1].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
11
                } else {
2797
326
                    for (auto& c : curModifier) {
2798
326
                        c++;
2799
326
                    }
2800
11
                }
2801
18
            }
2802
35
        }
2803
2804
55
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
55
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
55
        const auto& result = results.back();
2811
2812
55
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
55
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
55
        if ( options.disableTests == false ) {
2830
55
            tests::test(op, result.second);
2831
55
        }
2832
2833
55
        postprocess(module, op, result);
2834
55
    }
2835
2836
35
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
86
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
86
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
86
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
175
    do {
2725
175
        auto op = getOp(&parentDs, data, size);
2726
175
        auto module = getModule(parentDs);
2727
175
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
175
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
175
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
175
    } while ( parentDs.Get<bool>() == true );
2738
2739
86
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
86
#if 1
2745
86
    {
2746
86
        std::set<uint64_t> moduleIDs;
2747
86
        for (const auto& m : modules ) {
2748
71
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
71
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
71
            moduleIDs.insert(moduleID);
2756
71
        }
2757
2758
86
        std::set<uint64_t> operationModuleIDs;
2759
138
        for (const auto& op : operations) {
2760
138
            operationModuleIDs.insert(op.first->ID);
2761
138
        }
2762
2763
86
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
86
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
86
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
86
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
86
    }
2771
86
#endif
2772
2773
86
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
86
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
224
    for (size_t i = 0; i < operations.size(); i++) {
2781
138
        auto& operation = operations[i];
2782
2783
138
        auto& module = operation.first;
2784
138
        auto& op = operation.second;
2785
2786
138
        if ( i > 0 ) {
2787
67
            auto& prevModule = operations[i-1].first;
2788
67
            auto& prevOp = operations[i-1].second;
2789
2790
67
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
27
                auto& curModifier = op.modifier.GetVectorPtr();
2792
27
                if ( curModifier.size() == 0 ) {
2793
6.15k
                    for (size_t j = 0; j < 512; j++) {
2794
6.14k
                        curModifier.push_back(1);
2795
6.14k
                    }
2796
15
                } else {
2797
1.21k
                    for (auto& c : curModifier) {
2798
1.21k
                        c++;
2799
1.21k
                    }
2800
15
                }
2801
27
            }
2802
67
        }
2803
2804
138
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
138
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
138
        const auto& result = results.back();
2811
2812
138
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
138
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
138
        if ( options.disableTests == false ) {
2830
138
            tests::test(op, result.second);
2831
138
        }
2832
2833
138
        postprocess(module, op, result);
2834
138
    }
2835
2836
86
    if ( options.noCompare == false ) {
2837
71
        compare(operations, results, data, size);
2838
71
    }
2839
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
59
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
59
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
59
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
127
    do {
2725
127
        auto op = getOp(&parentDs, data, size);
2726
127
        auto module = getModule(parentDs);
2727
127
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
127
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
127
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
127
    } while ( parentDs.Get<bool>() == true );
2738
2739
59
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
59
#if 1
2745
59
    {
2746
59
        std::set<uint64_t> moduleIDs;
2747
59
        for (const auto& m : modules ) {
2748
47
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
47
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
47
            moduleIDs.insert(moduleID);
2756
47
        }
2757
2758
59
        std::set<uint64_t> operationModuleIDs;
2759
101
        for (const auto& op : operations) {
2760
101
            operationModuleIDs.insert(op.first->ID);
2761
101
        }
2762
2763
59
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
59
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
59
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
59
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
59
    }
2771
59
#endif
2772
2773
59
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
59
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
160
    for (size_t i = 0; i < operations.size(); i++) {
2781
101
        auto& operation = operations[i];
2782
2783
101
        auto& module = operation.first;
2784
101
        auto& op = operation.second;
2785
2786
101
        if ( i > 0 ) {
2787
54
            auto& prevModule = operations[i-1].first;
2788
54
            auto& prevOp = operations[i-1].second;
2789
2790
54
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
19
                } else {
2797
290
                    for (auto& c : curModifier) {
2798
290
                        c++;
2799
290
                    }
2800
19
                }
2801
30
            }
2802
54
        }
2803
2804
101
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
101
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
101
        const auto& result = results.back();
2811
2812
101
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
101
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
101
        if ( options.disableTests == false ) {
2830
101
            tests::test(op, result.second);
2831
101
        }
2832
2833
101
        postprocess(module, op, result);
2834
101
    }
2835
2836
59
    if ( options.noCompare == false ) {
2837
47
        compare(operations, results, data, size);
2838
47
    }
2839
59
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
69
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
69
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
69
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
151
    do {
2725
151
        auto op = getOp(&parentDs, data, size);
2726
151
        auto module = getModule(parentDs);
2727
151
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
151
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
151
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
151
    } while ( parentDs.Get<bool>() == true );
2738
2739
69
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
69
#if 1
2745
69
    {
2746
69
        std::set<uint64_t> moduleIDs;
2747
69
        for (const auto& m : modules ) {
2748
55
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
55
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
55
            moduleIDs.insert(moduleID);
2756
55
        }
2757
2758
69
        std::set<uint64_t> operationModuleIDs;
2759
117
        for (const auto& op : operations) {
2760
117
            operationModuleIDs.insert(op.first->ID);
2761
117
        }
2762
2763
69
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
69
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
69
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
69
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
69
    }
2771
69
#endif
2772
2773
69
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
69
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
186
    for (size_t i = 0; i < operations.size(); i++) {
2781
117
        auto& operation = operations[i];
2782
2783
117
        auto& module = operation.first;
2784
117
        auto& op = operation.second;
2785
2786
117
        if ( i > 0 ) {
2787
62
            auto& prevModule = operations[i-1].first;
2788
62
            auto& prevOp = operations[i-1].second;
2789
2790
62
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                if ( curModifier.size() == 0 ) {
2793
9.23k
                    for (size_t j = 0; j < 512; j++) {
2794
9.21k
                        curModifier.push_back(1);
2795
9.21k
                    }
2796
18
                } else {
2797
282
                    for (auto& c : curModifier) {
2798
282
                        c++;
2799
282
                    }
2800
13
                }
2801
31
            }
2802
62
        }
2803
2804
117
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
117
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
117
        const auto& result = results.back();
2811
2812
117
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
117
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
117
        if ( options.disableTests == false ) {
2830
117
            tests::test(op, result.second);
2831
117
        }
2832
2833
117
        postprocess(module, op, result);
2834
117
    }
2835
2836
69
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
69
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
57
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
57
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
57
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
121
    do {
2725
121
        auto op = getOp(&parentDs, data, size);
2726
121
        auto module = getModule(parentDs);
2727
121
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
121
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
121
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
121
    } while ( parentDs.Get<bool>() == true );
2738
2739
57
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
57
#if 1
2745
57
    {
2746
57
        std::set<uint64_t> moduleIDs;
2747
57
        for (const auto& m : modules ) {
2748
38
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
38
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
38
            moduleIDs.insert(moduleID);
2756
38
        }
2757
2758
57
        std::set<uint64_t> operationModuleIDs;
2759
78
        for (const auto& op : operations) {
2760
78
            operationModuleIDs.insert(op.first->ID);
2761
78
        }
2762
2763
57
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
57
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
57
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
57
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
57
    }
2771
57
#endif
2772
2773
57
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
57
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
135
    for (size_t i = 0; i < operations.size(); i++) {
2781
78
        auto& operation = operations[i];
2782
2783
78
        auto& module = operation.first;
2784
78
        auto& op = operation.second;
2785
2786
78
        if ( i > 0 ) {
2787
40
            auto& prevModule = operations[i-1].first;
2788
40
            auto& prevOp = operations[i-1].second;
2789
2790
40
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
19
                auto& curModifier = op.modifier.GetVectorPtr();
2792
19
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
15
                } else {
2797
1.63k
                    for (auto& c : curModifier) {
2798
1.63k
                        c++;
2799
1.63k
                    }
2800
15
                }
2801
19
            }
2802
40
        }
2803
2804
78
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
78
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
78
        const auto& result = results.back();
2811
2812
78
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
78
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
78
        if ( options.disableTests == false ) {
2830
78
            tests::test(op, result.second);
2831
78
        }
2832
2833
78
        postprocess(module, op, result);
2834
78
    }
2835
2836
57
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
57
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
89
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
89
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
89
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
202
    do {
2725
202
        auto op = getOp(&parentDs, data, size);
2726
202
        auto module = getModule(parentDs);
2727
202
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
202
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
202
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
7
            break;
2736
7
        }
2737
202
    } while ( parentDs.Get<bool>() == true );
2738
2739
89
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
89
#if 1
2745
89
    {
2746
89
        std::set<uint64_t> moduleIDs;
2747
89
        for (const auto& m : modules ) {
2748
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
2757
2758
89
        std::set<uint64_t> operationModuleIDs;
2759
160
        for (const auto& op : operations) {
2760
160
            operationModuleIDs.insert(op.first->ID);
2761
160
        }
2762
2763
89
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
89
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
89
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
89
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
89
    }
2771
89
#endif
2772
2773
89
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
89
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
249
    for (size_t i = 0; i < operations.size(); i++) {
2781
160
        auto& operation = operations[i];
2782
2783
160
        auto& module = operation.first;
2784
160
        auto& op = operation.second;
2785
2786
160
        if ( i > 0 ) {
2787
88
            auto& prevModule = operations[i-1].first;
2788
88
            auto& prevOp = operations[i-1].second;
2789
2790
88
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
45
                auto& curModifier = op.modifier.GetVectorPtr();
2792
45
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
29
                } else {
2797
1.46k
                    for (auto& c : curModifier) {
2798
1.46k
                        c++;
2799
1.46k
                    }
2800
16
                }
2801
45
            }
2802
88
        }
2803
2804
160
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
160
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
160
        const auto& result = results.back();
2811
2812
160
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
160
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
160
        if ( options.disableTests == false ) {
2830
160
            tests::test(op, result.second);
2831
160
        }
2832
2833
160
        postprocess(module, op, result);
2834
160
    }
2835
2836
89
    if ( options.noCompare == false ) {
2837
72
        compare(operations, results, data, size);
2838
72
    }
2839
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
72
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
72
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
72
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
138
    do {
2725
138
        auto op = getOp(&parentDs, data, size);
2726
138
        auto module = getModule(parentDs);
2727
138
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
138
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
138
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
138
    } while ( parentDs.Get<bool>() == true );
2738
2739
72
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
72
#if 1
2745
72
    {
2746
72
        std::set<uint64_t> moduleIDs;
2747
72
        for (const auto& m : modules ) {
2748
58
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
58
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
58
            moduleIDs.insert(moduleID);
2756
58
        }
2757
2758
72
        std::set<uint64_t> operationModuleIDs;
2759
104
        for (const auto& op : operations) {
2760
104
            operationModuleIDs.insert(op.first->ID);
2761
104
        }
2762
2763
72
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
72
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
72
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
72
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
72
    }
2771
72
#endif
2772
2773
72
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
72
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
176
    for (size_t i = 0; i < operations.size(); i++) {
2781
104
        auto& operation = operations[i];
2782
2783
104
        auto& module = operation.first;
2784
104
        auto& op = operation.second;
2785
2786
104
        if ( i > 0 ) {
2787
46
            auto& prevModule = operations[i-1].first;
2788
46
            auto& prevOp = operations[i-1].second;
2789
2790
46
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
21
                auto& curModifier = op.modifier.GetVectorPtr();
2792
21
                if ( curModifier.size() == 0 ) {
2793
5.13k
                    for (size_t j = 0; j < 512; j++) {
2794
5.12k
                        curModifier.push_back(1);
2795
5.12k
                    }
2796
11
                } else {
2797
345
                    for (auto& c : curModifier) {
2798
345
                        c++;
2799
345
                    }
2800
11
                }
2801
21
            }
2802
46
        }
2803
2804
104
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
104
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
104
        const auto& result = results.back();
2811
2812
104
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
104
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
104
        if ( options.disableTests == false ) {
2830
104
            tests::test(op, result.second);
2831
104
        }
2832
2833
104
        postprocess(module, op, result);
2834
104
    }
2835
2836
72
    if ( options.noCompare == false ) {
2837
58
        compare(operations, results, data, size);
2838
58
    }
2839
72
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
93
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
93
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
93
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
194
    do {
2725
194
        auto op = getOp(&parentDs, data, size);
2726
194
        auto module = getModule(parentDs);
2727
194
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
194
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
194
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
194
    } while ( parentDs.Get<bool>() == true );
2738
2739
93
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
93
#if 1
2745
93
    {
2746
93
        std::set<uint64_t> moduleIDs;
2747
93
        for (const auto& m : modules ) {
2748
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
93
        std::set<uint64_t> operationModuleIDs;
2759
142
        for (const auto& op : operations) {
2760
142
            operationModuleIDs.insert(op.first->ID);
2761
142
        }
2762
2763
93
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
93
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
93
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
93
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
93
    }
2771
93
#endif
2772
2773
93
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
93
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
235
    for (size_t i = 0; i < operations.size(); i++) {
2781
142
        auto& operation = operations[i];
2782
2783
142
        auto& module = operation.first;
2784
142
        auto& op = operation.second;
2785
2786
142
        if ( i > 0 ) {
2787
72
            auto& prevModule = operations[i-1].first;
2788
72
            auto& prevOp = operations[i-1].second;
2789
2790
72
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
10.7k
                    for (size_t j = 0; j < 512; j++) {
2794
10.7k
                        curModifier.push_back(1);
2795
10.7k
                    }
2796
21
                } else {
2797
577
                    for (auto& c : curModifier) {
2798
577
                        c++;
2799
577
                    }
2800
14
                }
2801
35
            }
2802
72
        }
2803
2804
142
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
142
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
142
        const auto& result = results.back();
2811
2812
142
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
142
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
142
        if ( options.disableTests == false ) {
2830
142
            tests::test(op, result.second);
2831
142
        }
2832
2833
142
        postprocess(module, op, result);
2834
142
    }
2835
2836
93
    if ( options.noCompare == false ) {
2837
70
        compare(operations, results, data, size);
2838
70
    }
2839
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
84
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
84
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
84
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
166
    do {
2725
166
        auto op = getOp(&parentDs, data, size);
2726
166
        auto module = getModule(parentDs);
2727
166
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
166
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
166
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
166
    } while ( parentDs.Get<bool>() == true );
2738
2739
84
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
84
#if 1
2745
84
    {
2746
84
        std::set<uint64_t> moduleIDs;
2747
84
        for (const auto& m : modules ) {
2748
67
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
67
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
67
            moduleIDs.insert(moduleID);
2756
67
        }
2757
2758
84
        std::set<uint64_t> operationModuleIDs;
2759
126
        for (const auto& op : operations) {
2760
126
            operationModuleIDs.insert(op.first->ID);
2761
126
        }
2762
2763
84
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
84
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
84
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
84
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
84
    }
2771
84
#endif
2772
2773
84
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
84
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
210
    for (size_t i = 0; i < operations.size(); i++) {
2781
126
        auto& operation = operations[i];
2782
2783
126
        auto& module = operation.first;
2784
126
        auto& op = operation.second;
2785
2786
126
        if ( i > 0 ) {
2787
59
            auto& prevModule = operations[i-1].first;
2788
59
            auto& prevOp = operations[i-1].second;
2789
2790
59
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                if ( curModifier.size() == 0 ) {
2793
4.61k
                    for (size_t j = 0; j < 512; j++) {
2794
4.60k
                        curModifier.push_back(1);
2795
4.60k
                    }
2796
21
                } else {
2797
661
                    for (auto& c : curModifier) {
2798
661
                        c++;
2799
661
                    }
2800
21
                }
2801
30
            }
2802
59
        }
2803
2804
126
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
126
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
126
        const auto& result = results.back();
2811
2812
126
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
126
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
126
        if ( options.disableTests == false ) {
2830
126
            tests::test(op, result.second);
2831
126
        }
2832
2833
126
        postprocess(module, op, result);
2834
126
    }
2835
2836
84
    if ( options.noCompare == false ) {
2837
67
        compare(operations, results, data, size);
2838
67
    }
2839
84
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
108
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
108
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
108
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
220
    do {
2725
220
        auto op = getOp(&parentDs, data, size);
2726
220
        auto module = getModule(parentDs);
2727
220
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
220
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
220
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
220
    } while ( parentDs.Get<bool>() == true );
2738
2739
108
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
108
#if 1
2745
108
    {
2746
108
        std::set<uint64_t> moduleIDs;
2747
108
        for (const auto& m : modules ) {
2748
51
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
51
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
51
            moduleIDs.insert(moduleID);
2756
51
        }
2757
2758
108
        std::set<uint64_t> operationModuleIDs;
2759
120
        for (const auto& op : operations) {
2760
120
            operationModuleIDs.insert(op.first->ID);
2761
120
        }
2762
2763
108
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
108
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
108
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
108
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
108
    }
2771
108
#endif
2772
2773
108
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
108
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
228
    for (size_t i = 0; i < operations.size(); i++) {
2781
120
        auto& operation = operations[i];
2782
2783
120
        auto& module = operation.first;
2784
120
        auto& op = operation.second;
2785
2786
120
        if ( i > 0 ) {
2787
69
            auto& prevModule = operations[i-1].first;
2788
69
            auto& prevOp = operations[i-1].second;
2789
2790
69
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
29
                auto& curModifier = op.modifier.GetVectorPtr();
2792
29
                if ( curModifier.size() == 0 ) {
2793
8.20k
                    for (size_t j = 0; j < 512; j++) {
2794
8.19k
                        curModifier.push_back(1);
2795
8.19k
                    }
2796
16
                } else {
2797
20.9k
                    for (auto& c : curModifier) {
2798
20.9k
                        c++;
2799
20.9k
                    }
2800
13
                }
2801
29
            }
2802
69
        }
2803
2804
120
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
120
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
120
        const auto& result = results.back();
2811
2812
120
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
120
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
120
        if ( options.disableTests == false ) {
2830
120
            tests::test(op, result.second);
2831
120
        }
2832
2833
120
        postprocess(module, op, result);
2834
120
    }
2835
2836
108
    if ( options.noCompare == false ) {
2837
51
        compare(operations, results, data, size);
2838
51
    }
2839
108
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
27
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
27
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
27
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
73
    do {
2725
73
        auto op = getOp(&parentDs, data, size);
2726
73
        auto module = getModule(parentDs);
2727
73
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
73
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
73
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
73
    } while ( parentDs.Get<bool>() == true );
2738
2739
27
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
27
#if 1
2745
27
    {
2746
27
        std::set<uint64_t> moduleIDs;
2747
27
        for (const auto& m : modules ) {
2748
14
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
14
            moduleIDs.insert(moduleID);
2756
14
        }
2757
2758
27
        std::set<uint64_t> operationModuleIDs;
2759
40
        for (const auto& op : operations) {
2760
40
            operationModuleIDs.insert(op.first->ID);
2761
40
        }
2762
2763
27
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
27
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
27
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
27
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
27
    }
2771
27
#endif
2772
2773
27
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
27
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
67
    for (size_t i = 0; i < operations.size(); i++) {
2781
40
        auto& operation = operations[i];
2782
2783
40
        auto& module = operation.first;
2784
40
        auto& op = operation.second;
2785
2786
40
        if ( i > 0 ) {
2787
26
            auto& prevModule = operations[i-1].first;
2788
26
            auto& prevOp = operations[i-1].second;
2789
2790
26
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
12
                auto& curModifier = op.modifier.GetVectorPtr();
2792
12
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
7
                } else {
2797
1.35k
                    for (auto& c : curModifier) {
2798
1.35k
                        c++;
2799
1.35k
                    }
2800
7
                }
2801
12
            }
2802
26
        }
2803
2804
40
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
40
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
40
        const auto& result = results.back();
2811
2812
40
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
40
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
40
        if ( options.disableTests == false ) {
2830
40
            tests::test(op, result.second);
2831
40
        }
2832
2833
40
        postprocess(module, op, result);
2834
40
    }
2835
2836
27
    if ( options.noCompare == false ) {
2837
14
        compare(operations, results, data, size);
2838
14
    }
2839
27
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
69
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
69
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
69
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
133
    do {
2725
133
        auto op = getOp(&parentDs, data, size);
2726
133
        auto module = getModule(parentDs);
2727
133
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
133
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
133
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
133
    } while ( parentDs.Get<bool>() == true );
2738
2739
69
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
69
#if 1
2745
69
    {
2746
69
        std::set<uint64_t> moduleIDs;
2747
69
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
69
        std::set<uint64_t> operationModuleIDs;
2759
69
        for (const auto& op : operations) {
2760
52
            operationModuleIDs.insert(op.first->ID);
2761
52
        }
2762
2763
69
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
69
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
69
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
69
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
69
    }
2771
69
#endif
2772
2773
69
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
69
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
121
    for (size_t i = 0; i < operations.size(); i++) {
2781
52
        auto& operation = operations[i];
2782
2783
52
        auto& module = operation.first;
2784
52
        auto& op = operation.second;
2785
2786
52
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i-1].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
19
                auto& curModifier = op.modifier.GetVectorPtr();
2792
19
                if ( curModifier.size() == 0 ) {
2793
4.61k
                    for (size_t j = 0; j < 512; j++) {
2794
4.60k
                        curModifier.push_back(1);
2795
4.60k
                    }
2796
10
                } else {
2797
226
                    for (auto& c : curModifier) {
2798
226
                        c++;
2799
226
                    }
2800
10
                }
2801
19
            }
2802
31
        }
2803
2804
52
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
52
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
52
        const auto& result = results.back();
2811
2812
52
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
52
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
52
        if ( options.disableTests == false ) {
2830
52
            tests::test(op, result.second);
2831
52
        }
2832
2833
52
        postprocess(module, op, result);
2834
52
    }
2835
2836
69
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
69
}
2840
2841
/* Explicit template instantiation */
2842
template class ExecutorBase<component::Digest, operation::Digest>;
2843
template class ExecutorBase<component::MAC, operation::HMAC>;
2844
template class ExecutorBase<component::MAC, operation::UMAC>;
2845
template class ExecutorBase<component::MAC, operation::CMAC>;
2846
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2847
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2848
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2849
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2850
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2851
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2852
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2853
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2854
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2855
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2856
template class ExecutorBase<component::Key, operation::KDF_X963>;
2857
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2858
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2859
template class ExecutorBase<component::Key3, operation::KDF_SRTP>;
2860
template class ExecutorBase<component::Key3, operation::KDF_SRTCP>;
2861
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2862
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2863
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2864
template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>;
2865
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2866
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2867
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2868
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2869
template class ExecutorBase<bool, operation::ECCSI_Verify>;
2870
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2871
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2872
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2873
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2874
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2875
template class ExecutorBase<bool, operation::DSA_Verify>;
2876
template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>;
2877
template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>;
2878
template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>;
2879
template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>;
2880
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2881
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2882
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2883
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2884
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>;
2885
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2886
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2887
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2888
template class ExecutorBase<bool, operation::ECC_Point_Cmp>;
2889
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2890
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2891
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2892
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2893
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2894
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2895
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2896
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2897
template class ExecutorBase<bool, operation::BLS_Verify>;
2898
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2899
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2900
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2901
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2902
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2903
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2904
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2905
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2906
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2907
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2908
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2909
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2910
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2911
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2912
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2913
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2914
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2915
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2916
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2917
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2918
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2919
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2920
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2921
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2922
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2923
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2924
template class ExecutorBase<component::G1, operation::BLS_G1_MultiExp>;
2925
template class ExecutorBase<Buffer, operation::Misc>;
2926
template class ExecutorBase<bool, operation::SR25519_Verify>;
2927
2928
} /* namespace cryptofuzz */