Coverage Report

Created: 2026-04-05 07:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cryptofuzz-heapmath/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
157k
#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
997
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
997
    (void)module;
53
997
    (void)op;
54
55
997
    if ( result.second != std::nullopt ) {
56
761
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
761
    }
58
997
}
59
60
997
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
997
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
997
    return module->OpDigest(op);
64
997
}
65
66
/* Specialization for operation::HMAC */
67
866
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
866
    (void)module;
69
866
    (void)op;
70
71
866
    if ( result.second != std::nullopt ) {
72
387
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
387
    }
74
866
}
75
76
866
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
866
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
866
    return module->OpHMAC(op);
80
866
}
81
82
/* Specialization for operation::UMAC */
83
122
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
122
    (void)module;
85
122
    (void)op;
86
87
122
    if ( result.second != std::nullopt ) {
88
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
0
    }
90
122
}
91
92
122
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
122
    return module->OpUMAC(op);
94
122
}
95
96
/* Specialization for operation::CMAC */
97
1.14k
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.14k
    (void)module;
99
1.14k
    (void)op;
100
101
1.14k
    if ( result.second != std::nullopt ) {
102
245
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
245
    }
104
1.14k
}
105
106
1.14k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
1.14k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
1.14k
    return module->OpCMAC(op);
110
1.14k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
3.98k
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.98k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
3.98k
    if ( result.second != std::nullopt ) {
119
1.69k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
1.69k
        if ( result.second->tag != std::nullopt ) {
121
254
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
254
        }
123
1.69k
    }
124
125
3.98k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
1.65k
        using fuzzing::datasource::ID;
127
128
1.65k
        bool tryDecrypt = true;
129
130
1.65k
        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.65k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
1.65k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
1.65k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
1.65k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
1.65k
                    op.cleartext.GetSize() + 32,
171
172
1.65k
                    op.aad,
173
174
                    /* Empty modifier */
175
1.65k
                    {});
176
177
1.65k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
1.65k
            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.65k
            } 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.65k
        }
208
1.65k
    }
209
3.98k
}
210
211
3.98k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
3.98k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
3.98k
    return module->OpSymmetricEncrypt(op);
215
3.98k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
1.58k
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.58k
    (void)module;
220
1.58k
    (void)op;
221
222
1.58k
    if ( result.second != std::nullopt ) {
223
255
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
255
    }
225
1.58k
}
226
227
1.58k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
1.58k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
1.58k
    return module->OpSymmetricDecrypt(op);
231
1.58k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
164
template<> void ExecutorBase<component::Key, operation::KDF_SCRYPT>::postprocess(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op, const ExecutorBase<component::Key, operation::KDF_SCRYPT>::ResultPair& result) const {
235
164
    (void)module;
236
164
    (void)op;
237
238
164
    if ( result.second != std::nullopt ) {
239
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
0
    }
241
164
}
242
243
164
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
164
    return module->OpKDF_SCRYPT(op);
245
164
}
246
247
/* Specialization for operation::KDF_HKDF */
248
799
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
799
    (void)module;
250
799
    (void)op;
251
252
799
    if ( result.second != std::nullopt ) {
253
340
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
340
    }
255
799
}
256
257
799
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
799
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
799
    return module->OpKDF_HKDF(op);
261
799
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
211
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
211
    (void)module;
266
211
    (void)op;
267
268
211
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
211
}
272
273
211
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
211
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
211
    return module->OpKDF_PBKDF(op);
277
211
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
186
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
186
    (void)module;
282
186
    (void)op;
283
284
186
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
186
}
288
289
186
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
186
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
186
    return module->OpKDF_PBKDF1(op);
293
186
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
601
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
601
    (void)module;
298
601
    (void)op;
299
300
601
    if ( result.second != std::nullopt ) {
301
432
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
432
    }
303
601
}
304
305
601
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
601
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
601
    return module->OpKDF_PBKDF2(op);
309
601
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
22
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
22
    (void)module;
314
22
    (void)op;
315
316
22
    if ( result.second != std::nullopt ) {
317
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
0
    }
319
22
}
320
321
22
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
22
    return module->OpKDF_ARGON2(op);
323
22
}
324
325
/* Specialization for operation::KDF_SSH */
326
186
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
186
    (void)module;
328
186
    (void)op;
329
330
186
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
186
}
334
335
186
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
186
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
186
    return module->OpKDF_SSH(op);
339
186
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
159
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
159
    (void)module;
344
159
    (void)op;
345
346
159
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
159
}
350
351
159
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
159
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
159
    return module->OpKDF_TLS1_PRF(op);
355
159
}
356
357
/* Specialization for operation::KDF_X963 */
358
165
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
165
    (void)module;
360
165
    (void)op;
361
362
165
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
165
}
366
367
165
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
165
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
165
    return module->OpKDF_X963(op);
371
165
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
17
template<> void ExecutorBase<component::Key, operation::KDF_BCRYPT>::postprocess(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op, const ExecutorBase<component::Key, operation::KDF_BCRYPT>::ResultPair& result) const {
375
17
    (void)module;
376
17
    (void)op;
377
378
17
    if ( result.second != std::nullopt ) {
379
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
0
    }
381
17
}
382
383
17
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
17
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
17
    return module->OpKDF_BCRYPT(op);
387
17
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
193
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
193
    (void)module;
392
193
    (void)op;
393
394
193
    if ( result.second != std::nullopt ) {
395
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
0
    }
397
193
}
398
399
193
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
193
    if ( op.mech.mode == true ) {
401
129
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
129
    }
403
404
193
    return module->OpKDF_SP_800_108(op);
405
193
}
406
407
/* Specialization for operation::KDF_SRTP */
408
213
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
213
    (void)module;
410
213
    (void)op;
411
213
    (void)result;
412
213
}
413
414
213
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
213
    return module->OpKDF_SRTP(op);
416
213
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
171
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
171
    (void)module;
421
171
    (void)op;
422
171
    (void)result;
423
171
}
424
425
171
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
171
    return module->OpKDF_SRTCP(op);
427
171
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
9.04k
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.04k
    (void)module;
432
433
9.04k
    if ( result.second != std::nullopt  ) {
434
3.96k
        const auto curveID = op.curveType.Get();
435
3.96k
        const auto privkey = op.priv.ToTrimmedString();
436
3.96k
        const auto pub_x = result.second->first.ToTrimmedString();
437
3.96k
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
3.96k
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
3.96k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
3.96k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
3.96k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
3.96k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
3.96k
    }
446
9.04k
}
447
448
9.04k
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.04k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
9.04k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
9.04k
    if ( size == 0 || size > 4096 ) {
454
102
        return std::nullopt;
455
102
    }
456
457
8.94k
    return module->OpECC_PrivateToPublic(op);
458
9.04k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
5.85k
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.85k
    (void)module;
463
5.85k
    (void)op;
464
5.85k
    (void)result;
465
5.85k
}
466
467
5.85k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
5.85k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
5.85k
    return module->OpECC_ValidatePubkey(op);
471
5.85k
}
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
3.01k
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
478
3.01k
    (void)operations;
479
3.01k
    (void)results;
480
3.01k
    (void)data;
481
3.01k
    (void)size;
482
3.01k
}
483
484
9.02k
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
9.02k
    (void)module;
486
487
9.02k
    if ( result.second != std::nullopt  ) {
488
2.51k
        const auto curveID = op.curveType.Get();
489
2.51k
        const auto privkey = result.second->priv.ToTrimmedString();
490
2.51k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
2.51k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
2.51k
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
2.51k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
2.51k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
2.51k
        {
498
2.51k
            auto opValidate = operation::ECC_ValidatePubkey(
499
2.51k
                    op.curveType,
500
2.51k
                    result.second->pub,
501
2.51k
                    op.modifier);
502
503
2.51k
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
2.51k
            CF_ASSERT(
505
2.51k
                    validateResult == std::nullopt ||
506
2.51k
                    *validateResult == true,
507
2.51k
                    "Cannot validate generated public key");
508
2.51k
        }
509
2.51k
    }
510
9.02k
}
511
512
9.02k
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
9.02k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
9.02k
    return module->OpECC_GenerateKeyPair(op);
516
9.02k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
938
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
938
    (void)module;
521
522
938
    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
938
}
565
566
938
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
938
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
938
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
663
    const size_t size = op.priv.ToTrimmedString().size();
571
572
663
    if ( size == 0 || size > 4096 ) {
573
0
        return std::nullopt;
574
0
    }
575
576
663
    return module->OpECCSI_Sign(op);
577
663
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
11.3k
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.3k
    (void)module;
582
583
11.3k
    if ( result.second != std::nullopt  ) {
584
7.16k
        const auto curveID = op.curveType.Get();
585
7.16k
        const auto cleartext = op.cleartext.ToHex();
586
7.16k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
7.16k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
7.16k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
7.16k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
7.16k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
7.16k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
7.16k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
7.16k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
7.16k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
7.16k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
7.16k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
7.16k
        {
601
7.16k
            auto opVerify = operation::ECDSA_Verify(
602
7.16k
                    op,
603
7.16k
                    *(result.second),
604
7.16k
                    op.modifier);
605
606
7.16k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
7.16k
            CF_ASSERT(
608
7.16k
                    verifyResult == std::nullopt ||
609
7.16k
                    *verifyResult == true,
610
7.16k
                    "Cannot verify generated signature");
611
7.16k
        }
612
7.16k
    }
613
11.3k
}
614
615
11.3k
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.3k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
11.3k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
11.0k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
11.0k
    if ( size == 0 || size > 4096 ) {
622
3
        return std::nullopt;
623
3
    }
624
625
11.0k
    return module->OpECDSA_Sign(op);
626
11.0k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
50
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
50
    (void)module;
631
632
50
    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
50
}
650
651
50
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
50
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
50
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
50
    const size_t size = op.priv.ToTrimmedString().size();
656
657
50
    if ( size == 0 || size > 4096 ) {
658
0
        return std::nullopt;
659
0
    }
660
661
50
    return module->OpECGDSA_Sign(op);
662
50
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
63
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
63
    (void)module;
667
668
63
    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
63
}
686
687
63
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
63
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
63
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
63
    const size_t size = op.priv.ToTrimmedString().size();
692
693
63
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
63
    return module->OpECRDSA_Sign(op);
698
63
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
55
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
55
    (void)module;
703
704
55
    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
55
}
722
723
55
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
55
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
55
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
55
    const size_t size = op.priv.ToTrimmedString().size();
728
729
55
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
55
    return module->OpSchnorr_Sign(op);
734
55
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
523
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
523
    (void)module;
739
523
    (void)op;
740
523
    (void)result;
741
523
}
742
743
523
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
523
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
523
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
209
    return module->OpECCSI_Verify(op);
748
523
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
6.69k
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.69k
    (void)module;
753
6.69k
    (void)op;
754
6.69k
    (void)result;
755
6.69k
}
756
757
6.69k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
6.69k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
6.69k
    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.34k
    return module->OpECDSA_Verify(op);
772
6.69k
}
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
50
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
50
    (void)module;
801
50
    (void)op;
802
50
    (void)result;
803
50
}
804
805
50
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
50
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
50
    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
50
    return module->OpECRDSA_Verify(op);
820
50
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
39
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
39
    (void)module;
825
39
    (void)op;
826
39
    (void)result;
827
39
}
828
829
39
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
39
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
39
    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
39
    return module->OpSchnorr_Verify(op);
844
39
}
845
846
57
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
57
    (void)module;
848
57
    (void)op;
849
57
    (void)result;
850
57
}
851
852
57
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
57
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
57
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
57
    return module->OpECDSA_Recover(op);
857
57
}
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
87
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
87
    (void)module;
869
87
    (void)op;
870
87
    (void)result;
871
87
}
872
873
87
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
87
    const std::vector<size_t> sizes = {
875
87
        op.parameters.p.ToTrimmedString().size(),
876
87
        op.parameters.q.ToTrimmedString().size(),
877
87
        op.parameters.g.ToTrimmedString().size(),
878
87
        op.pub.ToTrimmedString().size(),
879
87
        op.signature.first.ToTrimmedString().size(),
880
87
        op.signature.second.ToTrimmedString().size(),
881
87
    };
882
883
512
    for (const auto& size : sizes) {
884
512
        if ( size == 0 || size > 4096 ) {
885
4
            return std::nullopt;
886
4
        }
887
512
    }
888
889
83
    return module->OpDSA_Verify(op);
890
87
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
32
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
32
    (void)operations;
897
32
    (void)results;
898
32
    (void)data;
899
32
    (void)size;
900
32
}
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
77
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
77
    (void)module;
910
77
    (void)op;
911
77
    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
77
}
934
935
77
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
77
    const std::vector<size_t> sizes = {
937
77
        op.parameters.p.ToTrimmedString().size(),
938
77
        op.parameters.q.ToTrimmedString().size(),
939
77
        op.parameters.g.ToTrimmedString().size(),
940
77
        op.priv.ToTrimmedString().size(),
941
77
    };
942
943
299
    for (const auto& size : sizes) {
944
299
        if ( size == 0 || size > 4096 ) {
945
10
            return std::nullopt;
946
10
        }
947
299
    }
948
949
67
    return module->OpDSA_Sign(op);
950
77
}
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
46
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
46
    (void)result;
963
46
    (void)module;
964
46
    (void)op;
965
46
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
46
}
969
970
46
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
46
    return module->OpDSA_PrivateToPublic(op);
972
46
}
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
38
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
38
    (void)operations;
980
38
    (void)results;
981
38
    (void)data;
982
38
    (void)size;
983
38
}
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
86
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
86
    (void)result;
994
86
    (void)module;
995
86
    (void)op;
996
86
    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
86
}
1003
1004
86
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
86
    const std::vector<size_t> sizes = {
1006
86
        op.p.ToTrimmedString().size(),
1007
86
        op.q.ToTrimmedString().size(),
1008
86
        op.g.ToTrimmedString().size(),
1009
86
    };
1010
1011
251
    for (const auto& size : sizes) {
1012
251
        if ( size == 0 || size > 4096 ) {
1013
7
            return std::nullopt;
1014
7
        }
1015
251
    }
1016
1017
79
    return module->OpDSA_GenerateKeyPair(op);
1018
86
}
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
20
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
20
    (void)operations;
1026
20
    (void)results;
1027
20
    (void)data;
1028
20
    (void)size;
1029
20
}
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
54
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
54
    (void)result;
1040
54
    (void)module;
1041
54
    (void)op;
1042
54
    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
54
}
1054
1055
54
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
54
    return module->OpDSA_GenerateParameters(op);
1057
54
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
1.32k
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.32k
    (void)module;
1062
1.32k
    (void)op;
1063
1.32k
    (void)result;
1064
1.32k
}
1065
1066
1.32k
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
1.32k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
1.32k
    return module->OpECDH_Derive(op);
1070
1.32k
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
716
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
716
    (void)operations;
1076
716
    (void)results;
1077
716
    (void)data;
1078
716
    (void)size;
1079
716
}
1080
1.45k
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.45k
    (void)module;
1082
1.45k
    (void)op;
1083
1.45k
    (void)result;
1084
1.45k
}
1085
1086
1.45k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
1.45k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
1.45k
    return module->OpECIES_Encrypt(op);
1090
1.45k
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
1.49k
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.49k
    (void)module;
1095
1.49k
    (void)op;
1096
1.49k
    (void)result;
1097
1.49k
}
1098
1099
1.49k
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
1.49k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
1.49k
    return module->OpECIES_Decrypt(op);
1103
1.49k
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
4.51k
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.51k
    (void)module;
1108
1109
4.51k
    if ( result.second != std::nullopt  ) {
1110
241
        const auto curveID = op.curveType.Get();
1111
241
        const auto x = result.second->first.ToTrimmedString();
1112
241
        const auto y = result.second->second.ToTrimmedString();
1113
1114
241
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
241
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
241
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
241
    }
1119
4.51k
}
1120
1121
4.51k
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.51k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
4.51k
    return module->OpECC_Point_Add(op);
1125
4.51k
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
46
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
46
    (void)module;
1130
1131
46
    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
46
}
1142
1143
46
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
46
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
46
    return module->OpECC_Point_Sub(op);
1147
46
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
4.56k
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.56k
    (void)module;
1152
1153
4.56k
    if ( result.second != std::nullopt  ) {
1154
361
        const auto curveID = op.curveType.Get();
1155
361
        const auto x = result.second->first.ToTrimmedString();
1156
361
        const auto y = result.second->second.ToTrimmedString();
1157
1158
361
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
361
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
361
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
361
    }
1163
4.56k
}
1164
1165
4.56k
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.56k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
4.56k
    return module->OpECC_Point_Mul(op);
1169
4.56k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
289
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
289
    (void)module;
1174
1175
289
    if ( result.second != std::nullopt  ) {
1176
48
        const auto curveID = op.curveType.Get();
1177
48
        const auto x = result.second->first.ToTrimmedString();
1178
48
        const auto y = result.second->second.ToTrimmedString();
1179
1180
48
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
48
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
48
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
48
    }
1185
289
}
1186
1187
289
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
289
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
289
    return module->OpECC_Point_Neg(op);
1191
289
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
7.09k
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
7.09k
    (void)module;
1196
1197
7.09k
    if ( result.second != std::nullopt  ) {
1198
133
        const auto curveID = op.curveType.Get();
1199
133
        const auto x = result.second->first.ToTrimmedString();
1200
133
        const auto y = result.second->second.ToTrimmedString();
1201
1202
133
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
133
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
133
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
133
    }
1207
7.09k
}
1208
1209
7.09k
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
7.09k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
7.09k
    return module->OpECC_Point_Dbl(op);
1213
7.09k
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
142
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
142
    (void)module;
1218
142
    (void)result;
1219
142
    (void)op;
1220
142
}
1221
1222
142
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
142
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
142
    return module->OpECC_Point_Cmp(op);
1226
142
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
2.63k
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.63k
    (void)module;
1231
2.63k
    (void)op;
1232
2.63k
    (void)result;
1233
2.63k
}
1234
1235
2.63k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
2.63k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
2.56k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
2.54k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
2.47k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
2.40k
    return module->OpDH_Derive(op);
1242
2.47k
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
4.41k
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.41k
    (void)result;
1247
4.41k
    (void)op;
1248
4.41k
    (void)module;
1249
1250
4.41k
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
547
        const auto priv = result.second->first.ToTrimmedString();
1252
547
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
547
        Pool_DH_PrivateKey.Set(priv);
1255
547
        Pool_DH_PublicKey.Set(pub);
1256
547
    }
1257
4.41k
}
1258
1259
4.41k
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.41k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
4.37k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
4.31k
    return module->OpDH_GenerateKeyPair(op);
1264
4.37k
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
59.2k
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.2k
    (void)module;
1269
59.2k
    (void)op;
1270
1271
59.2k
    if ( result.second != std::nullopt  ) {
1272
22.0k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
22.0k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
21.9k
            Pool_Bignum.Set(bignum);
1276
21.9k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
745
                Pool_Bignum_Primes.Set(bignum);
1278
745
            }
1279
21.9k
        }
1280
22.0k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
1.58k
            if ( bignum == "1" ) {
1282
647
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
647
            }
1284
1.58k
        }
1285
22.0k
    }
1286
59.2k
}
1287
1288
59.2k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
59.2k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
59.2k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
59.2k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
59.2k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
59.1k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
59.1k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
73
        return std::nullopt;
1299
73
    }
1300
1301
59.0k
    switch ( op.calcOp.Get() ) {
1302
631
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
631
            if ( op.bn1.GetSize() > 4 ) {
1305
75
                return std::nullopt;
1306
75
            }
1307
556
            break;
1308
556
        case    CF_CALCOP("Exp(A,B)"):
1309
230
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
165
                return std::nullopt;
1311
165
            }
1312
65
            break;
1313
177
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
177
            if ( op.bn1.GetSize() > 4 ) {
1315
102
                return std::nullopt;
1316
102
            }
1317
75
            break;
1318
398
        case    CF_CALCOP("Exp2(A)"):
1319
398
            if ( op.bn0.GetSize() > 4 ) {
1320
87
                return std::nullopt;
1321
87
            }
1322
311
            break;
1323
59.0k
    }
1324
1325
58.6k
    return module->OpBignumCalc(op);
1326
59.0k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
140
template<> void ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op, const ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ResultPair& result) const {
1330
140
    (void)module;
1331
140
    (void)op;
1332
1333
140
    if ( result.second != std::nullopt  ) {
1334
0
        const auto bignum_first = result.second->first.ToTrimmedString();
1335
0
        const auto bignum_second = result.second->second.ToTrimmedString();
1336
1337
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1338
0
            Pool_Bignum.Set(bignum_first);
1339
0
        }
1340
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1341
0
            Pool_Bignum.Set(bignum_second);
1342
0
        }
1343
0
    }
1344
140
}
1345
1346
140
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
140
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
140
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
139
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
129
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
119
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
108
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
98
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
88
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
82
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
71
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
71
    return module->OpBignumCalc_Fp2(op);
1364
71
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
734
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
734
    (void)module;
1369
734
    (void)op;
1370
1371
734
    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
734
}
1400
1401
734
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
734
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
734
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
723
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
712
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
703
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
695
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
687
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
676
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
668
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
658
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
647
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
639
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
629
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
620
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
610
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
600
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
590
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
580
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
569
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
559
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
549
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
539
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
528
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
516
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
506
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
496
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
486
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
476
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
469
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
459
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
449
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
439
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
429
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
419
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
412
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
403
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
393
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
383
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
373
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
363
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
353
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
343
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
333
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
322
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
311
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
301
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
291
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
281
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
271
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
261
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
261
    return module->OpBignumCalc_Fp12(op);
1462
261
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
54
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
54
    (void)module;
1467
1468
54
    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
54
}
1479
1480
54
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
54
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
54
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
54
    if ( size == 0 || size > 4096 ) {
1486
0
        return std::nullopt;
1487
0
    }
1488
1489
54
    return module->OpBLS_PrivateToPublic(op);
1490
54
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
57
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
57
    (void)module;
1495
57
    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
57
}
1510
1511
57
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
57
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
57
    if ( size == 0 || size > 4096 ) {
1515
1
        return std::nullopt;
1516
1
    }
1517
1518
56
    return module->OpBLS_PrivateToPublic_G2(op);
1519
57
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
57
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
57
    (void)module;
1524
1525
57
    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
57
}
1553
1554
57
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
57
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
57
    if ( size == 0 || size > 4096 ) {
1558
1
        return std::nullopt;
1559
1
    }
1560
1561
56
    return module->OpBLS_Sign(op);
1562
57
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
39
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
39
    (void)module;
1567
39
    (void)op;
1568
39
    (void)result;
1569
39
}
1570
1571
39
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
39
    return module->OpBLS_Verify(op);
1588
39
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
63
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
63
    (void)module;
1593
63
    (void)op;
1594
1595
63
    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
63
}
1624
1625
63
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
63
    return module->OpBLS_BatchSign(op);
1627
63
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
69
template<> void ExecutorBase<bool, operation::BLS_BatchVerify>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op, const ExecutorBase<bool, operation::BLS_BatchVerify>::ResultPair& result) const {
1631
69
    (void)module;
1632
69
    (void)op;
1633
69
    (void)result;
1634
69
}
1635
1636
69
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
69
    return module->OpBLS_BatchVerify(op);
1638
69
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
63
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
63
    (void)module;
1643
63
    (void)op;
1644
63
    (void)result;
1645
63
}
1646
1647
63
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
63
    return module->OpBLS_Aggregate_G1(op);
1649
63
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
60
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
60
    (void)module;
1654
60
    (void)op;
1655
60
    (void)result;
1656
60
}
1657
1658
60
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
60
    return module->OpBLS_Aggregate_G2(op);
1660
60
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
50
template<> void ExecutorBase<component::Fp12, operation::BLS_Pairing>::postprocess(std::shared_ptr<Module> module, operation::BLS_Pairing& op, const ExecutorBase<component::Fp12, operation::BLS_Pairing>::ResultPair& result) const {
1664
50
    (void)module;
1665
50
    (void)op;
1666
1667
50
    if ( result.second != std::nullopt  ) {
1668
0
        Pool_Fp12.Set({
1669
0
                result.second->bn1.ToTrimmedString(),
1670
0
                result.second->bn2.ToTrimmedString(),
1671
0
                result.second->bn3.ToTrimmedString(),
1672
0
                result.second->bn4.ToTrimmedString(),
1673
0
                result.second->bn5.ToTrimmedString(),
1674
0
                result.second->bn6.ToTrimmedString(),
1675
0
                result.second->bn7.ToTrimmedString(),
1676
0
                result.second->bn8.ToTrimmedString(),
1677
0
                result.second->bn9.ToTrimmedString(),
1678
0
                result.second->bn10.ToTrimmedString(),
1679
0
                result.second->bn11.ToTrimmedString(),
1680
0
                result.second->bn12.ToTrimmedString()
1681
0
        });
1682
0
    }
1683
50
}
1684
1685
50
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
50
    return module->OpBLS_Pairing(op);
1687
50
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
52
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
52
    (void)module;
1692
52
    (void)op;
1693
1694
52
    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
52
}
1711
1712
52
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
52
    return module->OpBLS_MillerLoop(op);
1714
52
}
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
46
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
46
    (void)module;
1747
1748
46
    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
46
}
1759
1760
46
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
46
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
46
    return module->OpBLS_HashToG1(op);
1763
46
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
43
template<> void ExecutorBase<component::G1, operation::BLS_MapToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG1& op, const ExecutorBase<component::G1, operation::BLS_MapToG1>::ResultPair& result) const {
1767
43
    (void)module;
1768
1769
43
    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
43
}
1780
1781
43
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
43
    return module->OpBLS_MapToG1(op);
1783
43
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
51
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
51
    (void)module;
1788
1789
51
    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
51
}
1804
1805
51
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
51
    return module->OpBLS_MapToG2(op);
1807
51
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
85
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
85
    (void)module;
1812
85
    (void)op;
1813
85
    (void)result;
1814
85
}
1815
1816
85
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
85
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
85
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
77
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
77
    return module->OpBLS_IsG1OnCurve(op);
1822
77
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
84
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
84
    (void)module;
1827
84
    (void)op;
1828
84
    (void)result;
1829
84
}
1830
1831
84
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
84
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
76
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
66
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
55
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
52
    return module->OpBLS_IsG2OnCurve(op);
1838
55
}
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
57
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
57
    (void)module;
1865
1866
57
    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
57
}
1877
1878
57
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
57
    return module->OpBLS_Decompress_G1(op);
1880
57
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
53
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
53
    (void)module;
1885
53
    (void)op;
1886
1887
53
    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
53
}
1893
1894
53
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
53
    return module->OpBLS_Compress_G1(op);
1896
53
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
53
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
53
    (void)module;
1901
1902
53
    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
53
}
1917
1918
53
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
53
    return module->OpBLS_Decompress_G2(op);
1920
53
}
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
136
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
136
    (void)module;
1945
1946
136
    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
136
}
1957
1958
136
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
136
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
136
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
126
    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
83
template<> void ExecutorBase<component::G1, operation::BLS_G1_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op, const ExecutorBase<component::G1, operation::BLS_G1_Mul>::ResultPair& result) const {
1970
83
    (void)module;
1971
1972
83
    if ( result.second != std::nullopt  ) {
1973
0
        const auto curveID = op.curveType.Get();
1974
0
        const auto g1_x = result.second->first.ToTrimmedString();
1975
0
        const auto g1_y = result.second->second.ToTrimmedString();
1976
1977
0
        G1AddToPool(curveID, g1_x, g1_y);
1978
1979
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1980
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1981
0
    }
1982
83
}
1983
1984
83
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1985
83
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
83
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
83
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
71
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
65
    return module->OpBLS_G1_Mul(op);
1991
71
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
125
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
125
    (void)module;
1996
125
    (void)op;
1997
125
    (void)result;
1998
125
}
1999
2000
125
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
125
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
125
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
115
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
104
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
96
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
86
    return module->OpBLS_G1_IsEq(op);
2008
96
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
83
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
83
    (void)module;
2013
2014
83
    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
83
}
2025
2026
83
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
83
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
83
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
73
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
72
    return module->OpBLS_G1_Neg(op);
2032
73
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
154
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
154
    (void)module;
2037
2038
154
    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
154
}
2053
2054
154
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
154
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
154
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
143
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
132
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
122
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
112
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
109
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
100
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
90
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
80
    return module->OpBLS_G2_Add(op);
2066
90
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
115
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
115
    (void)module;
2071
2072
115
    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
115
}
2087
2088
115
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
115
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
115
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
112
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
102
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
96
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
85
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
79
    return module->OpBLS_G2_Mul(op);
2097
85
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
174
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
174
    (void)module;
2102
174
    (void)op;
2103
174
    (void)result;
2104
174
}
2105
2106
174
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
174
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
174
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
171
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
160
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
150
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
142
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
138
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
131
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
120
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
104
    return module->OpBLS_G2_IsEq(op);
2118
120
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
111
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
111
    (void)module;
2123
2124
111
    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
111
}
2139
2140
111
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
111
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
111
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
101
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
93
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
90
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
80
    return module->OpBLS_G2_Neg(op);
2148
90
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
127
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
127
    (void)module;
2153
2154
127
    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
127
}
2165
2166
127
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
127
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
1.41k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
1.41k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
1.40k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
1.40k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
1.40k
    }
2174
2175
114
    return module->OpBLS_G1_MultiExp(op);
2176
127
}
2177
2178
/* Specialization for operation::Misc */
2179
48
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
48
    (void)module;
2181
48
    (void)op;
2182
48
    (void)result;
2183
48
}
2184
2185
48
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
48
    return module->OpMisc(op);
2187
48
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
58
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
58
    (void)module;
2192
2193
58
    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
58
}
2208
2209
58
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
58
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
58
    return module->OpBLS_HashToG2(op);
2212
58
}
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
47
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
47
    (void)module;
2356
47
    (void)op;
2357
47
    (void)result;
2358
47
}
2359
2360
47
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
47
    return module->OpSR25519_Verify(op);
2362
47
}
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.5k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22.5k
    ResultSet ret;
2372
2373
67.2k
    for (const auto& result : results) {
2374
67.2k
        if ( result.second == std::nullopt ) {
2375
42.4k
            continue;
2376
42.4k
        }
2377
2378
24.7k
        ret.push_back(result);
2379
24.7k
    }
2380
2381
22.5k
    return ret;
2382
22.5k
}
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
151
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
151
    ResultSet ret;
2372
2373
820
    for (const auto& result : results) {
2374
820
        if ( result.second == std::nullopt ) {
2375
187
            continue;
2376
187
        }
2377
2378
633
        ret.push_back(result);
2379
633
    }
2380
2381
151
    return ret;
2382
151
}
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
799
    for (const auto& result : results) {
2374
799
        if ( result.second == std::nullopt ) {
2375
461
            continue;
2376
461
        }
2377
2378
338
        ret.push_back(result);
2379
338
    }
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
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
21
    ResultSet ret;
2372
2373
121
    for (const auto& result : results) {
2374
121
        if ( result.second == std::nullopt ) {
2375
121
            continue;
2376
121
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
21
    return ret;
2382
21
}
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
190
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
190
    ResultSet ret;
2372
2373
851
    for (const auto& result : results) {
2374
851
        if ( result.second == std::nullopt ) {
2375
624
            continue;
2376
624
        }
2377
2378
227
        ret.push_back(result);
2379
227
    }
2380
2381
190
    return ret;
2382
190
}
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
640
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
640
    ResultSet ret;
2372
2373
3.15k
    for (const auto& result : results) {
2374
3.15k
        if ( result.second == std::nullopt ) {
2375
1.61k
            continue;
2376
1.61k
        }
2377
2378
1.53k
        ret.push_back(result);
2379
1.53k
    }
2380
2381
640
    return ret;
2382
640
}
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
266
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
266
    ResultSet ret;
2372
2373
1.19k
    for (const auto& result : results) {
2374
1.19k
        if ( result.second == std::nullopt ) {
2375
966
            continue;
2376
966
        }
2377
2378
227
        ret.push_back(result);
2379
227
    }
2380
2381
266
    return ret;
2382
266
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
163
    for (const auto& result : results) {
2374
163
        if ( result.second == std::nullopt ) {
2375
163
            continue;
2376
163
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
104
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
104
    ResultSet ret;
2372
2373
607
    for (const auto& result : results) {
2374
607
        if ( result.second == std::nullopt ) {
2375
434
            continue;
2376
434
        }
2377
2378
173
        ret.push_back(result);
2379
173
    }
2380
2381
104
    return ret;
2382
104
}
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
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
158
    for (const auto& result : results) {
2374
158
        if ( result.second == std::nullopt ) {
2375
158
            continue;
2376
158
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
210
    for (const auto& result : results) {
2374
210
        if ( result.second == std::nullopt ) {
2375
210
            continue;
2376
210
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
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
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
185
    for (const auto& result : results) {
2374
185
        if ( result.second == std::nullopt ) {
2375
185
            continue;
2376
185
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
85
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
85
    ResultSet ret;
2372
2373
485
    for (const auto& result : results) {
2374
485
        if ( result.second == std::nullopt ) {
2375
160
            continue;
2376
160
        }
2377
2378
325
        ret.push_back(result);
2379
325
    }
2380
2381
85
    return ret;
2382
85
}
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
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
10
    ResultSet ret;
2372
2373
21
    for (const auto& result : results) {
2374
21
        if ( result.second == std::nullopt ) {
2375
21
            continue;
2376
21
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
10
    return ret;
2382
10
}
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
28
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
28
    ResultSet ret;
2372
2373
184
    for (const auto& result : results) {
2374
184
        if ( result.second == std::nullopt ) {
2375
184
            continue;
2376
184
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
28
    return ret;
2382
28
}
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
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
164
    for (const auto& result : results) {
2374
164
        if ( result.second == std::nullopt ) {
2375
164
            continue;
2376
164
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
16
    for (const auto& result : results) {
2374
16
        if ( result.second == std::nullopt ) {
2375
16
            continue;
2376
16
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
191
    for (const auto& result : results) {
2374
191
        if ( result.second == std::nullopt ) {
2375
191
            continue;
2376
191
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
29
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
29
    ResultSet ret;
2372
2373
212
    for (const auto& result : results) {
2374
212
        if ( result.second == std::nullopt ) {
2375
212
            continue;
2376
212
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
29
    return ret;
2382
29
}
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
30
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
30
    ResultSet ret;
2372
2373
170
    for (const auto& result : results) {
2374
170
        if ( result.second == std::nullopt ) {
2375
170
            continue;
2376
170
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
30
    return ret;
2382
30
}
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.47k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.47k
    ResultSet ret;
2372
2373
3.98k
    for (const auto& result : results) {
2374
3.98k
        if ( result.second == std::nullopt ) {
2375
2.34k
            continue;
2376
2.34k
        }
2377
2378
1.64k
        ret.push_back(result);
2379
1.64k
    }
2380
2381
1.47k
    return ret;
2382
1.47k
}
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.07k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.07k
    ResultSet ret;
2372
2373
2.74k
    for (const auto& result : results) {
2374
2.74k
        if ( result.second == std::nullopt ) {
2375
2.07k
            continue;
2376
2.07k
        }
2377
2378
679
        ret.push_back(result);
2379
679
    }
2380
2381
1.07k
    return ret;
2382
1.07k
}
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
301
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
301
    ResultSet ret;
2372
2373
859
    for (const auto& result : results) {
2374
859
        if ( result.second == std::nullopt ) {
2375
859
            continue;
2376
859
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
301
    return ret;
2382
301
}
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.84k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.84k
    ResultSet ret;
2372
2373
8.27k
    for (const auto& result : results) {
2374
8.27k
        if ( result.second == std::nullopt ) {
2375
2.97k
            continue;
2376
2.97k
        }
2377
2378
5.29k
        ret.push_back(result);
2379
5.29k
    }
2380
2381
2.84k
    return ret;
2382
2.84k
}
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    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
16
    return ret;
2382
16
}
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
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
61
    for (const auto& result : results) {
2374
61
        if ( result.second == std::nullopt ) {
2375
61
            continue;
2376
61
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
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
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::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
162
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
162
    ResultSet ret;
2372
2373
504
    for (const auto& result : results) {
2374
504
        if ( result.second == std::nullopt ) {
2375
504
            continue;
2376
504
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
162
    return ret;
2382
162
}
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.80k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.80k
    ResultSet ret;
2372
2373
5.07k
    for (const auto& result : results) {
2374
5.07k
        if ( result.second == std::nullopt ) {
2375
2.54k
            continue;
2376
2.54k
        }
2377
2378
2.52k
        ret.push_back(result);
2379
2.52k
    }
2380
2381
1.80k
    return ret;
2382
1.80k
}
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
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
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
38
    for (const auto& result : results) {
2374
38
        if ( result.second == std::nullopt ) {
2375
38
            continue;
2376
38
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
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
56
    for (const auto& result : results) {
2374
56
        if ( result.second == std::nullopt ) {
2375
56
            continue;
2376
56
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<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
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
77
    for (const auto& result : results) {
2374
77
        if ( result.second == std::nullopt ) {
2375
77
            continue;
2376
77
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    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
15
    return ret;
2382
15
}
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
385
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
385
    ResultSet ret;
2372
2373
1.11k
    for (const auto& result : results) {
2374
1.11k
        if ( result.second == std::nullopt ) {
2375
940
            continue;
2376
940
        }
2377
2378
175
        ret.push_back(result);
2379
175
    }
2380
2381
385
    return ret;
2382
385
}
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
421
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
421
    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
13
        ret.push_back(result);
2379
13
    }
2380
2381
421
    return ret;
2382
421
}
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.10k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.10k
    ResultSet ret;
2372
2373
2.92k
    for (const auto& result : results) {
2374
2.92k
        if ( result.second == std::nullopt ) {
2375
2.72k
            continue;
2376
2.72k
        }
2377
2378
200
        ret.push_back(result);
2379
200
    }
2380
2381
1.10k
    return ret;
2382
1.10k
}
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
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::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
823
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
823
    ResultSet ret;
2372
2373
2.19k
    for (const auto& result : results) {
2374
2.19k
        if ( result.second == std::nullopt ) {
2375
1.92k
            continue;
2376
1.92k
        }
2377
2378
274
        ret.push_back(result);
2379
274
    }
2380
2381
823
    return ret;
2382
823
}
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
215
    for (const auto& result : results) {
2374
215
        if ( result.second == std::nullopt ) {
2375
179
            continue;
2376
179
        }
2377
2378
36
        ret.push_back(result);
2379
36
    }
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.14k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.14k
    ResultSet ret;
2372
2373
2.87k
    for (const auto& result : results) {
2374
2.87k
        if ( result.second == std::nullopt ) {
2375
2.76k
            continue;
2376
2.76k
        }
2377
2378
106
        ret.push_back(result);
2379
106
    }
2380
2381
1.14k
    return ret;
2382
1.14k
}
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
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
48
    ResultSet ret;
2372
2373
126
    for (const auto& result : results) {
2374
126
        if ( result.second == std::nullopt ) {
2375
86
            continue;
2376
86
        }
2377
2378
40
        ret.push_back(result);
2379
40
    }
2380
2381
48
    return ret;
2382
48
}
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
758
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
758
    ResultSet ret;
2372
2373
2.11k
    for (const auto& result : results) {
2374
2.11k
        if ( result.second == std::nullopt ) {
2375
1.82k
            continue;
2376
1.82k
        }
2377
2378
296
        ret.push_back(result);
2379
296
    }
2380
2381
758
    return ret;
2382
758
}
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.11k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7.11k
    ResultSet ret;
2372
2373
19.9k
    for (const auto& result : results) {
2374
19.9k
        if ( result.second == std::nullopt ) {
2375
9.90k
            continue;
2376
9.90k
        }
2377
2378
10.0k
        ret.push_back(result);
2379
10.0k
    }
2380
2381
7.11k
    return ret;
2382
7.11k
}
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
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
44
    ResultSet ret;
2372
2373
119
    for (const auto& result : results) {
2374
119
        if ( result.second == std::nullopt ) {
2375
119
            continue;
2376
119
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
44
    return ret;
2382
44
}
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
209
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
209
    ResultSet ret;
2372
2373
593
    for (const auto& result : results) {
2374
593
        if ( result.second == std::nullopt ) {
2375
593
            continue;
2376
593
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
209
    return ret;
2382
209
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
51
    for (const auto& result : results) {
2374
51
        if ( result.second == std::nullopt ) {
2375
51
            continue;
2376
51
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
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
}
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
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::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
13
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
13
    ResultSet ret;
2372
2373
38
    for (const auto& result : results) {
2374
38
        if ( result.second == std::nullopt ) {
2375
38
            continue;
2376
38
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
13
    return ret;
2382
13
}
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
24
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
24
    ResultSet ret;
2372
2373
62
    for (const auto& result : results) {
2374
62
        if ( result.second == std::nullopt ) {
2375
62
            continue;
2376
62
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
24
    return ret;
2382
24
}
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
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
67
    for (const auto& result : results) {
2374
67
        if ( result.second == std::nullopt ) {
2375
67
            continue;
2376
67
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
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
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
62
    for (const auto& result : results) {
2374
62
        if ( result.second == std::nullopt ) {
2375
62
            continue;
2376
62
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
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
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::Fp12, cryptofuzz::operation::BLS_MillerLoop>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
51
    for (const auto& result : results) {
2374
51
        if ( result.second == std::nullopt ) {
2375
51
            continue;
2376
51
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
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
16
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
16
    ResultSet ret;
2372
2373
45
    for (const auto& result : results) {
2374
45
        if ( result.second == std::nullopt ) {
2375
45
            continue;
2376
45
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
16
    return ret;
2382
16
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_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
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    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
19
    return ret;
2382
19
}
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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
42
    for (const auto& result : results) {
2374
42
        if ( result.second == std::nullopt ) {
2375
42
            continue;
2376
42
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
cryptofuzz::ExecutorBase<cryptofuzz::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
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
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
27
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
27
    ResultSet ret;
2372
2373
72
    for (const auto& result : results) {
2374
72
        if ( result.second == std::nullopt ) {
2375
72
            continue;
2376
72
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
27
    return ret;
2382
27
}
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
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
75
    for (const auto& result : results) {
2374
75
        if ( result.second == std::nullopt ) {
2375
75
            continue;
2376
75
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
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
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<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
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<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
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
51
    for (const auto& result : results) {
2374
51
        if ( result.second == std::nullopt ) {
2375
51
            continue;
2376
51
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
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
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
39
    ResultSet ret;
2372
2373
104
    for (const auto& result : results) {
2374
104
        if ( result.second == std::nullopt ) {
2375
104
            continue;
2376
104
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
39
    return ret;
2382
39
}
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
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_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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
90
    for (const auto& result : results) {
2374
90
        if ( result.second == std::nullopt ) {
2375
90
            continue;
2376
90
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
33
    return ret;
2382
33
}
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
132
    for (const auto& result : results) {
2374
132
        if ( result.second == std::nullopt ) {
2375
132
            continue;
2376
132
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
87
    for (const auto& result : results) {
2374
87
        if ( result.second == std::nullopt ) {
2375
87
            continue;
2376
87
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
33
    return ret;
2382
33
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
48
    ResultSet ret;
2372
2373
128
    for (const auto& result : results) {
2374
128
        if ( result.second == std::nullopt ) {
2375
128
            continue;
2376
128
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
48
    return ret;
2382
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
86
    for (const auto& result : results) {
2374
86
        if ( result.second == std::nullopt ) {
2375
86
            continue;
2376
86
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
33
    return ret;
2382
33
}
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
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
41
    ResultSet ret;
2372
2373
113
    for (const auto& result : results) {
2374
113
        if ( result.second == std::nullopt ) {
2375
113
            continue;
2376
113
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
41
    return ret;
2382
41
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
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
15
    return ret;
2382
15
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
44
    for (const auto& result : results) {
2374
44
        if ( result.second == std::nullopt ) {
2375
44
            continue;
2376
44
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
6.31k
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.31k
    (void)operations;
2388
6.31k
    (void)results;
2389
6.31k
    (void)data;
2390
6.31k
    (void)size;
2391
6.31k
}
2392
2393
template <class ResultType, class OperationType>
2394
2.20k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
2.20k
    (void)operation;
2396
2397
2.20k
    return false;
2398
2.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
122
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
122
    (void)operation;
2396
2397
122
    return false;
2398
122
}
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
35
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
35
    (void)operation;
2396
2397
35
    return false;
2398
35
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<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
59
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
59
    (void)operation;
2396
2397
59
    return false;
2398
59
}
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
581
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
581
    (void)operation;
2396
2397
581
    return false;
2398
581
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
228
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
228
    (void)operation;
2396
2397
228
    return false;
2398
228
}
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
826
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
826
    (void)operation;
2396
2397
826
    return false;
2398
826
}
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
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::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
60
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
60
    (void)operation;
2396
2397
60
    return false;
2398
60
}
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
87
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
87
    (void)operation;
2396
2397
87
    return false;
2398
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
12
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
12
    (void)operation;
2396
2397
12
    return false;
2398
12
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
32
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
32
    (void)operation;
2396
2397
32
    return false;
2398
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
12
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
12
    (void)operation;
2396
2397
12
    return false;
2398
12
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DH_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::dontCompare(cryptofuzz::operation::DH_Derive const&) const
Line
Count
Source
2394
91
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
91
    (void)operation;
2396
2397
91
    return false;
2398
91
}
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.41k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
3.41k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
3.38k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
3.38k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
3.24k
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
3.24k
    return false;
2408
3.24k
}
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.74k
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
1.74k
    if (
2419
1.74k
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
1.35k
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
888
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
664
            return true;
2424
664
        }
2425
888
    }
2426
2427
1.07k
    return false;
2428
1.74k
}
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
249
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
249
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
249
    return false;
2464
249
}
2465
2466
template <>
2467
38
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
38
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
38
    return false;
2471
38
}
2472
2473
template <>
2474
42
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
42
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
42
    return false;
2478
42
}
2479
2480
template <>
2481
62
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
62
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
61
    return false;
2485
62
}
2486
2487
template <class ResultType, class OperationType>
2488
86.7k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
86.7k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
64.1k
        return;
2492
64.1k
    }
2493
2494
22.5k
    const auto filtered = filter(results);
2495
2496
22.5k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
14.8k
        return;
2499
14.8k
    }
2500
2501
7.74k
    if ( dontCompare(operations[0].second) == true ) {
2502
828
        return;
2503
828
    }
2504
2505
21.2k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
14.2k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
14.2k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
14.2k
        const bool equal = *prev == *cur;
2510
2511
14.2k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
14.2k
    }
2528
6.91k
}
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
328
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
328
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
177
        return;
2492
177
    }
2493
2494
151
    const auto filtered = filter(results);
2495
2496
151
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
29
        return;
2499
29
    }
2500
2501
122
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
633
    for (size_t i = 1; i < filtered.size(); i++) {
2506
511
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
511
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
511
        const bool equal = *prev == *cur;
2510
2511
511
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
511
    }
2528
122
}
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
200
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
200
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
67
        return;
2492
67
    }
2493
2494
133
    const auto filtered = filter(results);
2495
2496
133
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
71
        return;
2499
71
    }
2500
2501
62
    if ( dontCompare(operations[0].second) == true ) {
2502
1
        return;
2503
1
    }
2504
2505
332
    for (size_t i = 1; i < filtered.size(); i++) {
2506
271
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
271
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
271
        const bool equal = *prev == *cur;
2510
2511
271
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
271
    }
2528
61
}
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
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
22
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
21
    const auto filtered = filter(results);
2495
2496
21
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
488
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
488
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
298
        return;
2492
298
    }
2493
2494
190
    const auto filtered = filter(results);
2495
2496
190
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
148
        return;
2499
148
    }
2500
2501
42
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
227
    for (size_t i = 1; i < filtered.size(); i++) {
2506
185
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
185
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
185
        const bool equal = *prev == *cur;
2510
2511
185
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
185
    }
2528
42
}
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.46k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1.46k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
824
        return;
2492
824
    }
2493
2494
640
    const auto filtered = filter(results);
2495
2496
640
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
391
        return;
2499
391
    }
2500
2501
249
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.53k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.28k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.28k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.28k
        const bool equal = *prev == *cur;
2510
2511
1.28k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.28k
    }
2528
249
}
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
655
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
655
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
389
        return;
2492
389
    }
2493
2494
266
    const auto filtered = filter(results);
2495
2496
266
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
228
        return;
2499
228
    }
2500
2501
38
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
227
    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
38
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
25
        return;
2499
25
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
296
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
296
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
192
        return;
2492
192
    }
2493
2494
104
    const auto filtered = filter(results);
2495
2496
104
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
69
        return;
2499
69
    }
2500
2501
35
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
173
    for (size_t i = 1; i < filtered.size(); i++) {
2506
138
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
138
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
138
        const bool equal = *prev == *cur;
2510
2511
138
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
138
    }
2528
35
}
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
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_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
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_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
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_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
201
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
201
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
116
        return;
2492
116
    }
2493
2494
85
    const auto filtered = filter(results);
2495
2496
85
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
59
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
325
    for (size_t i = 1; i < filtered.size(); i++) {
2506
266
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
266
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
266
        const bool equal = *prev == *cur;
2510
2511
266
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
266
    }
2528
59
}
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
11
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
11
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
10
    const auto filtered = filter(results);
2495
2496
10
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
10
        return;
2499
10
    }
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
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
2
        return;
2492
2
    }
2493
2494
28
    const auto filtered = filter(results);
2495
2496
28
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
28
        return;
2499
28
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
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_BCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
9
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
9
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
8
    const auto filtered = filter(results);
2495
2496
8
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8
        return;
2499
8
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
32
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
30
    const auto filtered = filter(results);
2495
2496
30
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
30
        return;
2499
30
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
1
        return;
2492
1
    }
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<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
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::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.53k
void ExecutorBase<ResultType, OperationType>::compare(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.53k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
5.05k
        return;
2492
5.05k
    }
2493
2494
1.47k
    const auto filtered = filter(results);
2495
2496
1.47k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
893
        return;
2499
893
    }
2500
2501
581
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.54k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
967
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
967
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
967
        const bool equal = *prev == *cur;
2510
2511
967
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
967
    }
2528
581
}
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.18k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
4.18k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
3.10k
        return;
2492
3.10k
    }
2493
2494
1.07k
    const auto filtered = filter(results);
2495
2496
1.07k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
845
        return;
2499
845
    }
2500
2501
228
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
608
    for (size_t i = 1; i < filtered.size(); i++) {
2506
380
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
380
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
380
        const bool equal = *prev == *cur;
2510
2511
380
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
380
    }
2528
228
}
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
380
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
380
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
79
        return;
2492
79
    }
2493
2494
301
    const auto filtered = filter(results);
2495
2496
301
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
301
        return;
2499
301
    }
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.96k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
5.96k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
3.12k
        return;
2492
3.12k
    }
2493
2494
2.84k
    const auto filtered = filter(results);
2495
2496
2.84k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.09k
        return;
2499
1.09k
    }
2500
2501
1.74k
    if ( dontCompare(operations[0].second) == true ) {
2502
664
        return;
2503
664
    }
2504
2505
3.15k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2.07k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2.07k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2.07k
        const bool equal = *prev == *cur;
2510
2511
2.07k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.07k
    }
2528
1.07k
}
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
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::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
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
22
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
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::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
181
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
181
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
19
        return;
2492
19
    }
2493
2494
162
    const auto filtered = filter(results);
2495
2496
162
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
162
        return;
2499
162
    }
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.41k
void ExecutorBase<ResultType, OperationType>::compare(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.41k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.61k
        return;
2492
1.61k
    }
2493
2494
1.80k
    const auto filtered = filter(results);
2495
2496
1.80k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
975
        return;
2499
975
    }
2500
2501
826
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2.35k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.52k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.52k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.52k
        const bool equal = *prev == *cur;
2510
2511
1.52k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
1.52k
    }
2528
826
}
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
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
16
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::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
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<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
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
10
        return;
2492
10
    }
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::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
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
16
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
596
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
596
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
211
        return;
2492
211
    }
2493
2494
385
    const auto filtered = filter(results);
2495
2496
385
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
331
        return;
2499
331
    }
2500
2501
54
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
155
    for (size_t i = 1; i < filtered.size(); i++) {
2506
101
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
101
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
101
        const bool equal = *prev == *cur;
2510
2511
101
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
101
    }
2528
54
}
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
728
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
728
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
307
        return;
2492
307
    }
2493
2494
421
    const auto filtered = filter(results);
2495
2496
421
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
418
        return;
2499
418
    }
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.69k
void ExecutorBase<ResultType, OperationType>::compare(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.69k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.59k
        return;
2492
1.59k
    }
2493
2494
1.10k
    const auto filtered = filter(results);
2495
2496
1.10k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.04k
        return;
2499
1.04k
    }
2500
2501
60
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
191
    for (size_t i = 1; i < filtered.size(); i++) {
2506
131
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
131
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
131
        const bool equal = *prev == *cur;
2510
2511
131
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
131
    }
2528
60
}
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
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::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.19k
void ExecutorBase<ResultType, OperationType>::compare(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.19k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.36k
        return;
2492
2.36k
    }
2493
2494
823
    const auto filtered = filter(results);
2495
2496
823
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
736
        return;
2499
736
    }
2500
2501
87
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
265
    for (size_t i = 1; i < filtered.size(); i++) {
2506
178
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
178
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
178
        const bool equal = *prev == *cur;
2510
2511
178
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
178
    }
2528
87
}
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
150
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
150
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
74
        return;
2492
74
    }
2493
2494
76
    const auto filtered = filter(results);
2495
2496
76
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
64
        return;
2499
64
    }
2500
2501
12
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
36
    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
12
}
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.36k
void ExecutorBase<ResultType, OperationType>::compare(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.36k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
4.22k
        return;
2492
4.22k
    }
2493
2494
1.14k
    const auto filtered = filter(results);
2495
2496
1.14k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.11k
        return;
2499
1.11k
    }
2500
2501
32
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
90
    for (size_t i = 1; i < filtered.size(); i++) {
2506
58
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
58
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
58
        const bool equal = *prev == *cur;
2510
2511
58
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
58
    }
2528
32
}
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
64
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
64
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
16
        return;
2492
16
    }
2493
2494
48
    const auto filtered = filter(results);
2495
2496
48
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
36
        return;
2499
36
    }
2500
2501
12
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
40
    for (size_t i = 1; i < filtered.size(); i++) {
2506
28
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
28
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
28
        const bool equal = *prev == *cur;
2510
2511
28
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
28
    }
2528
12
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.27k
void ExecutorBase<ResultType, OperationType>::compare(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.27k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
519
        return;
2492
519
    }
2493
2494
758
    const auto filtered = filter(results);
2495
2496
758
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
667
        return;
2499
667
    }
2500
2501
91
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
278
    for (size_t i = 1; i < filtered.size(); i++) {
2506
187
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
187
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
187
        const bool equal = *prev == *cur;
2510
2511
187
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
187
    }
2528
91
}
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.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
46.4k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
39.3k
        return;
2492
39.3k
    }
2493
2494
7.11k
    const auto filtered = filter(results);
2495
2496
7.11k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3.70k
        return;
2499
3.70k
    }
2500
2501
3.41k
    if ( dontCompare(operations[0].second) == true ) {
2502
163
        return;
2503
163
    }
2504
2505
9.03k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
5.78k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
5.78k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
5.78k
        const bool equal = *prev == *cur;
2510
2511
5.78k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.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.78k
    }
2528
3.24k
}
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
65
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
65
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
21
        return;
2492
21
    }
2493
2494
44
    const auto filtered = filter(results);
2495
2496
44
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
44
        return;
2499
44
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
350
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
350
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
141
        return;
2492
141
    }
2493
2494
209
    const auto filtered = filter(results);
2495
2496
209
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
209
        return;
2499
209
    }
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
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
3
        return;
2492
3
    }
2493
2494
20
    const auto filtered = filter(results);
2495
2496
20
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
20
        return;
2499
20
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
8
        return;
2492
8
    }
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::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
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<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
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<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
25
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
25
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
24
    const auto filtered = filter(results);
2495
2496
24
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
24
        return;
2499
24
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
22
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
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::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
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::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
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
3
        return;
2492
3
    }
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
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_MillerLoop>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
17
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
17
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
16
    const auto filtered = filter(results);
2495
2496
16
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
16
        return;
2499
16
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
17
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
17
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
16
    const auto filtered = filter(results);
2495
2496
16
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
16
        return;
2499
16
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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::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
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
16
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
40
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
40
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
13
        return;
2492
13
    }
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<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
34
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
34
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
9
        return;
2492
9
    }
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::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
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
22
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
21
    const auto filtered = filter(results);
2495
2496
21
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
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_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
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
21
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
32
        return;
2492
32
    }
2493
2494
39
    const auto filtered = filter(results);
2495
2496
39
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
39
        return;
2499
39
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
13
        return;
2492
13
    }
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_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
68
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
68
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
35
        return;
2492
35
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
33
        return;
2499
33
    }
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
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
19
        return;
2492
19
    }
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
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
22
        return;
2492
22
    }
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
61
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
61
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
28
        return;
2492
28
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
33
        return;
2499
33
    }
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
94
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
94
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
46
        return;
2492
46
    }
2493
2494
48
    const auto filtered = filter(results);
2495
2496
48
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
48
        return;
2499
48
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
25
        return;
2492
25
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
33
        return;
2499
33
    }
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
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
14
        return;
2492
14
    }
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::Buffer, cryptofuzz::operation::Misc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
16
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
16
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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
3
        return;
2492
3
    }
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
}
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
154k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
154k
    (void)parentDs;
2551
154k
    return op;
2552
154k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
1.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.14k
    (void)parentDs;
2551
1.14k
    return op;
2552
1.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
983
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
983
    (void)parentDs;
2551
983
    return op;
2552
983
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
198
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
198
    (void)parentDs;
2551
198
    return op;
2552
198
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
1.23k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.23k
    (void)parentDs;
2551
1.23k
    return op;
2552
1.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
4.09k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.09k
    (void)parentDs;
2551
4.09k
    return op;
2552
4.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
1.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.68k
    (void)parentDs;
2551
1.68k
    return op;
2552
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
251
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
251
    (void)parentDs;
2551
251
    return op;
2552
251
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
899
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
899
    (void)parentDs;
2551
899
    return op;
2552
899
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
251
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
251
    (void)parentDs;
2551
251
    return op;
2552
251
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
337
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
337
    (void)parentDs;
2551
337
    return op;
2552
337
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
290
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
290
    (void)parentDs;
2551
290
    return op;
2552
290
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
770
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
770
    (void)parentDs;
2551
770
    return op;
2552
770
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
29
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
29
    (void)parentDs;
2551
29
    return op;
2552
29
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
283
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
283
    (void)parentDs;
2551
283
    return op;
2552
283
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
299
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
299
    (void)parentDs;
2551
299
    return op;
2552
299
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
22
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
22
    (void)parentDs;
2551
22
    return op;
2552
22
}
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
352
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
352
    (void)parentDs;
2551
352
    return op;
2552
352
}
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
257
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
257
    (void)parentDs;
2551
257
    return op;
2552
257
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
9.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9.29k
    (void)parentDs;
2551
9.29k
    return op;
2552
9.29k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
6.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.22k
    (void)parentDs;
2551
6.22k
    return op;
2552
6.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
9.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9.31k
    (void)parentDs;
2551
9.31k
    return op;
2552
9.31k
}
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.6k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
11.6k
    (void)parentDs;
2551
11.6k
    return op;
2552
11.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
78
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
78
    (void)parentDs;
2551
78
    return op;
2552
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) 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::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) 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<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
716
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
716
    (void)parentDs;
2551
716
    return op;
2552
716
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
6.95k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6.95k
    (void)parentDs;
2551
6.95k
    return op;
2552
6.95k
}
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
63
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
63
    (void)parentDs;
2551
63
    return op;
2552
63
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
62
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
62
    (void)parentDs;
2551
62
    return op;
2552
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
79
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
79
    (void)parentDs;
2551
79
    return op;
2552
79
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
113
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
113
    (void)parentDs;
2551
113
    return op;
2552
113
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
98
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
98
    (void)parentDs;
2551
98
    return op;
2552
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
90
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
90
    (void)parentDs;
2551
90
    return op;
2552
90
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
66
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
66
    (void)parentDs;
2551
66
    return op;
2552
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
111
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
111
    (void)parentDs;
2551
111
    return op;
2552
111
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
1.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.53k
    (void)parentDs;
2551
1.53k
    return op;
2552
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
1.77k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.77k
    (void)parentDs;
2551
1.77k
    return op;
2552
1.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.83k
    (void)parentDs;
2551
1.83k
    return op;
2552
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
4.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.83k
    (void)parentDs;
2551
4.83k
    return op;
2552
4.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2549
78
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
78
    (void)parentDs;
2551
78
    return op;
2552
78
}
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.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.79k
    (void)parentDs;
2551
4.79k
    return op;
2552
4.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
316
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
316
    (void)parentDs;
2551
316
    return op;
2552
316
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
7.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.40k
    (void)parentDs;
2551
7.40k
    return op;
2552
7.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
173
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
173
    (void)parentDs;
2551
173
    return op;
2552
173
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
4.75k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.75k
    (void)parentDs;
2551
4.75k
    return op;
2552
4.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.92k
    (void)parentDs;
2551
2.92k
    return op;
2552
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
59.4k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
59.4k
    (void)parentDs;
2551
59.4k
    return op;
2552
59.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
167
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
167
    (void)parentDs;
2551
167
    return op;
2552
167
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
756
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
756
    (void)parentDs;
2551
756
    return op;
2552
756
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
82
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
82
    (void)parentDs;
2551
82
    return op;
2552
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) 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::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
79
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
79
    (void)parentDs;
2551
79
    return op;
2552
79
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
52
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
52
    (void)parentDs;
2551
52
    return op;
2552
52
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
140
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
140
    (void)parentDs;
2551
140
    return op;
2552
140
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) 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<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
129
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
129
    (void)parentDs;
2551
129
    return op;
2552
129
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
120
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
120
    (void)parentDs;
2551
120
    return op;
2552
120
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
80
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
80
    (void)parentDs;
2551
80
    return op;
2552
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
82
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
82
    (void)parentDs;
2551
82
    return op;
2552
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
91
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
91
    (void)parentDs;
2551
91
    return op;
2552
91
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) 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::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
82
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
82
    (void)parentDs;
2551
82
    return op;
2552
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
67
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
67
    (void)parentDs;
2551
67
    return op;
2552
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
78
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
78
    (void)parentDs;
2551
78
    return op;
2552
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
109
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
109
    (void)parentDs;
2551
109
    return op;
2552
109
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
110
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
110
    (void)parentDs;
2551
110
    return op;
2552
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
82
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
82
    (void)parentDs;
2551
82
    return op;
2552
82
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_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::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_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_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
79
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
79
    (void)parentDs;
2551
79
    return op;
2552
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
154
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
154
    (void)parentDs;
2551
154
    return op;
2552
154
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
106
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
106
    (void)parentDs;
2551
106
    return op;
2552
106
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
138
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
138
    (void)parentDs;
2551
138
    return op;
2552
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) 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
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
182
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
182
    (void)parentDs;
2551
182
    return op;
2552
182
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
143
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
143
    (void)parentDs;
2551
143
    return op;
2552
143
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
212
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
212
    (void)parentDs;
2551
212
    return op;
2552
212
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
139
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
139
    (void)parentDs;
2551
139
    return op;
2552
139
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
198
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
198
    (void)parentDs;
2551
198
    return op;
2552
198
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) 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<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) 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
}
2553
2554
13
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
13
    (void)parentDs;
2556
13
    op.modulo = modulo;
2557
13
    return op;
2558
13
}
2559
2560
18
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
18
    (void)parentDs;
2562
18
    op.modulo = modulo;
2563
18
    return op;
2564
18
}
2565
2566
10
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
10
    (void)parentDs;
2568
10
    op.modulo = modulo;
2569
10
    return op;
2570
10
}
2571
2572
6
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
6
    (void)parentDs;
2574
6
    op.modulo = modulo;
2575
6
    return op;
2576
6
}
2577
2578
21
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
21
    (void)parentDs;
2580
21
    op.modulo = modulo;
2581
21
    return op;
2582
21
}
2583
2584
15
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
15
    (void)parentDs;
2586
15
    op.modulo = modulo;
2587
15
    return op;
2588
15
}
2589
2590
7
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
7
    (void)parentDs;
2592
7
    op.modulo = modulo;
2593
7
    return op;
2594
7
}
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
10
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
10
    (void)parentDs;
2604
10
    op.modulo = modulo;
2605
10
    return op;
2606
10
}
2607
2608
13
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
13
    (void)parentDs;
2610
13
    op.modulo = modulo;
2611
13
    return op;
2612
13
}
2613
2614
19
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
19
    (void)parentDs;
2616
19
    op.modulo = modulo;
2617
19
    return op;
2618
19
}
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
10
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
10
    (void)parentDs;
2628
10
    op.modulo = modulo;
2629
10
    return op;
2630
10
}
2631
2632
10
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
10
    (void)parentDs;
2634
10
    op.modulo = modulo;
2635
10
    return op;
2636
10
}
2637
2638
16
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
16
    (void)parentDs;
2640
16
    op.modulo = modulo;
2641
16
    return op;
2642
16
}
2643
2644
16
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
16
    (void)parentDs;
2646
16
    op.modulo = modulo;
2647
16
    return op;
2648
16
}
2649
2650
12
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
12
    (void)parentDs;
2652
12
    op.modulo = modulo;
2653
12
    return op;
2654
12
}
2655
2656
16
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
16
    (void)parentDs;
2658
16
    op.modulo = modulo;
2659
16
    return op;
2660
16
}
2661
2662
14
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
14
    (void)parentDs;
2664
14
    op.modulo = modulo;
2665
14
    return op;
2666
14
}
2667
2668
13
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
13
    (void)parentDs;
2670
13
    op.modulo = modulo;
2671
13
    return op;
2672
13
}
2673
2674
15
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
15
    (void)parentDs;
2676
15
    op.modulo = modulo;
2677
15
    return op;
2678
15
}
2679
2680
12
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
12
    (void)parentDs;
2682
12
    op.modulo = modulo;
2683
12
    return op;
2684
12
}
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.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.14k
    Datasource ds(data, size);
2689
1.14k
    if ( parentDs != nullptr ) {
2690
1.14k
        auto modifier = parentDs->GetData(0);
2691
1.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
992
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
992
    Datasource ds(data, size);
2689
992
    if ( parentDs != nullptr ) {
2690
992
        auto modifier = parentDs->GetData(0);
2691
992
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
992
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
992
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
207
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
207
    Datasource ds(data, size);
2689
207
    if ( parentDs != nullptr ) {
2690
207
        auto modifier = parentDs->GetData(0);
2691
207
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
207
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
207
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.24k
    Datasource ds(data, size);
2689
1.24k
    if ( parentDs != nullptr ) {
2690
1.24k
        auto modifier = parentDs->GetData(0);
2691
1.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.10k
    Datasource ds(data, size);
2689
4.10k
    if ( parentDs != nullptr ) {
2690
4.10k
        auto modifier = parentDs->GetData(0);
2691
4.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.10k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.70k
    Datasource ds(data, size);
2689
1.70k
    if ( parentDs != nullptr ) {
2690
1.70k
        auto modifier = parentDs->GetData(0);
2691
1.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.70k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
262
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
262
    Datasource ds(data, size);
2689
262
    if ( parentDs != nullptr ) {
2690
262
        auto modifier = parentDs->GetData(0);
2691
262
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
262
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
262
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
910
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
910
    Datasource ds(data, size);
2689
910
    if ( parentDs != nullptr ) {
2690
910
        auto modifier = parentDs->GetData(0);
2691
910
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
910
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
910
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
260
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
260
    Datasource ds(data, size);
2689
260
    if ( parentDs != nullptr ) {
2690
260
        auto modifier = parentDs->GetData(0);
2691
260
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
260
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
260
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
347
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
347
    Datasource ds(data, size);
2689
347
    if ( parentDs != nullptr ) {
2690
347
        auto modifier = parentDs->GetData(0);
2691
347
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
347
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
347
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
299
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
299
    Datasource ds(data, size);
2689
299
    if ( parentDs != nullptr ) {
2690
299
        auto modifier = parentDs->GetData(0);
2691
299
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
299
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
299
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
782
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
782
    Datasource ds(data, size);
2689
782
    if ( parentDs != nullptr ) {
2690
782
        auto modifier = parentDs->GetData(0);
2691
782
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
782
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
782
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
34
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
34
    Datasource ds(data, size);
2689
34
    if ( parentDs != nullptr ) {
2690
34
        auto modifier = parentDs->GetData(0);
2691
34
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
34
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
34
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
295
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
295
    Datasource ds(data, size);
2689
295
    if ( parentDs != nullptr ) {
2690
295
        auto modifier = parentDs->GetData(0);
2691
295
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
295
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
295
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
309
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
309
    Datasource ds(data, size);
2689
309
    if ( parentDs != nullptr ) {
2690
309
        auto modifier = parentDs->GetData(0);
2691
309
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
309
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
309
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
27
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
27
    Datasource ds(data, size);
2689
27
    if ( parentDs != nullptr ) {
2690
27
        auto modifier = parentDs->GetData(0);
2691
27
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
27
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
27
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
333
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
333
    Datasource ds(data, size);
2689
333
    if ( parentDs != nullptr ) {
2690
333
        auto modifier = parentDs->GetData(0);
2691
333
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
333
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
333
}
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
362
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
362
    Datasource ds(data, size);
2689
362
    if ( parentDs != nullptr ) {
2690
362
        auto modifier = parentDs->GetData(0);
2691
362
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
362
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
362
}
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
267
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
267
    Datasource ds(data, size);
2689
267
    if ( parentDs != nullptr ) {
2690
267
        auto modifier = parentDs->GetData(0);
2691
267
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
267
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
267
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9.38k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9.38k
    Datasource ds(data, size);
2689
9.38k
    if ( parentDs != nullptr ) {
2690
9.38k
        auto modifier = parentDs->GetData(0);
2691
9.38k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9.38k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9.38k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6.30k
    Datasource ds(data, size);
2689
6.30k
    if ( parentDs != nullptr ) {
2690
6.30k
        auto modifier = parentDs->GetData(0);
2691
6.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6.30k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6.30k
}
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.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9.37k
    Datasource ds(data, size);
2689
9.37k
    if ( parentDs != nullptr ) {
2690
9.37k
        auto modifier = parentDs->GetData(0);
2691
9.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9.37k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9.37k
}
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.6k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
11.6k
    Datasource ds(data, size);
2689
11.6k
    if ( parentDs != nullptr ) {
2690
11.6k
        auto modifier = parentDs->GetData(0);
2691
11.6k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
11.6k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
11.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
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::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::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::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
82
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
82
    Datasource ds(data, size);
2689
82
    if ( parentDs != nullptr ) {
2690
82
        auto modifier = parentDs->GetData(0);
2691
82
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
82
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
82
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
789
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
789
    Datasource ds(data, size);
2689
789
    if ( parentDs != nullptr ) {
2690
789
        auto modifier = parentDs->GetData(0);
2691
789
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
789
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
789
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.03k
    Datasource ds(data, size);
2689
7.03k
    if ( parentDs != nullptr ) {
2690
7.03k
        auto modifier = parentDs->GetData(0);
2691
7.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.03k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.03k
}
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
67
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
67
    Datasource ds(data, size);
2689
67
    if ( parentDs != nullptr ) {
2690
67
        auto modifier = parentDs->GetData(0);
2691
67
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
67
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
67
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
70
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
70
    Datasource ds(data, size);
2689
70
    if ( parentDs != nullptr ) {
2690
70
        auto modifier = parentDs->GetData(0);
2691
70
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
70
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
70
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
83
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
83
    Datasource ds(data, size);
2689
83
    if ( parentDs != nullptr ) {
2690
83
        auto modifier = parentDs->GetData(0);
2691
83
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
83
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
83
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::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_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
106
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
106
    Datasource ds(data, size);
2689
106
    if ( parentDs != nullptr ) {
2690
106
        auto modifier = parentDs->GetData(0);
2691
106
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
106
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
106
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::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::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
79
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
79
    Datasource ds(data, size);
2689
79
    if ( parentDs != nullptr ) {
2690
79
        auto modifier = parentDs->GetData(0);
2691
79
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
79
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
118
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
118
    Datasource ds(data, size);
2689
118
    if ( parentDs != nullptr ) {
2690
118
        auto modifier = parentDs->GetData(0);
2691
118
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
118
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
118
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.60k
    Datasource ds(data, size);
2689
1.60k
    if ( parentDs != nullptr ) {
2690
1.60k
        auto modifier = parentDs->GetData(0);
2691
1.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.60k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.84k
    Datasource ds(data, size);
2689
1.84k
    if ( parentDs != nullptr ) {
2690
1.84k
        auto modifier = parentDs->GetData(0);
2691
1.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.84k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.91k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.91k
    Datasource ds(data, size);
2689
1.91k
    if ( parentDs != nullptr ) {
2690
1.91k
        auto modifier = parentDs->GetData(0);
2691
1.91k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.91k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.91k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.98k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.98k
    Datasource ds(data, size);
2689
4.98k
    if ( parentDs != nullptr ) {
2690
4.98k
        auto modifier = parentDs->GetData(0);
2691
4.98k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.98k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::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::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.92k
    Datasource ds(data, size);
2689
4.92k
    if ( parentDs != nullptr ) {
2690
4.92k
        auto modifier = parentDs->GetData(0);
2691
4.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.92k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
321
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
321
    Datasource ds(data, size);
2689
321
    if ( parentDs != nullptr ) {
2690
321
        auto modifier = parentDs->GetData(0);
2691
321
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
321
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
321
}
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.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.55k
    Datasource ds(data, size);
2689
7.55k
    if ( parentDs != nullptr ) {
2690
7.55k
        auto modifier = parentDs->GetData(0);
2691
7.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.55k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.55k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::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::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::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::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.05k
    Datasource ds(data, size);
2689
3.05k
    if ( parentDs != nullptr ) {
2690
3.05k
        auto modifier = parentDs->GetData(0);
2691
3.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.05k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
59.8k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
59.8k
    Datasource ds(data, size);
2689
59.8k
    if ( parentDs != nullptr ) {
2690
59.8k
        auto modifier = parentDs->GetData(0);
2691
59.8k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
59.8k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
59.8k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
177
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
177
    Datasource ds(data, size);
2689
177
    if ( parentDs != nullptr ) {
2690
177
        auto modifier = parentDs->GetData(0);
2691
177
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
177
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
177
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
771
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
771
    Datasource ds(data, size);
2689
771
    if ( parentDs != nullptr ) {
2690
771
        auto modifier = parentDs->GetData(0);
2691
771
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
771
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
771
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
88
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
88
    Datasource ds(data, size);
2689
88
    if ( parentDs != nullptr ) {
2690
88
        auto modifier = parentDs->GetData(0);
2691
88
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
88
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
88
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_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::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
88
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
88
    Datasource ds(data, size);
2689
88
    if ( parentDs != nullptr ) {
2690
88
        auto modifier = parentDs->GetData(0);
2691
88
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
88
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
88
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
61
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
61
    Datasource ds(data, size);
2689
61
    if ( parentDs != nullptr ) {
2690
61
        auto modifier = parentDs->GetData(0);
2691
61
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
61
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
61
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
206
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
206
    Datasource ds(data, size);
2689
206
    if ( parentDs != nullptr ) {
2690
206
        auto modifier = parentDs->GetData(0);
2691
206
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
206
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
206
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
162
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
162
    Datasource ds(data, size);
2689
162
    if ( parentDs != nullptr ) {
2690
162
        auto modifier = parentDs->GetData(0);
2691
162
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
162
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
172
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
172
    Datasource ds(data, size);
2689
172
    if ( parentDs != nullptr ) {
2690
172
        auto modifier = parentDs->GetData(0);
2691
172
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
172
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
172
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
170
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
170
    Datasource ds(data, size);
2689
170
    if ( parentDs != nullptr ) {
2690
170
        auto modifier = parentDs->GetData(0);
2691
170
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
170
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
170
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
89
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
89
    Datasource ds(data, size);
2689
89
    if ( parentDs != nullptr ) {
2690
89
        auto modifier = parentDs->GetData(0);
2691
89
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
89
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
89
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
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::Fp12, cryptofuzz::operation::BLS_FinalExp>::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::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::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::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
90
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
90
    Datasource ds(data, size);
2689
90
    if ( parentDs != nullptr ) {
2690
90
        auto modifier = parentDs->GetData(0);
2691
90
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
90
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
90
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
73
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
73
    Datasource ds(data, size);
2689
73
    if ( parentDs != nullptr ) {
2690
73
        auto modifier = parentDs->GetData(0);
2691
73
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
73
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
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<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
114
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
114
    Datasource ds(data, size);
2689
114
    if ( parentDs != nullptr ) {
2690
114
        auto modifier = parentDs->GetData(0);
2691
114
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
114
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
114
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
116
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
116
    Datasource ds(data, size);
2689
116
    if ( parentDs != nullptr ) {
2690
116
        auto modifier = parentDs->GetData(0);
2691
116
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
116
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
116
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
81
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
81
    Datasource ds(data, size);
2689
81
    if ( parentDs != nullptr ) {
2690
81
        auto modifier = parentDs->GetData(0);
2691
81
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
81
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::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::Bignum, cryptofuzz::operation::BLS_Compress_G1>::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::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
90
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
90
    Datasource ds(data, size);
2689
90
    if ( parentDs != nullptr ) {
2690
90
        auto modifier = parentDs->GetData(0);
2691
90
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
90
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
90
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::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::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
159
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
159
    Datasource ds(data, size);
2689
159
    if ( parentDs != nullptr ) {
2690
159
        auto modifier = parentDs->GetData(0);
2691
159
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
159
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
159
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
112
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
112
    Datasource ds(data, size);
2689
112
    if ( parentDs != nullptr ) {
2690
112
        auto modifier = parentDs->GetData(0);
2691
112
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
112
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
112
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
142
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
142
    Datasource ds(data, size);
2689
142
    if ( parentDs != nullptr ) {
2690
142
        auto modifier = parentDs->GetData(0);
2691
142
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
142
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
142
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::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::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
191
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
191
    Datasource ds(data, size);
2689
191
    if ( parentDs != nullptr ) {
2690
191
        auto modifier = parentDs->GetData(0);
2691
191
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
191
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
191
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::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<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
222
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
222
    Datasource ds(data, size);
2689
222
    if ( parentDs != nullptr ) {
2690
222
        auto modifier = parentDs->GetData(0);
2691
222
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
222
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
222
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::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_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
237
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
237
    Datasource ds(data, size);
2689
237
    if ( parentDs != nullptr ) {
2690
237
        auto modifier = parentDs->GetData(0);
2691
237
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
237
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
237
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
82
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
82
    Datasource ds(data, size);
2689
82
    if ( parentDs != nullptr ) {
2690
82
        auto modifier = parentDs->GetData(0);
2691
82
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
82
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
82
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
134
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
134
    Datasource ds(data, size);
2689
134
    if ( parentDs != nullptr ) {
2690
134
        auto modifier = parentDs->GetData(0);
2691
134
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
134
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
134
}
2696
2697
template <class ResultType, class OperationType>
2698
154k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
154k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
154k
    if ( options.forceModule != std::nullopt ) {
2703
153k
        moduleID = *options.forceModule;
2704
153k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
154k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
154k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
154k
    return modules.at(moduleID);
2716
154k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.14k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.14k
    if ( options.forceModule != std::nullopt ) {
2703
1.13k
        moduleID = *options.forceModule;
2704
1.13k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.14k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.14k
    return modules.at(moduleID);
2716
1.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
983
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
983
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
983
    if ( options.forceModule != std::nullopt ) {
2703
976
        moduleID = *options.forceModule;
2704
976
    }
2705
2706
    /* Skip if this is a disabled module */
2707
983
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
983
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
983
    return modules.at(moduleID);
2716
983
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
198
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
198
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
198
    if ( options.forceModule != std::nullopt ) {
2703
192
        moduleID = *options.forceModule;
2704
192
    }
2705
2706
    /* Skip if this is a disabled module */
2707
198
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
198
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
198
    return modules.at(moduleID);
2716
198
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.23k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.23k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.23k
    if ( options.forceModule != std::nullopt ) {
2703
1.23k
        moduleID = *options.forceModule;
2704
1.23k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.23k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.23k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.23k
    return modules.at(moduleID);
2716
1.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.09k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.09k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.09k
    if ( options.forceModule != std::nullopt ) {
2703
4.08k
        moduleID = *options.forceModule;
2704
4.08k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.09k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.09k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.09k
    return modules.at(moduleID);
2716
4.09k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.68k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.68k
    if ( options.forceModule != std::nullopt ) {
2703
1.67k
        moduleID = *options.forceModule;
2704
1.67k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.68k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.68k
    return modules.at(moduleID);
2716
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
251
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
251
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
251
    if ( options.forceModule != std::nullopt ) {
2703
246
        moduleID = *options.forceModule;
2704
246
    }
2705
2706
    /* Skip if this is a disabled module */
2707
251
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
251
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
251
    return modules.at(moduleID);
2716
251
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
899
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
899
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
899
    if ( options.forceModule != std::nullopt ) {
2703
895
        moduleID = *options.forceModule;
2704
895
    }
2705
2706
    /* Skip if this is a disabled module */
2707
899
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
899
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
899
    return modules.at(moduleID);
2716
899
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
251
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
251
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
251
    if ( options.forceModule != std::nullopt ) {
2703
245
        moduleID = *options.forceModule;
2704
245
    }
2705
2706
    /* Skip if this is a disabled module */
2707
251
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
251
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
251
    return modules.at(moduleID);
2716
251
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
337
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
337
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
337
    if ( options.forceModule != std::nullopt ) {
2703
332
        moduleID = *options.forceModule;
2704
332
    }
2705
2706
    /* Skip if this is a disabled module */
2707
337
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
337
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
337
    return modules.at(moduleID);
2716
337
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
290
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
290
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
290
    if ( options.forceModule != std::nullopt ) {
2703
285
        moduleID = *options.forceModule;
2704
285
    }
2705
2706
    /* Skip if this is a disabled module */
2707
290
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
290
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
290
    return modules.at(moduleID);
2716
290
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
770
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
770
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
770
    if ( options.forceModule != std::nullopt ) {
2703
766
        moduleID = *options.forceModule;
2704
766
    }
2705
2706
    /* Skip if this is a disabled module */
2707
770
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
770
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
770
    return modules.at(moduleID);
2716
770
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
29
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
29
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
29
    if ( options.forceModule != std::nullopt ) {
2703
27
        moduleID = *options.forceModule;
2704
27
    }
2705
2706
    /* Skip if this is a disabled module */
2707
29
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
29
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
29
    return modules.at(moduleID);
2716
29
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
283
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
283
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
283
    if ( options.forceModule != std::nullopt ) {
2703
275
        moduleID = *options.forceModule;
2704
275
    }
2705
2706
    /* Skip if this is a disabled module */
2707
283
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
283
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
283
    return modules.at(moduleID);
2716
283
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
299
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
299
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
299
    if ( options.forceModule != std::nullopt ) {
2703
294
        moduleID = *options.forceModule;
2704
294
    }
2705
2706
    /* Skip if this is a disabled module */
2707
299
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
299
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
299
    return modules.at(moduleID);
2716
299
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
22
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
22
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
22
    if ( options.forceModule != std::nullopt ) {
2703
20
        moduleID = *options.forceModule;
2704
20
    }
2705
2706
    /* Skip if this is a disabled module */
2707
22
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
22
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
22
    return modules.at(moduleID);
2716
22
}
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
315
        moduleID = *options.forceModule;
2704
315
    }
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
352
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
352
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
352
    if ( options.forceModule != std::nullopt ) {
2703
345
        moduleID = *options.forceModule;
2704
345
    }
2705
2706
    /* Skip if this is a disabled module */
2707
352
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
352
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
352
    return modules.at(moduleID);
2716
352
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
257
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
257
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
257
    if ( options.forceModule != std::nullopt ) {
2703
254
        moduleID = *options.forceModule;
2704
254
    }
2705
2706
    /* Skip if this is a disabled module */
2707
257
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
257
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
257
    return modules.at(moduleID);
2716
257
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
9.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
9.29k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
9.29k
    if ( options.forceModule != std::nullopt ) {
2703
9.22k
        moduleID = *options.forceModule;
2704
9.22k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
9.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
9.29k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
9.29k
    return modules.at(moduleID);
2716
9.29k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.22k
    if ( options.forceModule != std::nullopt ) {
2703
6.07k
        moduleID = *options.forceModule;
2704
6.07k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
6.22k
    return modules.at(moduleID);
2716
6.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
9.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
9.31k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
9.31k
    if ( options.forceModule != std::nullopt ) {
2703
9.23k
        moduleID = *options.forceModule;
2704
9.23k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
9.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
9.31k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
9.31k
    return modules.at(moduleID);
2716
9.31k
}
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.6k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
11.6k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
11.6k
    if ( options.forceModule != std::nullopt ) {
2703
11.5k
        moduleID = *options.forceModule;
2704
11.5k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
11.6k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
11.6k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
11.6k
    return modules.at(moduleID);
2716
11.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
78
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
78
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
78
    if ( options.forceModule != std::nullopt ) {
2703
74
        moduleID = *options.forceModule;
2704
74
    }
2705
2706
    /* Skip if this is a disabled module */
2707
78
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
78
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
78
    return modules.at(moduleID);
2716
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::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::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::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
71
        moduleID = *options.forceModule;
2704
71
    }
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<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
716
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
716
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
716
    if ( options.forceModule != std::nullopt ) {
2703
685
        moduleID = *options.forceModule;
2704
685
    }
2705
2706
    /* Skip if this is a disabled module */
2707
716
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
716
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
716
    return modules.at(moduleID);
2716
716
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6.95k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6.95k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6.95k
    if ( options.forceModule != std::nullopt ) {
2703
6.90k
        moduleID = *options.forceModule;
2704
6.90k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6.95k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6.95k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
6.95k
    return modules.at(moduleID);
2716
6.95k
}
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
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
59
        moduleID = *options.forceModule;
2704
59
    }
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<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
62
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
62
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
62
    if ( options.forceModule != std::nullopt ) {
2703
58
        moduleID = *options.forceModule;
2704
58
    }
2705
2706
    /* Skip if this is a disabled module */
2707
62
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
62
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
62
    return modules.at(moduleID);
2716
62
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
79
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
79
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
79
    if ( options.forceModule != std::nullopt ) {
2703
73
        moduleID = *options.forceModule;
2704
73
    }
2705
2706
    /* Skip if this is a disabled module */
2707
79
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
79
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
79
    return modules.at(moduleID);
2716
79
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
113
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
113
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
113
    if ( options.forceModule != std::nullopt ) {
2703
110
        moduleID = *options.forceModule;
2704
110
    }
2705
2706
    /* Skip if this is a disabled module */
2707
113
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
113
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
113
    return modules.at(moduleID);
2716
113
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
98
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
98
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
98
    if ( options.forceModule != std::nullopt ) {
2703
93
        moduleID = *options.forceModule;
2704
93
    }
2705
2706
    /* Skip if this is a disabled module */
2707
98
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
98
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
98
    return modules.at(moduleID);
2716
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
90
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
90
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
90
    if ( options.forceModule != std::nullopt ) {
2703
81
        moduleID = *options.forceModule;
2704
81
    }
2705
2706
    /* Skip if this is a disabled module */
2707
90
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
90
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
90
    return modules.at(moduleID);
2716
90
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
66
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
66
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
66
    if ( options.forceModule != std::nullopt ) {
2703
61
        moduleID = *options.forceModule;
2704
61
    }
2705
2706
    /* Skip if this is a disabled module */
2707
66
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
66
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
66
    return modules.at(moduleID);
2716
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
111
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
111
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
111
    if ( options.forceModule != std::nullopt ) {
2703
106
        moduleID = *options.forceModule;
2704
106
    }
2705
2706
    /* Skip if this is a disabled module */
2707
111
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
111
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
111
    return modules.at(moduleID);
2716
111
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.53k
    if ( options.forceModule != std::nullopt ) {
2703
1.50k
        moduleID = *options.forceModule;
2704
1.50k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.53k
    return modules.at(moduleID);
2716
1.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.77k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.77k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.77k
    if ( options.forceModule != std::nullopt ) {
2703
1.71k
        moduleID = *options.forceModule;
2704
1.71k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.77k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.77k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.77k
    return modules.at(moduleID);
2716
1.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.83k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.83k
    if ( options.forceModule != std::nullopt ) {
2703
1.77k
        moduleID = *options.forceModule;
2704
1.77k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.83k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.83k
    return modules.at(moduleID);
2716
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.83k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.83k
    if ( options.forceModule != std::nullopt ) {
2703
4.76k
        moduleID = *options.forceModule;
2704
4.76k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.83k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.83k
    return modules.at(moduleID);
2716
4.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
78
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
78
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
78
    if ( options.forceModule != std::nullopt ) {
2703
72
        moduleID = *options.forceModule;
2704
72
    }
2705
2706
    /* Skip if this is a disabled module */
2707
78
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
78
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
78
    return modules.at(moduleID);
2716
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.79k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.79k
    if ( options.forceModule != std::nullopt ) {
2703
4.75k
        moduleID = *options.forceModule;
2704
4.75k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.79k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.79k
    return modules.at(moduleID);
2716
4.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
316
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
316
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
316
    if ( options.forceModule != std::nullopt ) {
2703
312
        moduleID = *options.forceModule;
2704
312
    }
2705
2706
    /* Skip if this is a disabled module */
2707
316
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
316
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
316
    return modules.at(moduleID);
2716
316
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.40k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.40k
    if ( options.forceModule != std::nullopt ) {
2703
7.31k
        moduleID = *options.forceModule;
2704
7.31k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.40k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7.40k
    return modules.at(moduleID);
2716
7.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
173
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
173
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
173
    if ( options.forceModule != std::nullopt ) {
2703
168
        moduleID = *options.forceModule;
2704
168
    }
2705
2706
    /* Skip if this is a disabled module */
2707
173
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
173
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
173
    return modules.at(moduleID);
2716
173
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.75k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.75k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.75k
    if ( options.forceModule != std::nullopt ) {
2703
4.65k
        moduleID = *options.forceModule;
2704
4.65k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.75k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.75k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.75k
    return modules.at(moduleID);
2716
4.75k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.92k
    if ( options.forceModule != std::nullopt ) {
2703
2.85k
        moduleID = *options.forceModule;
2704
2.85k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.92k
    return modules.at(moduleID);
2716
2.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
59.7k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
59.7k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
59.7k
    if ( options.forceModule != std::nullopt ) {
2703
59.6k
        moduleID = *options.forceModule;
2704
59.6k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
59.7k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
59.7k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
59.7k
    return modules.at(moduleID);
2716
59.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
167
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
167
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
167
    if ( options.forceModule != std::nullopt ) {
2703
163
        moduleID = *options.forceModule;
2704
163
    }
2705
2706
    /* Skip if this is a disabled module */
2707
167
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
167
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
167
    return modules.at(moduleID);
2716
167
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
756
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
756
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
756
    if ( options.forceModule != std::nullopt ) {
2703
753
        moduleID = *options.forceModule;
2704
753
    }
2705
2706
    /* Skip if this is a disabled module */
2707
756
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
756
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
756
    return modules.at(moduleID);
2716
756
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
82
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
82
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
82
    if ( options.forceModule != std::nullopt ) {
2703
78
        moduleID = *options.forceModule;
2704
78
    }
2705
2706
    /* Skip if this is a disabled module */
2707
82
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
82
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
82
    return modules.at(moduleID);
2716
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::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
81
        moduleID = *options.forceModule;
2704
81
    }
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::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
79
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
79
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
79
    if ( options.forceModule != std::nullopt ) {
2703
75
        moduleID = *options.forceModule;
2704
75
    }
2705
2706
    /* Skip if this is a disabled module */
2707
79
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
79
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
79
    return modules.at(moduleID);
2716
79
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
52
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
52
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
52
    if ( options.forceModule != std::nullopt ) {
2703
49
        moduleID = *options.forceModule;
2704
49
    }
2705
2706
    /* Skip if this is a disabled module */
2707
52
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
52
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
52
    return modules.at(moduleID);
2716
52
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
140
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
140
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
140
    if ( options.forceModule != std::nullopt ) {
2703
125
        moduleID = *options.forceModule;
2704
125
    }
2705
2706
    /* Skip if this is a disabled module */
2707
140
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
140
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
140
    return modules.at(moduleID);
2716
140
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::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
113
        moduleID = *options.forceModule;
2704
113
    }
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<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
129
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
129
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
129
    if ( options.forceModule != std::nullopt ) {
2703
116
        moduleID = *options.forceModule;
2704
116
    }
2705
2706
    /* Skip if this is a disabled module */
2707
129
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
129
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
129
    return modules.at(moduleID);
2716
129
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
120
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
120
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
120
    if ( options.forceModule != std::nullopt ) {
2703
107
        moduleID = *options.forceModule;
2704
107
    }
2705
2706
    /* Skip if this is a disabled module */
2707
120
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
120
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
120
    return modules.at(moduleID);
2716
120
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
80
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
80
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
80
    if ( options.forceModule != std::nullopt ) {
2703
76
        moduleID = *options.forceModule;
2704
76
    }
2705
2706
    /* Skip if this is a disabled module */
2707
80
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
80
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
80
    return modules.at(moduleID);
2716
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
82
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
82
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
82
    if ( options.forceModule != std::nullopt ) {
2703
78
        moduleID = *options.forceModule;
2704
78
    }
2705
2706
    /* Skip if this is a disabled module */
2707
82
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
82
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
82
    return modules.at(moduleID);
2716
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
91
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
91
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
91
    if ( options.forceModule != std::nullopt ) {
2703
87
        moduleID = *options.forceModule;
2704
87
    }
2705
2706
    /* Skip if this is a disabled module */
2707
91
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
91
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
91
    return modules.at(moduleID);
2716
91
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::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::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
82
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
82
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
82
    if ( options.forceModule != std::nullopt ) {
2703
78
        moduleID = *options.forceModule;
2704
78
    }
2705
2706
    /* Skip if this is a disabled module */
2707
82
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
82
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
82
    return modules.at(moduleID);
2716
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
67
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
67
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
67
    if ( options.forceModule != std::nullopt ) {
2703
63
        moduleID = *options.forceModule;
2704
63
    }
2705
2706
    /* Skip if this is a disabled module */
2707
67
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
67
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
67
    return modules.at(moduleID);
2716
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
78
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
78
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
78
    if ( options.forceModule != std::nullopt ) {
2703
75
        moduleID = *options.forceModule;
2704
75
    }
2705
2706
    /* Skip if this is a disabled module */
2707
78
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
78
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
78
    return modules.at(moduleID);
2716
78
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
109
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
109
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
109
    if ( options.forceModule != std::nullopt ) {
2703
104
        moduleID = *options.forceModule;
2704
104
    }
2705
2706
    /* Skip if this is a disabled module */
2707
109
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
109
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
109
    return modules.at(moduleID);
2716
109
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
110
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
110
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
110
    if ( options.forceModule != std::nullopt ) {
2703
105
        moduleID = *options.forceModule;
2704
105
    }
2705
2706
    /* Skip if this is a disabled module */
2707
110
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
110
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
110
    return modules.at(moduleID);
2716
110
}
cryptofuzz::ExecutorBase<cryptofuzz::component::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
71
        moduleID = *options.forceModule;
2704
71
    }
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
82
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
82
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
82
    if ( options.forceModule != std::nullopt ) {
2703
78
        moduleID = *options.forceModule;
2704
78
    }
2705
2706
    /* Skip if this is a disabled module */
2707
82
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
82
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
82
    return modules.at(moduleID);
2716
82
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_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
75
        moduleID = *options.forceModule;
2704
75
    }
2705
2706
    /* Skip if this is a disabled module */
2707
81
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
81
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
81
    return modules.at(moduleID);
2716
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_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
80
        moduleID = *options.forceModule;
2704
80
    }
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_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
79
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
79
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
79
    if ( options.forceModule != std::nullopt ) {
2703
75
        moduleID = *options.forceModule;
2704
75
    }
2705
2706
    /* Skip if this is a disabled module */
2707
79
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
79
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
79
    return modules.at(moduleID);
2716
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
154
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
154
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
154
    if ( options.forceModule != std::nullopt ) {
2703
151
        moduleID = *options.forceModule;
2704
151
    }
2705
2706
    /* Skip if this is a disabled module */
2707
154
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
154
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
154
    return modules.at(moduleID);
2716
154
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
106
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
106
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
106
    if ( options.forceModule != std::nullopt ) {
2703
103
        moduleID = *options.forceModule;
2704
103
    }
2705
2706
    /* Skip if this is a disabled module */
2707
106
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
106
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
106
    return modules.at(moduleID);
2716
106
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
138
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
138
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
138
    if ( options.forceModule != std::nullopt ) {
2703
135
        moduleID = *options.forceModule;
2704
135
    }
2705
2706
    /* Skip if this is a disabled module */
2707
138
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
138
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
138
    return modules.at(moduleID);
2716
138
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::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
109
        moduleID = *options.forceModule;
2704
109
    }
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
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
182
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
182
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
182
    if ( options.forceModule != std::nullopt ) {
2703
179
        moduleID = *options.forceModule;
2704
179
    }
2705
2706
    /* Skip if this is a disabled module */
2707
182
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
182
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
182
    return modules.at(moduleID);
2716
182
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
143
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
143
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
143
    if ( options.forceModule != std::nullopt ) {
2703
138
        moduleID = *options.forceModule;
2704
138
    }
2705
2706
    /* Skip if this is a disabled module */
2707
143
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
143
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
143
    return modules.at(moduleID);
2716
143
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
212
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
212
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
212
    if ( options.forceModule != std::nullopt ) {
2703
206
        moduleID = *options.forceModule;
2704
206
    }
2705
2706
    /* Skip if this is a disabled module */
2707
212
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
212
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
212
    return modules.at(moduleID);
2716
212
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
139
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
139
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
139
    if ( options.forceModule != std::nullopt ) {
2703
134
        moduleID = *options.forceModule;
2704
134
    }
2705
2706
    /* Skip if this is a disabled module */
2707
139
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
139
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
139
    return modules.at(moduleID);
2716
139
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
198
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
198
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
198
    if ( options.forceModule != std::nullopt ) {
2703
177
        moduleID = *options.forceModule;
2704
177
    }
2705
2706
    /* Skip if this is a disabled module */
2707
198
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
198
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
198
    return modules.at(moduleID);
2716
198
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::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
73
        moduleID = *options.forceModule;
2704
73
    }
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<bool, cryptofuzz::operation::SR25519_Verify>::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
90
        moduleID = *options.forceModule;
2704
90
    }
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
}
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
1.98k
            break;
2736
1.98k
        }
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.9k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
96.9k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
96.9k
            moduleIDs.insert(moduleID);
2756
96.9k
        }
2757
2758
101k
        std::set<uint64_t> operationModuleIDs;
2759
146k
        for (const auto& op : operations) {
2760
146k
            operationModuleIDs.insert(op.first->ID);
2761
146k
        }
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
248k
    for (size_t i = 0; i < operations.size(); i++) {
2781
146k
        auto& operation = operations[i];
2782
2783
146k
        auto& module = operation.first;
2784
146k
        auto& op = operation.second;
2785
2786
146k
        if ( i > 0 ) {
2787
49.6k
            auto& prevModule = operations[i-1].first;
2788
49.6k
            auto& prevOp = operations[i-1].second;
2789
2790
49.6k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
16.8k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16.8k
                if ( curModifier.size() == 0 ) {
2793
4.41M
                    for (size_t j = 0; j < 512; j++) {
2794
4.40M
                        curModifier.push_back(1);
2795
4.40M
                    }
2796
8.60k
                } else {
2797
1.10M
                    for (auto& c : curModifier) {
2798
1.10M
                        c++;
2799
1.10M
                    }
2800
8.29k
                }
2801
16.8k
            }
2802
49.6k
        }
2803
2804
146k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
146k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
146k
        const auto& result = results.back();
2811
2812
146k
        if ( result.second != std::nullopt ) {
2813
48.8k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.8k
        }
2820
2821
146k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
146k
        if ( options.disableTests == false ) {
2830
146k
            tests::test(op, result.second);
2831
146k
        }
2832
2833
146k
        postprocess(module, op, result);
2834
146k
    }
2835
2836
101k
    if ( options.noCompare == false ) {
2837
96.9k
        compare(operations, results, data, size);
2838
96.9k
    }
2839
101k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
352
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
352
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
352
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.14k
    do {
2725
1.14k
        auto op = getOp(&parentDs, data, size);
2726
1.14k
        auto module = getModule(parentDs);
2727
1.14k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.14k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.14k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
1.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
352
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
352
#if 1
2745
352
    {
2746
352
        std::set<uint64_t> moduleIDs;
2747
352
        for (const auto& m : modules ) {
2748
328
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
328
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
328
            moduleIDs.insert(moduleID);
2756
328
        }
2757
2758
352
        std::set<uint64_t> operationModuleIDs;
2759
997
        for (const auto& op : operations) {
2760
997
            operationModuleIDs.insert(op.first->ID);
2761
997
        }
2762
2763
352
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
352
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
352
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
352
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
352
    }
2771
352
#endif
2772
2773
352
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
352
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.34k
    for (size_t i = 0; i < operations.size(); i++) {
2781
997
        auto& operation = operations[i];
2782
2783
997
        auto& module = operation.first;
2784
997
        auto& op = operation.second;
2785
2786
997
        if ( i > 0 ) {
2787
669
            auto& prevModule = operations[i-1].first;
2788
669
            auto& prevOp = operations[i-1].second;
2789
2790
669
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
291
                auto& curModifier = op.modifier.GetVectorPtr();
2792
291
                if ( curModifier.size() == 0 ) {
2793
115k
                    for (size_t j = 0; j < 512; j++) {
2794
115k
                        curModifier.push_back(1);
2795
115k
                    }
2796
225
                } else {
2797
18.5k
                    for (auto& c : curModifier) {
2798
18.5k
                        c++;
2799
18.5k
                    }
2800
66
                }
2801
291
            }
2802
669
        }
2803
2804
997
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
997
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
997
        const auto& result = results.back();
2811
2812
997
        if ( result.second != std::nullopt ) {
2813
761
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
761
        }
2820
2821
997
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
997
        if ( options.disableTests == false ) {
2830
997
            tests::test(op, result.second);
2831
997
        }
2832
2833
997
        postprocess(module, op, result);
2834
997
    }
2835
2836
352
    if ( options.noCompare == false ) {
2837
328
        compare(operations, results, data, size);
2838
328
    }
2839
352
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
221
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
221
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
221
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
992
    do {
2725
992
        auto op = getOp(&parentDs, data, size);
2726
992
        auto module = getModule(parentDs);
2727
992
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
992
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
992
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
992
    } while ( parentDs.Get<bool>() == true );
2738
2739
221
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
221
#if 1
2745
221
    {
2746
221
        std::set<uint64_t> moduleIDs;
2747
221
        for (const auto& m : modules ) {
2748
200
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
200
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
200
            moduleIDs.insert(moduleID);
2756
200
        }
2757
2758
221
        std::set<uint64_t> operationModuleIDs;
2759
866
        for (const auto& op : operations) {
2760
866
            operationModuleIDs.insert(op.first->ID);
2761
866
        }
2762
2763
221
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
221
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
221
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
221
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
221
    }
2771
221
#endif
2772
2773
221
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
221
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.08k
    for (size_t i = 0; i < operations.size(); i++) {
2781
866
        auto& operation = operations[i];
2782
2783
866
        auto& module = operation.first;
2784
866
        auto& op = operation.second;
2785
2786
866
        if ( i > 0 ) {
2787
666
            auto& prevModule = operations[i-1].first;
2788
666
            auto& prevOp = operations[i-1].second;
2789
2790
666
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
268
                auto& curModifier = op.modifier.GetVectorPtr();
2792
268
                if ( curModifier.size() == 0 ) {
2793
107k
                    for (size_t j = 0; j < 512; j++) {
2794
107k
                        curModifier.push_back(1);
2795
107k
                    }
2796
209
                } else {
2797
2.24k
                    for (auto& c : curModifier) {
2798
2.24k
                        c++;
2799
2.24k
                    }
2800
59
                }
2801
268
            }
2802
666
        }
2803
2804
866
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
866
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
866
        const auto& result = results.back();
2811
2812
866
        if ( result.second != std::nullopt ) {
2813
387
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
387
        }
2820
2821
866
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
866
        if ( options.disableTests == false ) {
2830
866
            tests::test(op, result.second);
2831
866
        }
2832
2833
866
        postprocess(module, op, result);
2834
866
    }
2835
2836
221
    if ( options.noCompare == false ) {
2837
200
        compare(operations, results, data, size);
2838
200
    }
2839
221
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::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
207
    do {
2725
207
        auto op = getOp(&parentDs, data, size);
2726
207
        auto module = getModule(parentDs);
2727
207
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
207
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
207
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
207
    } 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
22
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
22
            moduleIDs.insert(moduleID);
2756
22
        }
2757
2758
45
        std::set<uint64_t> operationModuleIDs;
2759
122
        for (const auto& op : operations) {
2760
122
            operationModuleIDs.insert(op.first->ID);
2761
122
        }
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
167
    for (size_t i = 0; i < operations.size(); i++) {
2781
122
        auto& operation = operations[i];
2782
2783
122
        auto& module = operation.first;
2784
122
        auto& op = operation.second;
2785
2786
122
        if ( i > 0 ) {
2787
100
            auto& prevModule = operations[i-1].first;
2788
100
            auto& prevOp = operations[i-1].second;
2789
2790
100
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
53
                auto& curModifier = op.modifier.GetVectorPtr();
2792
53
                if ( curModifier.size() == 0 ) {
2793
18.4k
                    for (size_t j = 0; j < 512; j++) {
2794
18.4k
                        curModifier.push_back(1);
2795
18.4k
                    }
2796
36
                } else {
2797
1.10k
                    for (auto& c : curModifier) {
2798
1.10k
                        c++;
2799
1.10k
                    }
2800
17
                }
2801
53
            }
2802
100
        }
2803
2804
122
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
122
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
122
        const auto& result = results.back();
2811
2812
122
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
122
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
122
        if ( options.disableTests == false ) {
2830
122
            tests::test(op, result.second);
2831
122
        }
2832
2833
122
        postprocess(module, op, result);
2834
122
    }
2835
2836
45
    if ( options.noCompare == false ) {
2837
22
        compare(operations, results, data, size);
2838
22
    }
2839
45
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
509
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
509
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
509
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.24k
    do {
2725
1.24k
        auto op = getOp(&parentDs, data, size);
2726
1.24k
        auto module = getModule(parentDs);
2727
1.24k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.24k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.24k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
1.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
509
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
509
#if 1
2745
509
    {
2746
509
        std::set<uint64_t> moduleIDs;
2747
509
        for (const auto& m : modules ) {
2748
488
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
488
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
488
            moduleIDs.insert(moduleID);
2756
488
        }
2757
2758
509
        std::set<uint64_t> operationModuleIDs;
2759
1.14k
        for (const auto& op : operations) {
2760
1.14k
            operationModuleIDs.insert(op.first->ID);
2761
1.14k
        }
2762
2763
509
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
509
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
509
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
509
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
509
    }
2771
509
#endif
2772
2773
509
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
509
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.65k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.14k
        auto& operation = operations[i];
2782
2783
1.14k
        auto& module = operation.first;
2784
1.14k
        auto& op = operation.second;
2785
2786
1.14k
        if ( i > 0 ) {
2787
661
            auto& prevModule = operations[i-1].first;
2788
661
            auto& prevOp = operations[i-1].second;
2789
2790
661
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
328
                auto& curModifier = op.modifier.GetVectorPtr();
2792
328
                if ( curModifier.size() == 0 ) {
2793
136k
                    for (size_t j = 0; j < 512; j++) {
2794
136k
                        curModifier.push_back(1);
2795
136k
                    }
2796
266
                } else {
2797
2.46k
                    for (auto& c : curModifier) {
2798
2.46k
                        c++;
2799
2.46k
                    }
2800
62
                }
2801
328
            }
2802
661
        }
2803
2804
1.14k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.14k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.14k
        const auto& result = results.back();
2811
2812
1.14k
        if ( result.second != std::nullopt ) {
2813
245
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
245
        }
2820
2821
1.14k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.14k
        if ( options.disableTests == false ) {
2830
1.14k
            tests::test(op, result.second);
2831
1.14k
        }
2832
2833
1.14k
        postprocess(module, op, result);
2834
1.14k
    }
2835
2836
509
    if ( options.noCompare == false ) {
2837
488
        compare(operations, results, data, size);
2838
488
    }
2839
509
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.49k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.49k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.49k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.10k
    do {
2725
4.10k
        auto op = getOp(&parentDs, data, size);
2726
4.10k
        auto module = getModule(parentDs);
2727
4.10k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.10k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.10k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
4.10k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.49k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.49k
#if 1
2745
1.49k
    {
2746
1.49k
        std::set<uint64_t> moduleIDs;
2747
1.49k
        for (const auto& m : modules ) {
2748
1.46k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.46k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.46k
            moduleIDs.insert(moduleID);
2756
1.46k
        }
2757
2758
1.49k
        std::set<uint64_t> operationModuleIDs;
2759
3.98k
        for (const auto& op : operations) {
2760
3.98k
            operationModuleIDs.insert(op.first->ID);
2761
3.98k
        }
2762
2763
1.49k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.49k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.49k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.49k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.49k
    }
2771
1.49k
#endif
2772
2773
1.49k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.49k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5.47k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.98k
        auto& operation = operations[i];
2782
2783
3.98k
        auto& module = operation.first;
2784
3.98k
        auto& op = operation.second;
2785
2786
3.98k
        if ( i > 0 ) {
2787
2.51k
            auto& prevModule = operations[i-1].first;
2788
2.51k
            auto& prevOp = operations[i-1].second;
2789
2790
2.51k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.03k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.03k
                if ( curModifier.size() == 0 ) {
2793
420k
                    for (size_t j = 0; j < 512; j++) {
2794
419k
                        curModifier.push_back(1);
2795
419k
                    }
2796
819
                } else {
2797
3.38k
                    for (auto& c : curModifier) {
2798
3.38k
                        c++;
2799
3.38k
                    }
2800
215
                }
2801
1.03k
            }
2802
2.51k
        }
2803
2804
3.98k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.98k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.98k
        const auto& result = results.back();
2811
2812
3.98k
        if ( result.second != std::nullopt ) {
2813
1.69k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.69k
        }
2820
2821
3.98k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3.98k
        if ( options.disableTests == false ) {
2830
3.98k
            tests::test(op, result.second);
2831
3.98k
        }
2832
2833
3.98k
        postprocess(module, op, result);
2834
3.98k
    }
2835
2836
1.49k
    if ( options.noCompare == false ) {
2837
1.46k
        compare(operations, results, data, size);
2838
1.46k
    }
2839
1.49k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
690
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
690
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
690
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.70k
    do {
2725
1.70k
        auto op = getOp(&parentDs, data, size);
2726
1.70k
        auto module = getModule(parentDs);
2727
1.70k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.70k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.70k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
1.70k
    } while ( parentDs.Get<bool>() == true );
2738
2739
690
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
690
#if 1
2745
690
    {
2746
690
        std::set<uint64_t> moduleIDs;
2747
690
        for (const auto& m : modules ) {
2748
655
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
655
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
655
            moduleIDs.insert(moduleID);
2756
655
        }
2757
2758
690
        std::set<uint64_t> operationModuleIDs;
2759
1.58k
        for (const auto& op : operations) {
2760
1.58k
            operationModuleIDs.insert(op.first->ID);
2761
1.58k
        }
2762
2763
690
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
690
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
690
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
690
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
690
    }
2771
690
#endif
2772
2773
690
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
690
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.27k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.58k
        auto& operation = operations[i];
2782
2783
1.58k
        auto& module = operation.first;
2784
1.58k
        auto& op = operation.second;
2785
2786
1.58k
        if ( i > 0 ) {
2787
927
            auto& prevModule = operations[i-1].first;
2788
927
            auto& prevOp = operations[i-1].second;
2789
2790
927
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
434
                auto& curModifier = op.modifier.GetVectorPtr();
2792
434
                if ( curModifier.size() == 0 ) {
2793
176k
                    for (size_t j = 0; j < 512; j++) {
2794
176k
                        curModifier.push_back(1);
2795
176k
                    }
2796
345
                } else {
2797
3.51k
                    for (auto& c : curModifier) {
2798
3.51k
                        c++;
2799
3.51k
                    }
2800
89
                }
2801
434
            }
2802
927
        }
2803
2804
1.58k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.58k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.58k
        const auto& result = results.back();
2811
2812
1.58k
        if ( result.second != std::nullopt ) {
2813
255
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
255
        }
2820
2821
1.58k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.58k
        if ( options.disableTests == false ) {
2830
1.58k
            tests::test(op, result.second);
2831
1.58k
        }
2832
2833
1.58k
        postprocess(module, op, result);
2834
1.58k
    }
2835
2836
690
    if ( options.noCompare == false ) {
2837
655
        compare(operations, results, data, size);
2838
655
    }
2839
690
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
49
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
49
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
49
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
262
    do {
2725
262
        auto op = getOp(&parentDs, data, size);
2726
262
        auto module = getModule(parentDs);
2727
262
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
262
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
262
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
262
    } while ( parentDs.Get<bool>() == true );
2738
2739
49
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
49
#if 1
2745
49
    {
2746
49
        std::set<uint64_t> moduleIDs;
2747
49
        for (const auto& m : modules ) {
2748
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
49
        std::set<uint64_t> operationModuleIDs;
2759
164
        for (const auto& op : operations) {
2760
164
            operationModuleIDs.insert(op.first->ID);
2761
164
        }
2762
2763
49
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
49
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
49
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
49
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
49
    }
2771
49
#endif
2772
2773
49
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
49
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
213
    for (size_t i = 0; i < operations.size(); i++) {
2781
164
        auto& operation = operations[i];
2782
2783
164
        auto& module = operation.first;
2784
164
        auto& op = operation.second;
2785
2786
164
        if ( i > 0 ) {
2787
138
            auto& prevModule = operations[i-1].first;
2788
138
            auto& prevOp = operations[i-1].second;
2789
2790
138
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
70
                auto& curModifier = op.modifier.GetVectorPtr();
2792
70
                if ( curModifier.size() == 0 ) {
2793
23.5k
                    for (size_t j = 0; j < 512; j++) {
2794
23.5k
                        curModifier.push_back(1);
2795
23.5k
                    }
2796
46
                } else {
2797
256
                    for (auto& c : curModifier) {
2798
256
                        c++;
2799
256
                    }
2800
24
                }
2801
70
            }
2802
138
        }
2803
2804
164
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
164
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
164
        const auto& result = results.back();
2811
2812
164
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
164
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
164
        if ( options.disableTests == false ) {
2830
164
            tests::test(op, result.second);
2831
164
        }
2832
2833
164
        postprocess(module, op, result);
2834
164
    }
2835
2836
49
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
49
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
318
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
318
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
318
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
910
    do {
2725
910
        auto op = getOp(&parentDs, data, size);
2726
910
        auto module = getModule(parentDs);
2727
910
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
910
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
910
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
910
    } while ( parentDs.Get<bool>() == true );
2738
2739
318
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
318
#if 1
2745
318
    {
2746
318
        std::set<uint64_t> moduleIDs;
2747
318
        for (const auto& m : modules ) {
2748
296
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
296
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
296
            moduleIDs.insert(moduleID);
2756
296
        }
2757
2758
318
        std::set<uint64_t> operationModuleIDs;
2759
799
        for (const auto& op : operations) {
2760
799
            operationModuleIDs.insert(op.first->ID);
2761
799
        }
2762
2763
318
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
318
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
318
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
318
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
318
    }
2771
318
#endif
2772
2773
318
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
318
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.11k
    for (size_t i = 0; i < operations.size(); i++) {
2781
799
        auto& operation = operations[i];
2782
2783
799
        auto& module = operation.first;
2784
799
        auto& op = operation.second;
2785
2786
799
        if ( i > 0 ) {
2787
503
            auto& prevModule = operations[i-1].first;
2788
503
            auto& prevOp = operations[i-1].second;
2789
2790
503
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
252
                auto& curModifier = op.modifier.GetVectorPtr();
2792
252
                if ( curModifier.size() == 0 ) {
2793
109k
                    for (size_t j = 0; j < 512; j++) {
2794
109k
                        curModifier.push_back(1);
2795
109k
                    }
2796
214
                } else {
2797
1.05k
                    for (auto& c : curModifier) {
2798
1.05k
                        c++;
2799
1.05k
                    }
2800
38
                }
2801
252
            }
2802
503
        }
2803
2804
799
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
799
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
799
        const auto& result = results.back();
2811
2812
799
        if ( result.second != std::nullopt ) {
2813
340
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
340
        }
2820
2821
799
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
799
        if ( options.disableTests == false ) {
2830
799
            tests::test(op, result.second);
2831
799
        }
2832
2833
799
        postprocess(module, op, result);
2834
799
    }
2835
2836
318
    if ( options.noCompare == false ) {
2837
296
        compare(operations, results, data, size);
2838
296
    }
2839
318
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
50
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
50
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
50
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
260
    do {
2725
260
        auto op = getOp(&parentDs, data, size);
2726
260
        auto module = getModule(parentDs);
2727
260
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
260
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
260
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
260
    } 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
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
50
        std::set<uint64_t> operationModuleIDs;
2759
159
        for (const auto& op : operations) {
2760
159
            operationModuleIDs.insert(op.first->ID);
2761
159
        }
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
209
    for (size_t i = 0; i < operations.size(); i++) {
2781
159
        auto& operation = operations[i];
2782
2783
159
        auto& module = operation.first;
2784
159
        auto& op = operation.second;
2785
2786
159
        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
62
                auto& curModifier = op.modifier.GetVectorPtr();
2792
62
                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
229
                    for (auto& c : curModifier) {
2798
229
                        c++;
2799
229
                    }
2800
21
                }
2801
62
            }
2802
132
        }
2803
2804
159
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
159
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
159
        const auto& result = results.back();
2811
2812
159
        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
159
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
159
        if ( options.disableTests == false ) {
2830
159
            tests::test(op, result.second);
2831
159
        }
2832
2833
159
        postprocess(module, op, result);
2834
159
    }
2835
2836
50
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::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
347
    do {
2725
347
        auto op = getOp(&parentDs, data, size);
2726
347
        auto module = getModule(parentDs);
2727
347
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
347
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
347
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
347
    } 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
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
52
        std::set<uint64_t> operationModuleIDs;
2759
211
        for (const auto& op : operations) {
2760
211
            operationModuleIDs.insert(op.first->ID);
2761
211
        }
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
263
    for (size_t i = 0; i < operations.size(); i++) {
2781
211
        auto& operation = operations[i];
2782
2783
211
        auto& module = operation.first;
2784
211
        auto& op = operation.second;
2785
2786
211
        if ( i > 0 ) {
2787
180
            auto& prevModule = operations[i-1].first;
2788
180
            auto& prevOp = operations[i-1].second;
2789
2790
180
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
81
                auto& curModifier = op.modifier.GetVectorPtr();
2792
81
                if ( curModifier.size() == 0 ) {
2793
24.6k
                    for (size_t j = 0; j < 512; j++) {
2794
24.5k
                        curModifier.push_back(1);
2795
24.5k
                    }
2796
48
                } else {
2797
3.24k
                    for (auto& c : curModifier) {
2798
3.24k
                        c++;
2799
3.24k
                    }
2800
33
                }
2801
81
            }
2802
180
        }
2803
2804
211
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
211
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
211
        const auto& result = results.back();
2811
2812
211
        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
211
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
211
        if ( options.disableTests == false ) {
2830
211
            tests::test(op, result.second);
2831
211
        }
2832
2833
211
        postprocess(module, op, result);
2834
211
    }
2835
2836
52
    if ( options.noCompare == false ) {
2837
31
        compare(operations, results, data, size);
2838
31
    }
2839
52
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::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
299
    do {
2725
299
        auto op = getOp(&parentDs, data, size);
2726
299
        auto module = getModule(parentDs);
2727
299
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
299
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
299
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
299
    } 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
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
51
        std::set<uint64_t> operationModuleIDs;
2759
186
        for (const auto& op : operations) {
2760
186
            operationModuleIDs.insert(op.first->ID);
2761
186
        }
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
237
    for (size_t i = 0; i < operations.size(); i++) {
2781
186
        auto& operation = operations[i];
2782
2783
186
        auto& module = operation.first;
2784
186
        auto& op = operation.second;
2785
2786
186
        if ( i > 0 ) {
2787
158
            auto& prevModule = operations[i-1].first;
2788
158
            auto& prevOp = operations[i-1].second;
2789
2790
158
            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
246
                    for (auto& c : curModifier) {
2798
246
                        c++;
2799
246
                    }
2800
18
                }
2801
75
            }
2802
158
        }
2803
2804
186
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
186
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
186
        const auto& result = results.back();
2811
2812
186
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
186
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
186
        if ( options.disableTests == false ) {
2830
186
            tests::test(op, result.second);
2831
186
        }
2832
2833
186
        postprocess(module, op, result);
2834
186
    }
2835
2836
51
    if ( options.noCompare == false ) {
2837
28
        compare(operations, results, data, size);
2838
28
    }
2839
51
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
228
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
228
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
228
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
782
    do {
2725
782
        auto op = getOp(&parentDs, data, size);
2726
782
        auto module = getModule(parentDs);
2727
782
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
782
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
782
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
782
    } while ( parentDs.Get<bool>() == true );
2738
2739
228
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
228
#if 1
2745
228
    {
2746
228
        std::set<uint64_t> moduleIDs;
2747
228
        for (const auto& m : modules ) {
2748
201
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
201
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
201
            moduleIDs.insert(moduleID);
2756
201
        }
2757
2758
228
        std::set<uint64_t> operationModuleIDs;
2759
601
        for (const auto& op : operations) {
2760
601
            operationModuleIDs.insert(op.first->ID);
2761
601
        }
2762
2763
228
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
228
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
228
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
228
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
228
    }
2771
228
#endif
2772
2773
228
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
228
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
829
    for (size_t i = 0; i < operations.size(); i++) {
2781
601
        auto& operation = operations[i];
2782
2783
601
        auto& module = operation.first;
2784
601
        auto& op = operation.second;
2785
2786
601
        if ( i > 0 ) {
2787
400
            auto& prevModule = operations[i-1].first;
2788
400
            auto& prevOp = operations[i-1].second;
2789
2790
400
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
192
                auto& curModifier = op.modifier.GetVectorPtr();
2792
192
                if ( curModifier.size() == 0 ) {
2793
86.1k
                    for (size_t j = 0; j < 512; j++) {
2794
86.0k
                        curModifier.push_back(1);
2795
86.0k
                    }
2796
168
                } else {
2797
3.79k
                    for (auto& c : curModifier) {
2798
3.79k
                        c++;
2799
3.79k
                    }
2800
24
                }
2801
192
            }
2802
400
        }
2803
2804
601
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
601
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
601
        const auto& result = results.back();
2811
2812
601
        if ( result.second != std::nullopt ) {
2813
432
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
432
        }
2820
2821
601
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
601
        if ( options.disableTests == false ) {
2830
601
            tests::test(op, result.second);
2831
601
        }
2832
2833
601
        postprocess(module, op, result);
2834
601
    }
2835
2836
228
    if ( options.noCompare == false ) {
2837
201
        compare(operations, results, data, size);
2838
201
    }
2839
228
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
20
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
20
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
20
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
34
    do {
2725
34
        auto op = getOp(&parentDs, data, size);
2726
34
        auto module = getModule(parentDs);
2727
34
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
34
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
34
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
34
    } while ( parentDs.Get<bool>() == true );
2738
2739
20
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
20
#if 1
2745
20
    {
2746
20
        std::set<uint64_t> moduleIDs;
2747
20
        for (const auto& m : modules ) {
2748
11
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
11
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
11
            moduleIDs.insert(moduleID);
2756
11
        }
2757
2758
20
        std::set<uint64_t> operationModuleIDs;
2759
22
        for (const auto& op : operations) {
2760
22
            operationModuleIDs.insert(op.first->ID);
2761
22
        }
2762
2763
20
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
20
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
20
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
20
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
20
    }
2771
20
#endif
2772
2773
20
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
20
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
42
    for (size_t i = 0; i < operations.size(); i++) {
2781
22
        auto& operation = operations[i];
2782
2783
22
        auto& module = operation.first;
2784
22
        auto& op = operation.second;
2785
2786
22
        if ( i > 0 ) {
2787
11
            auto& prevModule = operations[i-1].first;
2788
11
            auto& prevOp = operations[i-1].second;
2789
2790
11
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
8
                auto& curModifier = op.modifier.GetVectorPtr();
2792
8
                if ( curModifier.size() == 0 ) {
2793
513
                    for (size_t j = 0; j < 512; j++) {
2794
512
                        curModifier.push_back(1);
2795
512
                    }
2796
7
                } else {
2797
241
                    for (auto& c : curModifier) {
2798
241
                        c++;
2799
241
                    }
2800
7
                }
2801
8
            }
2802
11
        }
2803
2804
22
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
22
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
22
        const auto& result = results.back();
2811
2812
22
        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
22
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
22
        if ( options.disableTests == false ) {
2830
22
            tests::test(op, result.second);
2831
22
        }
2832
2833
22
        postprocess(module, op, result);
2834
22
    }
2835
2836
20
    if ( options.noCompare == false ) {
2837
11
        compare(operations, results, data, size);
2838
11
    }
2839
20
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
56
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
56
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
56
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
295
    do {
2725
295
        auto op = getOp(&parentDs, data, size);
2726
295
        auto module = getModule(parentDs);
2727
295
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
295
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
295
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
295
    } while ( parentDs.Get<bool>() == true );
2738
2739
56
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
56
#if 1
2745
56
    {
2746
56
        std::set<uint64_t> moduleIDs;
2747
56
        for (const auto& m : modules ) {
2748
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
56
        std::set<uint64_t> operationModuleIDs;
2759
186
        for (const auto& op : operations) {
2760
186
            operationModuleIDs.insert(op.first->ID);
2761
186
        }
2762
2763
56
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
56
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
56
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
56
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
56
    }
2771
56
#endif
2772
2773
56
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
56
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
242
    for (size_t i = 0; i < operations.size(); i++) {
2781
186
        auto& operation = operations[i];
2782
2783
186
        auto& module = operation.first;
2784
186
        auto& op = operation.second;
2785
2786
186
        if ( i > 0 ) {
2787
156
            auto& prevModule = operations[i-1].first;
2788
156
            auto& prevOp = operations[i-1].second;
2789
2790
156
            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
241
                    for (auto& c : curModifier) {
2798
241
                        c++;
2799
241
                    }
2800
27
                }
2801
77
            }
2802
156
        }
2803
2804
186
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
186
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
186
        const auto& result = results.back();
2811
2812
186
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
186
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
186
        if ( options.disableTests == false ) {
2830
186
            tests::test(op, result.second);
2831
186
        }
2832
2833
186
        postprocess(module, op, result);
2834
186
    }
2835
2836
56
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
56
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::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
309
    do {
2725
309
        auto op = getOp(&parentDs, data, size);
2726
309
        auto module = getModule(parentDs);
2727
309
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
309
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
309
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
309
    } 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
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
51
        std::set<uint64_t> operationModuleIDs;
2759
165
        for (const auto& op : operations) {
2760
165
            operationModuleIDs.insert(op.first->ID);
2761
165
        }
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
216
    for (size_t i = 0; i < operations.size(); i++) {
2781
165
        auto& operation = operations[i];
2782
2783
165
        auto& module = operation.first;
2784
165
        auto& op = operation.second;
2785
2786
165
        if ( i > 0 ) {
2787
138
            auto& prevModule = operations[i-1].first;
2788
138
            auto& prevOp = operations[i-1].second;
2789
2790
138
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
71
                auto& curModifier = op.modifier.GetVectorPtr();
2792
71
                if ( curModifier.size() == 0 ) {
2793
26.1k
                    for (size_t j = 0; j < 512; j++) {
2794
26.1k
                        curModifier.push_back(1);
2795
26.1k
                    }
2796
51
                } else {
2797
275
                    for (auto& c : curModifier) {
2798
275
                        c++;
2799
275
                    }
2800
20
                }
2801
71
            }
2802
138
        }
2803
2804
165
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
165
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
165
        const auto& result = results.back();
2811
2812
165
        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
165
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
165
        if ( options.disableTests == false ) {
2830
165
            tests::test(op, result.second);
2831
165
        }
2832
2833
165
        postprocess(module, op, result);
2834
165
    }
2835
2836
51
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
51
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
17
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
17
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
17
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
27
    do {
2725
27
        auto op = getOp(&parentDs, data, size);
2726
27
        auto module = getModule(parentDs);
2727
27
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
27
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
27
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
8
            break;
2736
8
        }
2737
27
    } while ( parentDs.Get<bool>() == true );
2738
2739
17
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
17
#if 1
2745
17
    {
2746
17
        std::set<uint64_t> moduleIDs;
2747
17
        for (const auto& m : modules ) {
2748
9
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
9
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
9
            moduleIDs.insert(moduleID);
2756
9
        }
2757
2758
17
        std::set<uint64_t> operationModuleIDs;
2759
17
        for (const auto& op : operations) {
2760
17
            operationModuleIDs.insert(op.first->ID);
2761
17
        }
2762
2763
17
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
17
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
17
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
17
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
17
    }
2771
17
#endif
2772
2773
17
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
17
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
34
    for (size_t i = 0; i < operations.size(); i++) {
2781
17
        auto& operation = operations[i];
2782
2783
17
        auto& module = operation.first;
2784
17
        auto& op = operation.second;
2785
2786
17
        if ( i > 0 ) {
2787
8
            auto& prevModule = operations[i-1].first;
2788
8
            auto& prevOp = operations[i-1].second;
2789
2790
8
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
7
                auto& curModifier = op.modifier.GetVectorPtr();
2792
7
                if ( curModifier.size() == 0 ) {
2793
513
                    for (size_t j = 0; j < 512; j++) {
2794
512
                        curModifier.push_back(1);
2795
512
                    }
2796
6
                } else {
2797
2.62k
                    for (auto& c : curModifier) {
2798
2.62k
                        c++;
2799
2.62k
                    }
2800
6
                }
2801
7
            }
2802
8
        }
2803
2804
17
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
17
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
17
        const auto& result = results.back();
2811
2812
17
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
17
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
17
        if ( options.disableTests == false ) {
2830
17
            tests::test(op, result.second);
2831
17
        }
2832
2833
17
        postprocess(module, op, result);
2834
17
    }
2835
2836
17
    if ( options.noCompare == false ) {
2837
9
        compare(operations, results, data, size);
2838
9
    }
2839
17
}
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
333
    do {
2725
333
        auto op = getOp(&parentDs, data, size);
2726
333
        auto module = getModule(parentDs);
2727
333
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
333
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
333
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
333
    } 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
32
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
32
            moduleIDs.insert(moduleID);
2756
32
        }
2757
2758
59
        std::set<uint64_t> operationModuleIDs;
2759
193
        for (const auto& op : operations) {
2760
193
            operationModuleIDs.insert(op.first->ID);
2761
193
        }
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
252
    for (size_t i = 0; i < operations.size(); i++) {
2781
193
        auto& operation = operations[i];
2782
2783
193
        auto& module = operation.first;
2784
193
        auto& op = operation.second;
2785
2786
193
        if ( i > 0 ) {
2787
161
            auto& prevModule = operations[i-1].first;
2788
161
            auto& prevOp = operations[i-1].second;
2789
2790
161
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
83
                auto& curModifier = op.modifier.GetVectorPtr();
2792
83
                if ( curModifier.size() == 0 ) {
2793
35.9k
                    for (size_t j = 0; j < 512; j++) {
2794
35.8k
                        curModifier.push_back(1);
2795
35.8k
                    }
2796
70
                } else {
2797
262
                    for (auto& c : curModifier) {
2798
262
                        c++;
2799
262
                    }
2800
13
                }
2801
83
            }
2802
161
        }
2803
2804
193
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
193
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
193
        const auto& result = results.back();
2811
2812
193
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
193
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
193
        if ( options.disableTests == false ) {
2830
193
            tests::test(op, result.second);
2831
193
        }
2832
2833
193
        postprocess(module, op, result);
2834
193
    }
2835
2836
59
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
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
56
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
56
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
56
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
362
    do {
2725
362
        auto op = getOp(&parentDs, data, size);
2726
362
        auto module = getModule(parentDs);
2727
362
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
362
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
362
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
362
    } while ( parentDs.Get<bool>() == true );
2738
2739
56
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
56
#if 1
2745
56
    {
2746
56
        std::set<uint64_t> moduleIDs;
2747
56
        for (const auto& m : modules ) {
2748
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
56
        std::set<uint64_t> operationModuleIDs;
2759
213
        for (const auto& op : operations) {
2760
213
            operationModuleIDs.insert(op.first->ID);
2761
213
        }
2762
2763
56
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
56
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
56
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
56
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
56
    }
2771
56
#endif
2772
2773
56
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
56
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
269
    for (size_t i = 0; i < operations.size(); i++) {
2781
213
        auto& operation = operations[i];
2782
2783
213
        auto& module = operation.first;
2784
213
        auto& op = operation.second;
2785
2786
213
        if ( i > 0 ) {
2787
183
            auto& prevModule = operations[i-1].first;
2788
183
            auto& prevOp = operations[i-1].second;
2789
2790
183
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
76
                auto& curModifier = op.modifier.GetVectorPtr();
2792
76
                if ( curModifier.size() == 0 ) {
2793
17.4k
                    for (size_t j = 0; j < 512; j++) {
2794
17.4k
                        curModifier.push_back(1);
2795
17.4k
                    }
2796
42
                } else {
2797
293
                    for (auto& c : curModifier) {
2798
293
                        c++;
2799
293
                    }
2800
42
                }
2801
76
            }
2802
183
        }
2803
2804
213
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
213
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
213
        const auto& result = results.back();
2811
2812
213
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
213
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
213
        if ( options.disableTests == false ) {
2830
213
            tests::test(op, result.second);
2831
213
        }
2832
2833
213
        postprocess(module, op, result);
2834
213
    }
2835
2836
56
    if ( options.noCompare == false ) {
2837
30
        compare(operations, results, data, size);
2838
30
    }
2839
56
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
267
    do {
2725
267
        auto op = getOp(&parentDs, data, size);
2726
267
        auto module = getModule(parentDs);
2727
267
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
267
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
267
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
267
    } 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
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
53
        std::set<uint64_t> operationModuleIDs;
2759
171
        for (const auto& op : operations) {
2760
171
            operationModuleIDs.insert(op.first->ID);
2761
171
        }
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
224
    for (size_t i = 0; i < operations.size(); i++) {
2781
171
        auto& operation = operations[i];
2782
2783
171
        auto& module = operation.first;
2784
171
        auto& op = operation.second;
2785
2786
171
        if ( i > 0 ) {
2787
140
            auto& prevModule = operations[i-1].first;
2788
140
            auto& prevOp = operations[i-1].second;
2789
2790
140
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
63
                auto& curModifier = op.modifier.GetVectorPtr();
2792
63
                if ( curModifier.size() == 0 ) {
2793
18.4k
                    for (size_t j = 0; j < 512; j++) {
2794
18.4k
                        curModifier.push_back(1);
2795
18.4k
                    }
2796
36
                } else {
2797
246
                    for (auto& c : curModifier) {
2798
246
                        c++;
2799
246
                    }
2800
27
                }
2801
63
            }
2802
140
        }
2803
2804
171
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
171
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
171
        const auto& result = results.back();
2811
2812
171
        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
171
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
171
        if ( options.disableTests == false ) {
2830
171
            tests::test(op, result.second);
2831
171
        }
2832
2833
171
        postprocess(module, op, result);
2834
171
    }
2835
2836
53
    if ( options.noCompare == false ) {
2837
31
        compare(operations, results, data, size);
2838
31
    }
2839
53
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6.71k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.71k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.71k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9.38k
    do {
2725
9.38k
        auto op = getOp(&parentDs, data, size);
2726
9.38k
        auto module = getModule(parentDs);
2727
9.38k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
9.38k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9.38k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
82
            break;
2736
82
        }
2737
9.38k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.71k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.71k
#if 1
2745
6.71k
    {
2746
6.71k
        std::set<uint64_t> moduleIDs;
2747
6.71k
        for (const auto& m : modules ) {
2748
6.53k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6.53k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6.53k
            moduleIDs.insert(moduleID);
2756
6.53k
        }
2757
2758
6.71k
        std::set<uint64_t> operationModuleIDs;
2759
9.04k
        for (const auto& op : operations) {
2760
9.04k
            operationModuleIDs.insert(op.first->ID);
2761
9.04k
        }
2762
2763
6.71k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.71k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.71k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.71k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6.71k
    }
2771
6.71k
#endif
2772
2773
6.71k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.71k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
15.7k
    for (size_t i = 0; i < operations.size(); i++) {
2781
9.04k
        auto& operation = operations[i];
2782
2783
9.04k
        auto& module = operation.first;
2784
9.04k
        auto& op = operation.second;
2785
2786
9.04k
        if ( i > 0 ) {
2787
2.51k
            auto& prevModule = operations[i-1].first;
2788
2.51k
            auto& prevOp = operations[i-1].second;
2789
2790
2.51k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
875
                auto& curModifier = op.modifier.GetVectorPtr();
2792
875
                if ( curModifier.size() == 0 ) {
2793
220k
                    for (size_t j = 0; j < 512; j++) {
2794
220k
                        curModifier.push_back(1);
2795
220k
                    }
2796
445
                } else {
2797
12.8k
                    for (auto& c : curModifier) {
2798
12.8k
                        c++;
2799
12.8k
                    }
2800
445
                }
2801
875
            }
2802
2.51k
        }
2803
2804
9.04k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9.04k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9.04k
        const auto& result = results.back();
2811
2812
9.04k
        if ( result.second != std::nullopt ) {
2813
3.96k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
3.96k
        }
2820
2821
9.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
9.04k
        if ( options.disableTests == false ) {
2830
9.04k
            tests::test(op, result.second);
2831
9.04k
        }
2832
2833
9.04k
        postprocess(module, op, result);
2834
9.04k
    }
2835
2836
6.71k
    if ( options.noCompare == false ) {
2837
6.53k
        compare(operations, results, data, size);
2838
6.53k
    }
2839
6.71k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.43k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.43k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.43k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6.30k
    do {
2725
6.30k
        auto op = getOp(&parentDs, data, size);
2726
6.30k
        auto module = getModule(parentDs);
2727
6.30k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
6.30k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6.30k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
57
            break;
2736
57
        }
2737
6.30k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.43k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.43k
#if 1
2745
4.43k
    {
2746
4.43k
        std::set<uint64_t> moduleIDs;
2747
4.43k
        for (const auto& m : modules ) {
2748
4.18k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.18k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.18k
            moduleIDs.insert(moduleID);
2756
4.18k
        }
2757
2758
4.43k
        std::set<uint64_t> operationModuleIDs;
2759
5.85k
        for (const auto& op : operations) {
2760
5.85k
            operationModuleIDs.insert(op.first->ID);
2761
5.85k
        }
2762
2763
4.43k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.43k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.43k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.43k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.43k
    }
2771
4.43k
#endif
2772
2773
4.43k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.43k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
10.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.85k
        auto& operation = operations[i];
2782
2783
5.85k
        auto& module = operation.first;
2784
5.85k
        auto& op = operation.second;
2785
2786
5.85k
        if ( i > 0 ) {
2787
1.67k
            auto& prevModule = operations[i-1].first;
2788
1.67k
            auto& prevOp = operations[i-1].second;
2789
2790
1.67k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
561
                auto& curModifier = op.modifier.GetVectorPtr();
2792
561
                if ( curModifier.size() == 0 ) {
2793
71.8k
                    for (size_t j = 0; j < 512; j++) {
2794
71.6k
                        curModifier.push_back(1);
2795
71.6k
                    }
2796
421
                } else {
2797
41.2k
                    for (auto& c : curModifier) {
2798
41.2k
                        c++;
2799
41.2k
                    }
2800
421
                }
2801
561
            }
2802
1.67k
        }
2803
2804
5.85k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.85k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.85k
        const auto& result = results.back();
2811
2812
5.85k
        if ( result.second != std::nullopt ) {
2813
1.95k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.95k
        }
2820
2821
5.85k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.85k
        if ( options.disableTests == false ) {
2830
5.85k
            tests::test(op, result.second);
2831
5.85k
        }
2832
2833
5.85k
        postprocess(module, op, result);
2834
5.85k
    }
2835
2836
4.43k
    if ( options.noCompare == false ) {
2837
4.18k
        compare(operations, results, data, size);
2838
4.18k
    }
2839
4.43k
}
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.50k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.50k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.50k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9.37k
    do {
2725
9.37k
        auto op = getOp(&parentDs, data, size);
2726
9.37k
        auto module = getModule(parentDs);
2727
9.37k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
9.37k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9.37k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
110
            break;
2736
110
        }
2737
9.37k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.50k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.50k
#if 1
2745
6.50k
    {
2746
6.50k
        std::set<uint64_t> moduleIDs;
2747
6.50k
        for (const auto& m : modules ) {
2748
6.31k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6.31k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6.31k
            moduleIDs.insert(moduleID);
2756
6.31k
        }
2757
2758
6.50k
        std::set<uint64_t> operationModuleIDs;
2759
9.02k
        for (const auto& op : operations) {
2760
9.02k
            operationModuleIDs.insert(op.first->ID);
2761
9.02k
        }
2762
2763
6.50k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.50k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.50k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.50k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6.50k
    }
2771
6.50k
#endif
2772
2773
6.50k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.50k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
15.5k
    for (size_t i = 0; i < operations.size(); i++) {
2781
9.02k
        auto& operation = operations[i];
2782
2783
9.02k
        auto& module = operation.first;
2784
9.02k
        auto& op = operation.second;
2785
2786
9.02k
        if ( i > 0 ) {
2787
2.71k
            auto& prevModule = operations[i-1].first;
2788
2.71k
            auto& prevOp = operations[i-1].second;
2789
2790
2.71k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
425
                auto& curModifier = op.modifier.GetVectorPtr();
2792
425
                if ( curModifier.size() == 0 ) {
2793
114k
                    for (size_t j = 0; j < 512; j++) {
2794
114k
                        curModifier.push_back(1);
2795
114k
                    }
2796
223
                } else {
2797
10.0k
                    for (auto& c : curModifier) {
2798
10.0k
                        c++;
2799
10.0k
                    }
2800
202
                }
2801
425
            }
2802
2.71k
        }
2803
2804
9.02k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9.02k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9.02k
        const auto& result = results.back();
2811
2812
9.02k
        if ( result.second != std::nullopt ) {
2813
2.51k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.51k
        }
2820
2821
9.02k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.02k
        if ( options.disableTests == false ) {
2830
9.02k
            tests::test(op, result.second);
2831
9.02k
        }
2832
2833
9.02k
        postprocess(module, op, result);
2834
9.02k
    }
2835
2836
6.50k
    if ( options.noCompare == false ) {
2837
6.31k
        compare(operations, results, data, size);
2838
6.31k
    }
2839
6.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
506
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
506
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
506
    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
35
            break;
2736
35
        }
2737
1.22k
    } while ( parentDs.Get<bool>() == true );
2738
2739
506
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
506
#if 1
2745
506
    {
2746
506
        std::set<uint64_t> moduleIDs;
2747
506
        for (const auto& m : modules ) {
2748
380
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
380
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
380
            moduleIDs.insert(moduleID);
2756
380
        }
2757
2758
506
        std::set<uint64_t> operationModuleIDs;
2759
938
        for (const auto& op : operations) {
2760
938
            operationModuleIDs.insert(op.first->ID);
2761
938
        }
2762
2763
506
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
506
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
506
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
506
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
506
    }
2771
506
#endif
2772
2773
506
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
506
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.44k
    for (size_t i = 0; i < operations.size(); i++) {
2781
938
        auto& operation = operations[i];
2782
2783
938
        auto& module = operation.first;
2784
938
        auto& op = operation.second;
2785
2786
938
        if ( i > 0 ) {
2787
558
            auto& prevModule = operations[i-1].first;
2788
558
            auto& prevOp = operations[i-1].second;
2789
2790
558
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
198
                auto& curModifier = op.modifier.GetVectorPtr();
2792
198
                if ( curModifier.size() == 0 ) {
2793
31.2k
                    for (size_t j = 0; j < 512; j++) {
2794
31.2k
                        curModifier.push_back(1);
2795
31.2k
                    }
2796
137
                } else {
2797
2.81k
                    for (auto& c : curModifier) {
2798
2.81k
                        c++;
2799
2.81k
                    }
2800
137
                }
2801
198
            }
2802
558
        }
2803
2804
938
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
938
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
938
        const auto& result = results.back();
2811
2812
938
        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
938
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
938
        if ( options.disableTests == false ) {
2830
938
            tests::test(op, result.second);
2831
938
        }
2832
2833
938
        postprocess(module, op, result);
2834
938
    }
2835
2836
506
    if ( options.noCompare == false ) {
2837
380
        compare(operations, results, data, size);
2838
380
    }
2839
506
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6.10k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.10k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.10k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
11.6k
    do {
2725
11.6k
        auto op = getOp(&parentDs, data, size);
2726
11.6k
        auto module = getModule(parentDs);
2727
11.6k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
11.6k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
11.6k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
368
            break;
2736
368
        }
2737
11.6k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.10k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.10k
#if 1
2745
6.10k
    {
2746
6.10k
        std::set<uint64_t> moduleIDs;
2747
6.10k
        for (const auto& m : modules ) {
2748
5.96k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5.96k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5.96k
            moduleIDs.insert(moduleID);
2756
5.96k
        }
2757
2758
6.10k
        std::set<uint64_t> operationModuleIDs;
2759
11.3k
        for (const auto& op : operations) {
2760
11.3k
            operationModuleIDs.insert(op.first->ID);
2761
11.3k
        }
2762
2763
6.10k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.10k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.10k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.10k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6.10k
    }
2771
6.10k
#endif
2772
2773
6.10k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.10k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
17.5k
    for (size_t i = 0; i < operations.size(); i++) {
2781
11.3k
        auto& operation = operations[i];
2782
2783
11.3k
        auto& module = operation.first;
2784
11.3k
        auto& op = operation.second;
2785
2786
11.3k
        if ( i > 0 ) {
2787
5.43k
            auto& prevModule = operations[i-1].first;
2788
5.43k
            auto& prevOp = operations[i-1].second;
2789
2790
5.43k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.39k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.39k
                if ( curModifier.size() == 0 ) {
2793
230k
                    for (size_t j = 0; j < 512; j++) {
2794
230k
                        curModifier.push_back(1);
2795
230k
                    }
2796
941
                } else {
2797
10.5k
                    for (auto& c : curModifier) {
2798
10.5k
                        c++;
2799
10.5k
                    }
2800
941
                }
2801
1.39k
            }
2802
5.43k
        }
2803
2804
11.3k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
11.3k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
11.3k
        const auto& result = results.back();
2811
2812
11.3k
        if ( result.second != std::nullopt ) {
2813
7.16k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
7.16k
        }
2820
2821
11.3k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
11.3k
        if ( options.disableTests == false ) {
2830
11.3k
            tests::test(op, result.second);
2831
11.3k
        }
2832
2833
11.3k
        postprocess(module, op, result);
2834
11.3k
    }
2835
2836
6.10k
    if ( options.noCompare == false ) {
2837
5.96k
        compare(operations, results, data, size);
2838
5.96k
    }
2839
6.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_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
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
3
            break;
2736
3
        }
2737
87
    } while ( parentDs.Get<bool>() == true );
2738
2739
34
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
34
#if 1
2745
34
    {
2746
34
        std::set<uint64_t> moduleIDs;
2747
34
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
34
        std::set<uint64_t> operationModuleIDs;
2759
50
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
2762
2763
34
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
34
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
34
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
34
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
34
    }
2771
34
#endif
2772
2773
34
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
34
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
84
    for (size_t i = 0; i < operations.size(); i++) {
2781
50
        auto& operation = operations[i];
2782
2783
50
        auto& module = operation.first;
2784
50
        auto& op = operation.second;
2785
2786
50
        if ( i > 0 ) {
2787
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.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
9
                } else {
2797
189
                    for (auto& c : curModifier) {
2798
189
                        c++;
2799
189
                    }
2800
9
                }
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
34
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::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
5
            break;
2736
5
        }
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
22
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
22
            moduleIDs.insert(moduleID);
2756
22
        }
2757
2758
35
        std::set<uint64_t> operationModuleIDs;
2759
63
        for (const auto& op : operations) {
2760
63
            operationModuleIDs.insert(op.first->ID);
2761
63
        }
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
98
    for (size_t i = 0; i < operations.size(); i++) {
2781
63
        auto& operation = operations[i];
2782
2783
63
        auto& module = operation.first;
2784
63
        auto& op = operation.second;
2785
2786
63
        if ( i > 0 ) {
2787
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
24
                auto& curModifier = op.modifier.GetVectorPtr();
2792
24
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
18
                } else {
2797
237
                    for (auto& c : curModifier) {
2798
237
                        c++;
2799
237
                    }
2800
18
                }
2801
24
            }
2802
41
        }
2803
2804
63
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
63
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
63
        const auto& result = results.back();
2811
2812
63
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
63
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
63
        if ( options.disableTests == false ) {
2830
63
            tests::test(op, result.second);
2831
63
        }
2832
2833
63
        postprocess(module, op, result);
2834
63
    }
2835
2836
35
    if ( options.noCompare == false ) {
2837
22
        compare(operations, results, data, size);
2838
22
    }
2839
35
}
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
82
    do {
2725
82
        auto op = getOp(&parentDs, data, size);
2726
82
        auto module = getModule(parentDs);
2727
82
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
82
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
82
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
82
    } 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
55
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
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
89
    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
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
252
                    for (auto& c : curModifier) {
2798
252
                        c++;
2799
252
                    }
2800
11
                }
2801
17
            }
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
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
311
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
311
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
311
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
789
    do {
2725
789
        auto op = getOp(&parentDs, data, size);
2726
789
        auto module = getModule(parentDs);
2727
789
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
789
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
789
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
26
            break;
2736
26
        }
2737
789
    } while ( parentDs.Get<bool>() == true );
2738
2739
311
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
311
#if 1
2745
311
    {
2746
311
        std::set<uint64_t> moduleIDs;
2747
311
        for (const auto& m : modules ) {
2748
181
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
181
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
181
            moduleIDs.insert(moduleID);
2756
181
        }
2757
2758
311
        std::set<uint64_t> operationModuleIDs;
2759
523
        for (const auto& op : operations) {
2760
523
            operationModuleIDs.insert(op.first->ID);
2761
523
        }
2762
2763
311
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
311
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
311
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
311
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
311
    }
2771
311
#endif
2772
2773
311
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
311
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
834
    for (size_t i = 0; i < operations.size(); i++) {
2781
523
        auto& operation = operations[i];
2782
2783
523
        auto& module = operation.first;
2784
523
        auto& op = operation.second;
2785
2786
523
        if ( i > 0 ) {
2787
342
            auto& prevModule = operations[i-1].first;
2788
342
            auto& prevOp = operations[i-1].second;
2789
2790
342
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
159
                auto& curModifier = op.modifier.GetVectorPtr();
2792
159
                if ( curModifier.size() == 0 ) {
2793
38.4k
                    for (size_t j = 0; j < 512; j++) {
2794
38.4k
                        curModifier.push_back(1);
2795
38.4k
                    }
2796
84
                } else {
2797
2.11k
                    for (auto& c : curModifier) {
2798
2.11k
                        c++;
2799
2.11k
                    }
2800
84
                }
2801
159
            }
2802
342
        }
2803
2804
523
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
523
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
523
        const auto& result = results.back();
2811
2812
523
        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
523
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
523
        if ( options.disableTests == false ) {
2830
523
            tests::test(op, result.second);
2831
523
        }
2832
2833
523
        postprocess(module, op, result);
2834
523
    }
2835
2836
311
    if ( options.noCompare == false ) {
2837
181
        compare(operations, results, data, size);
2838
181
    }
2839
311
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.57k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.57k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.57k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.03k
    do {
2725
7.03k
        auto op = getOp(&parentDs, data, size);
2726
7.03k
        auto module = getModule(parentDs);
2727
7.03k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7.03k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.03k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
175
            break;
2736
175
        }
2737
7.03k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.57k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.57k
#if 1
2745
3.57k
    {
2746
3.57k
        std::set<uint64_t> moduleIDs;
2747
3.57k
        for (const auto& m : modules ) {
2748
3.41k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.41k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.41k
            moduleIDs.insert(moduleID);
2756
3.41k
        }
2757
2758
3.57k
        std::set<uint64_t> operationModuleIDs;
2759
6.69k
        for (const auto& op : operations) {
2760
6.69k
            operationModuleIDs.insert(op.first->ID);
2761
6.69k
        }
2762
2763
3.57k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.57k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.57k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.57k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.57k
    }
2771
3.57k
#endif
2772
2773
3.57k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.57k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
10.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
6.69k
        auto& operation = operations[i];
2782
2783
6.69k
        auto& module = operation.first;
2784
6.69k
        auto& op = operation.second;
2785
2786
6.69k
        if ( i > 0 ) {
2787
3.27k
            auto& prevModule = operations[i-1].first;
2788
3.27k
            auto& prevOp = operations[i-1].second;
2789
2790
3.27k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
970
                auto& curModifier = op.modifier.GetVectorPtr();
2792
970
                if ( curModifier.size() == 0 ) {
2793
178k
                    for (size_t j = 0; j < 512; j++) {
2794
178k
                        curModifier.push_back(1);
2795
178k
                    }
2796
622
                } else {
2797
56.9k
                    for (auto& c : curModifier) {
2798
56.9k
                        c++;
2799
56.9k
                    }
2800
622
                }
2801
970
            }
2802
3.27k
        }
2803
2804
6.69k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6.69k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6.69k
        const auto& result = results.back();
2811
2812
6.69k
        if ( result.second != std::nullopt ) {
2813
3.26k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.26k
        }
2820
2821
6.69k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
6.69k
        if ( options.disableTests == false ) {
2830
6.69k
            tests::test(op, result.second);
2831
6.69k
        }
2832
2833
6.69k
        postprocess(module, op, result);
2834
6.69k
    }
2835
2836
3.57k
    if ( options.noCompare == false ) {
2837
3.41k
        compare(operations, results, data, size);
2838
3.41k
    }
2839
3.57k
}
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
3
            break;
2736
3
        }
2737
72
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
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
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
247
                    for (auto& c : curModifier) {
2798
247
                        c++;
2799
247
                    }
2800
11
                }
2801
17
            }
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
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
67
    do {
2725
67
        auto op = getOp(&parentDs, data, size);
2726
67
        auto module = getModule(parentDs);
2727
67
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
67
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
67
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
67
    } 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
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
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
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
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                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
11
                } else {
2797
289
                    for (auto& c : curModifier) {
2798
289
                        c++;
2799
289
                    }
2800
11
                }
2801
16
            }
2802
31
        }
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
19
        compare(operations, results, data, size);
2838
19
    }
2839
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
30
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
30
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
30
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
70
    do {
2725
70
        auto op = getOp(&parentDs, data, size);
2726
70
        auto module = getModule(parentDs);
2727
70
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
70
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
70
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
70
    } while ( parentDs.Get<bool>() == true );
2738
2739
30
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
30
#if 1
2745
30
    {
2746
30
        std::set<uint64_t> moduleIDs;
2747
30
        for (const auto& m : modules ) {
2748
16
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
16
            moduleIDs.insert(moduleID);
2756
16
        }
2757
2758
30
        std::set<uint64_t> operationModuleIDs;
2759
39
        for (const auto& op : operations) {
2760
39
            operationModuleIDs.insert(op.first->ID);
2761
39
        }
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
69
    for (size_t i = 0; i < operations.size(); i++) {
2781
39
        auto& operation = operations[i];
2782
2783
39
        auto& module = operation.first;
2784
39
        auto& op = operation.second;
2785
2786
39
        if ( i > 0 ) {
2787
23
            auto& prevModule = operations[i-1].first;
2788
23
            auto& prevOp = operations[i-1].second;
2789
2790
23
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
13
                auto& curModifier = op.modifier.GetVectorPtr();
2792
13
                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
9
                } else {
2797
276
                    for (auto& c : curModifier) {
2798
276
                        c++;
2799
276
                    }
2800
9
                }
2801
13
            }
2802
23
        }
2803
2804
39
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
39
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
39
        const auto& result = results.back();
2811
2812
39
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
39
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
39
        if ( options.disableTests == false ) {
2830
39
            tests::test(op, result.second);
2831
39
        }
2832
2833
39
        postprocess(module, op, result);
2834
39
    }
2835
2836
30
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
30
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
83
    do {
2725
83
        auto op = getOp(&parentDs, data, size);
2726
83
        auto module = getModule(parentDs);
2727
83
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
83
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
83
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
83
    } while ( parentDs.Get<bool>() == true );
2738
2739
33
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
33
#if 1
2745
33
    {
2746
33
        std::set<uint64_t> moduleIDs;
2747
33
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
33
        std::set<uint64_t> operationModuleIDs;
2759
57
        for (const auto& op : operations) {
2760
57
            operationModuleIDs.insert(op.first->ID);
2761
57
        }
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
90
    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
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
20
                auto& curModifier = op.modifier.GetVectorPtr();
2792
20
                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
16
                } else {
2797
227
                    for (auto& c : curModifier) {
2798
227
                        c++;
2799
227
                    }
2800
16
                }
2801
20
            }
2802
37
        }
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
33
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
33
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::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
122
    do {
2725
122
        auto op = getOp(&parentDs, data, size);
2726
122
        auto module = getModule(parentDs);
2727
122
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
122
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
122
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
122
    } while ( parentDs.Get<bool>() == true );
2738
2739
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
36
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
36
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
36
            moduleIDs.insert(moduleID);
2756
36
        }
2757
2758
52
        std::set<uint64_t> operationModuleIDs;
2759
87
        for (const auto& op : operations) {
2760
87
            operationModuleIDs.insert(op.first->ID);
2761
87
        }
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
139
    for (size_t i = 0; i < operations.size(); i++) {
2781
87
        auto& operation = operations[i];
2782
2783
87
        auto& module = operation.first;
2784
87
        auto& op = operation.second;
2785
2786
87
        if ( i > 0 ) {
2787
51
            auto& prevModule = operations[i-1].first;
2788
51
            auto& prevOp = operations[i-1].second;
2789
2790
51
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
29
                auto& curModifier = op.modifier.GetVectorPtr();
2792
29
                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
307
                    for (auto& c : curModifier) {
2798
307
                        c++;
2799
307
                    }
2800
12
                }
2801
29
            }
2802
51
        }
2803
2804
87
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
87
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
87
        const auto& result = results.back();
2811
2812
87
        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
87
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
87
        if ( options.disableTests == false ) {
2830
87
            tests::test(op, result.second);
2831
87
        }
2832
2833
87
        postprocess(module, op, result);
2834
87
    }
2835
2836
52
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
52
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
47
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
47
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
47
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
106
    do {
2725
106
        auto op = getOp(&parentDs, data, size);
2726
106
        auto module = getModule(parentDs);
2727
106
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
106
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
106
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
106
    } while ( parentDs.Get<bool>() == true );
2738
2739
47
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
47
#if 1
2745
47
    {
2746
47
        std::set<uint64_t> moduleIDs;
2747
47
        for (const auto& m : modules ) {
2748
32
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
32
            moduleIDs.insert(moduleID);
2756
32
        }
2757
2758
47
        std::set<uint64_t> operationModuleIDs;
2759
77
        for (const auto& op : operations) {
2760
77
            operationModuleIDs.insert(op.first->ID);
2761
77
        }
2762
2763
47
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
47
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
47
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
47
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
47
    }
2771
47
#endif
2772
2773
47
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
47
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
124
    for (size_t i = 0; i < operations.size(); i++) {
2781
77
        auto& operation = operations[i];
2782
2783
77
        auto& module = operation.first;
2784
77
        auto& op = operation.second;
2785
2786
77
        if ( i > 0 ) {
2787
45
            auto& prevModule = operations[i-1].first;
2788
45
            auto& prevOp = operations[i-1].second;
2789
2790
45
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
20
                auto& curModifier = op.modifier.GetVectorPtr();
2792
20
                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
10
                } else {
2797
112
                    for (auto& c : curModifier) {
2798
112
                        c++;
2799
112
                    }
2800
10
                }
2801
20
            }
2802
45
        }
2803
2804
77
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
77
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
77
        const auto& result = results.back();
2811
2812
77
        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
77
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
77
        if ( options.disableTests == false ) {
2830
77
            tests::test(op, result.second);
2831
77
        }
2832
2833
77
        postprocess(module, op, result);
2834
77
    }
2835
2836
47
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
47
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
40
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
40
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
40
    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
2
            break;
2736
2
        }
2737
94
    } while ( parentDs.Get<bool>() == true );
2738
2739
40
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
40
#if 1
2745
40
    {
2746
40
        std::set<uint64_t> moduleIDs;
2747
40
        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
40
        std::set<uint64_t> operationModuleIDs;
2759
54
        for (const auto& op : operations) {
2760
54
            operationModuleIDs.insert(op.first->ID);
2761
54
        }
2762
2763
40
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
40
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
40
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
40
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
40
    }
2771
40
#endif
2772
2773
40
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
40
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
94
    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
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
9
                } else {
2797
1.50k
                    for (auto& c : curModifier) {
2798
1.50k
                        c++;
2799
1.50k
                    }
2800
9
                }
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
40
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
40
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::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
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
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
16
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
16
            moduleIDs.insert(moduleID);
2756
16
        }
2757
2758
37
        std::set<uint64_t> operationModuleIDs;
2759
46
        for (const auto& op : operations) {
2760
46
            operationModuleIDs.insert(op.first->ID);
2761
46
        }
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
83
    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
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
796
                    for (auto& c : curModifier) {
2798
796
                        c++;
2799
796
                    }
2800
9
                }
2801
15
            }
2802
30
        }
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
37
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
53
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
53
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
53
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
118
    do {
2725
118
        auto op = getOp(&parentDs, data, size);
2726
118
        auto module = getModule(parentDs);
2727
118
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
118
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
118
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
118
    } 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
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
53
        std::set<uint64_t> operationModuleIDs;
2759
86
        for (const auto& op : operations) {
2760
86
            operationModuleIDs.insert(op.first->ID);
2761
86
        }
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
139
    for (size_t i = 0; i < operations.size(); i++) {
2781
86
        auto& operation = operations[i];
2782
2783
86
        auto& module = operation.first;
2784
86
        auto& op = operation.second;
2785
2786
86
        if ( i > 0 ) {
2787
48
            auto& prevModule = operations[i-1].first;
2788
48
            auto& prevOp = operations[i-1].second;
2789
2790
48
            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
592
                    for (auto& c : curModifier) {
2798
592
                        c++;
2799
592
                    }
2800
15
                }
2801
19
            }
2802
48
        }
2803
2804
86
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
86
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
86
        const auto& result = results.back();
2811
2812
86
        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
86
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
86
        if ( options.disableTests == false ) {
2830
86
            tests::test(op, result.second);
2831
86
        }
2832
2833
86
        postprocess(module, op, result);
2834
86
    }
2835
2836
53
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
53
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
717
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
717
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
717
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.60k
    do {
2725
1.60k
        auto op = getOp(&parentDs, data, size);
2726
1.60k
        auto module = getModule(parentDs);
2727
1.60k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.60k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.60k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
42
            break;
2736
42
        }
2737
1.60k
    } while ( parentDs.Get<bool>() == true );
2738
2739
717
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
717
#if 1
2745
717
    {
2746
717
        std::set<uint64_t> moduleIDs;
2747
717
        for (const auto& m : modules ) {
2748
596
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
596
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
596
            moduleIDs.insert(moduleID);
2756
596
        }
2757
2758
717
        std::set<uint64_t> operationModuleIDs;
2759
1.32k
        for (const auto& op : operations) {
2760
1.32k
            operationModuleIDs.insert(op.first->ID);
2761
1.32k
        }
2762
2763
717
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
717
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
717
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
717
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
717
    }
2771
717
#endif
2772
2773
717
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
717
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.04k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.32k
        auto& operation = operations[i];
2782
2783
1.32k
        auto& module = operation.first;
2784
1.32k
        auto& op = operation.second;
2785
2786
1.32k
        if ( i > 0 ) {
2787
730
            auto& prevModule = operations[i-1].first;
2788
730
            auto& prevOp = operations[i-1].second;
2789
2790
730
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
278
                auto& curModifier = op.modifier.GetVectorPtr();
2792
278
                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
225
                } else {
2797
2.30k
                    for (auto& c : curModifier) {
2798
2.30k
                        c++;
2799
2.30k
                    }
2800
225
                }
2801
278
            }
2802
730
        }
2803
2804
1.32k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.32k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.32k
        const auto& result = results.back();
2811
2812
1.32k
        if ( result.second != std::nullopt ) {
2813
231
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
231
        }
2820
2821
1.32k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.32k
        if ( options.disableTests == false ) {
2830
1.32k
            tests::test(op, result.second);
2831
1.32k
        }
2832
2833
1.32k
        postprocess(module, op, result);
2834
1.32k
    }
2835
2836
717
    if ( options.noCompare == false ) {
2837
596
        compare(operations, results, data, size);
2838
596
    }
2839
717
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
896
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
896
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
896
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.84k
    do {
2725
1.84k
        auto op = getOp(&parentDs, data, size);
2726
1.84k
        auto module = getModule(parentDs);
2727
1.84k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.84k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.84k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
58
            break;
2736
58
        }
2737
1.84k
    } while ( parentDs.Get<bool>() == true );
2738
2739
896
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
896
#if 1
2745
896
    {
2746
896
        std::set<uint64_t> moduleIDs;
2747
896
        for (const auto& m : modules ) {
2748
716
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
716
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
716
            moduleIDs.insert(moduleID);
2756
716
        }
2757
2758
896
        std::set<uint64_t> operationModuleIDs;
2759
1.45k
        for (const auto& op : operations) {
2760
1.45k
            operationModuleIDs.insert(op.first->ID);
2761
1.45k
        }
2762
2763
896
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
896
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
896
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
896
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
896
    }
2771
896
#endif
2772
2773
896
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
896
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.35k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.45k
        auto& operation = operations[i];
2782
2783
1.45k
        auto& module = operation.first;
2784
1.45k
        auto& op = operation.second;
2785
2786
1.45k
        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
209
                auto& curModifier = op.modifier.GetVectorPtr();
2792
209
                if ( curModifier.size() == 0 ) {
2793
38.4k
                    for (size_t j = 0; j < 512; j++) {
2794
38.4k
                        curModifier.push_back(1);
2795
38.4k
                    }
2796
134
                } else {
2797
5.80k
                    for (auto& c : curModifier) {
2798
5.80k
                        c++;
2799
5.80k
                    }
2800
134
                }
2801
209
            }
2802
739
        }
2803
2804
1.45k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.45k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.45k
        const auto& result = results.back();
2811
2812
1.45k
        if ( result.second != std::nullopt ) {
2813
216
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
216
        }
2820
2821
1.45k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.45k
        if ( options.disableTests == false ) {
2830
1.45k
            tests::test(op, result.second);
2831
1.45k
        }
2832
2833
1.45k
        postprocess(module, op, result);
2834
1.45k
    }
2835
2836
896
    if ( options.noCompare == false ) {
2837
716
        compare(operations, results, data, size);
2838
716
    }
2839
896
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
916
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
916
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
916
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.91k
    do {
2725
1.91k
        auto op = getOp(&parentDs, data, size);
2726
1.91k
        auto module = getModule(parentDs);
2727
1.91k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.91k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.91k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
48
            break;
2736
48
        }
2737
1.91k
    } while ( parentDs.Get<bool>() == true );
2738
2739
916
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
916
#if 1
2745
916
    {
2746
916
        std::set<uint64_t> moduleIDs;
2747
916
        for (const auto& m : modules ) {
2748
728
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
728
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
728
            moduleIDs.insert(moduleID);
2756
728
        }
2757
2758
916
        std::set<uint64_t> operationModuleIDs;
2759
1.49k
        for (const auto& op : operations) {
2760
1.49k
            operationModuleIDs.insert(op.first->ID);
2761
1.49k
        }
2762
2763
916
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
916
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
916
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
916
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
916
    }
2771
916
#endif
2772
2773
916
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
916
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.41k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.49k
        auto& operation = operations[i];
2782
2783
1.49k
        auto& module = operation.first;
2784
1.49k
        auto& op = operation.second;
2785
2786
1.49k
        if ( i > 0 ) {
2787
768
            auto& prevModule = operations[i-1].first;
2788
768
            auto& prevOp = operations[i-1].second;
2789
2790
768
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
241
                auto& curModifier = op.modifier.GetVectorPtr();
2792
241
                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
151
                } else {
2797
6.42k
                    for (auto& c : curModifier) {
2798
6.42k
                        c++;
2799
6.42k
                    }
2800
151
                }
2801
241
            }
2802
768
        }
2803
2804
1.49k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.49k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.49k
        const auto& result = results.back();
2811
2812
1.49k
        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.49k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.49k
        if ( options.disableTests == false ) {
2830
1.49k
            tests::test(op, result.second);
2831
1.49k
        }
2832
2833
1.49k
        postprocess(module, op, result);
2834
1.49k
    }
2835
2836
916
    if ( options.noCompare == false ) {
2837
728
        compare(operations, results, data, size);
2838
728
    }
2839
916
}
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.95k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.95k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.95k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.98k
    do {
2725
4.98k
        auto op = getOp(&parentDs, data, size);
2726
4.98k
        auto module = getModule(parentDs);
2727
4.98k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.98k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.98k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
98
            break;
2736
98
        }
2737
4.98k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.95k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.95k
#if 1
2745
2.95k
    {
2746
2.95k
        std::set<uint64_t> moduleIDs;
2747
2.95k
        for (const auto& m : modules ) {
2748
2.69k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.69k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.69k
            moduleIDs.insert(moduleID);
2756
2.69k
        }
2757
2758
2.95k
        std::set<uint64_t> operationModuleIDs;
2759
4.51k
        for (const auto& op : operations) {
2760
4.51k
            operationModuleIDs.insert(op.first->ID);
2761
4.51k
        }
2762
2763
2.95k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.95k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.95k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.95k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.95k
    }
2771
2.95k
#endif
2772
2773
2.95k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.95k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.47k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.51k
        auto& operation = operations[i];
2782
2783
4.51k
        auto& module = operation.first;
2784
4.51k
        auto& op = operation.second;
2785
2786
4.51k
        if ( i > 0 ) {
2787
1.82k
            auto& prevModule = operations[i-1].first;
2788
1.82k
            auto& prevOp = operations[i-1].second;
2789
2790
1.82k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
575
                auto& curModifier = op.modifier.GetVectorPtr();
2792
575
                if ( curModifier.size() == 0 ) {
2793
54.8k
                    for (size_t j = 0; j < 512; j++) {
2794
54.7k
                        curModifier.push_back(1);
2795
54.7k
                    }
2796
468
                } else {
2797
40.0k
                    for (auto& c : curModifier) {
2798
40.0k
                        c++;
2799
40.0k
                    }
2800
468
                }
2801
575
            }
2802
1.82k
        }
2803
2804
4.51k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.51k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.51k
        const auto& result = results.back();
2811
2812
4.51k
        if ( result.second != std::nullopt ) {
2813
241
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
241
        }
2820
2821
4.51k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.51k
        if ( options.disableTests == false ) {
2830
4.51k
            tests::test(op, result.second);
2831
4.51k
        }
2832
2833
4.51k
        postprocess(module, op, result);
2834
4.51k
    }
2835
2836
2.95k
    if ( options.noCompare == false ) {
2837
2.69k
        compare(operations, results, data, size);
2838
2.69k
    }
2839
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::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
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
1
            break;
2736
1
        }
2737
85
    } 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
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                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
11
                } else {
2797
258
                    for (auto& c : curModifier) {
2798
258
                        c++;
2799
258
                    }
2800
11
                }
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
36
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
36
}
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.38k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.38k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.38k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.92k
    do {
2725
4.92k
        auto op = getOp(&parentDs, data, size);
2726
4.92k
        auto module = getModule(parentDs);
2727
4.92k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.92k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.92k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
50
            break;
2736
50
        }
2737
4.92k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.38k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.38k
#if 1
2745
3.38k
    {
2746
3.38k
        std::set<uint64_t> moduleIDs;
2747
3.38k
        for (const auto& m : modules ) {
2748
3.19k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.19k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.19k
            moduleIDs.insert(moduleID);
2756
3.19k
        }
2757
2758
3.38k
        std::set<uint64_t> operationModuleIDs;
2759
4.56k
        for (const auto& op : operations) {
2760
4.56k
            operationModuleIDs.insert(op.first->ID);
2761
4.56k
        }
2762
2763
3.38k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.38k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.38k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.38k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.38k
    }
2771
3.38k
#endif
2772
2773
3.38k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.38k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.94k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.56k
        auto& operation = operations[i];
2782
2783
4.56k
        auto& module = operation.first;
2784
4.56k
        auto& op = operation.second;
2785
2786
4.56k
        if ( i > 0 ) {
2787
1.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
418
                auto& curModifier = op.modifier.GetVectorPtr();
2792
418
                if ( curModifier.size() == 0 ) {
2793
60.0k
                    for (size_t j = 0; j < 512; j++) {
2794
59.9k
                        curModifier.push_back(1);
2795
59.9k
                    }
2796
301
                } else {
2797
29.5k
                    for (auto& c : curModifier) {
2798
29.5k
                        c++;
2799
29.5k
                    }
2800
301
                }
2801
418
            }
2802
1.37k
        }
2803
2804
4.56k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.56k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.56k
        const auto& result = results.back();
2811
2812
4.56k
        if ( result.second != std::nullopt ) {
2813
361
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
361
        }
2820
2821
4.56k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.56k
        if ( options.disableTests == false ) {
2830
4.56k
            tests::test(op, result.second);
2831
4.56k
        }
2832
2833
4.56k
        postprocess(module, op, result);
2834
4.56k
    }
2835
2836
3.38k
    if ( options.noCompare == false ) {
2837
3.19k
        compare(operations, results, data, size);
2838
3.19k
    }
2839
3.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
163
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
163
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
163
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
321
    do {
2725
321
        auto op = getOp(&parentDs, data, size);
2726
321
        auto module = getModule(parentDs);
2727
321
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
321
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
321
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
321
    } while ( parentDs.Get<bool>() == true );
2738
2739
163
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
163
#if 1
2745
163
    {
2746
163
        std::set<uint64_t> moduleIDs;
2747
163
        for (const auto& m : modules ) {
2748
150
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
150
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
150
            moduleIDs.insert(moduleID);
2756
150
        }
2757
2758
163
        std::set<uint64_t> operationModuleIDs;
2759
289
        for (const auto& op : operations) {
2760
289
            operationModuleIDs.insert(op.first->ID);
2761
289
        }
2762
2763
163
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
163
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
163
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
163
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
163
    }
2771
163
#endif
2772
2773
163
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
163
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
452
    for (size_t i = 0; i < operations.size(); i++) {
2781
289
        auto& operation = operations[i];
2782
2783
289
        auto& module = operation.first;
2784
289
        auto& op = operation.second;
2785
2786
289
        if ( i > 0 ) {
2787
139
            auto& prevModule = operations[i-1].first;
2788
139
            auto& prevOp = operations[i-1].second;
2789
2790
139
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
50
                auto& curModifier = op.modifier.GetVectorPtr();
2792
50
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
1.03k
                    for (auto& c : curModifier) {
2798
1.03k
                        c++;
2799
1.03k
                    }
2800
24
                }
2801
50
            }
2802
139
        }
2803
2804
289
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
289
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
289
        const auto& result = results.back();
2811
2812
289
        if ( result.second != std::nullopt ) {
2813
48
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
48
        }
2820
2821
289
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
289
        if ( options.disableTests == false ) {
2830
289
            tests::test(op, result.second);
2831
289
        }
2832
2833
289
        postprocess(module, op, result);
2834
289
    }
2835
2836
163
    if ( options.noCompare == false ) {
2837
150
        compare(operations, results, data, size);
2838
150
    }
2839
163
}
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.63k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
5.63k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
5.63k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.55k
    do {
2725
7.55k
        auto op = getOp(&parentDs, data, size);
2726
7.55k
        auto module = getModule(parentDs);
2727
7.55k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7.55k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.55k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
69
            break;
2736
69
        }
2737
7.55k
    } while ( parentDs.Get<bool>() == true );
2738
2739
5.63k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
5.63k
#if 1
2745
5.63k
    {
2746
5.63k
        std::set<uint64_t> moduleIDs;
2747
5.63k
        for (const auto& m : modules ) {
2748
5.36k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5.36k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5.36k
            moduleIDs.insert(moduleID);
2756
5.36k
        }
2757
2758
5.63k
        std::set<uint64_t> operationModuleIDs;
2759
7.09k
        for (const auto& op : operations) {
2760
7.09k
            operationModuleIDs.insert(op.first->ID);
2761
7.09k
        }
2762
2763
5.63k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
5.63k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
5.63k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
5.63k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
5.63k
    }
2771
5.63k
#endif
2772
2773
5.63k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
5.63k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12.7k
    for (size_t i = 0; i < operations.size(); i++) {
2781
7.09k
        auto& operation = operations[i];
2782
2783
7.09k
        auto& module = operation.first;
2784
7.09k
        auto& op = operation.second;
2785
2786
7.09k
        if ( i > 0 ) {
2787
1.72k
            auto& prevModule = operations[i-1].first;
2788
1.72k
            auto& prevOp = operations[i-1].second;
2789
2790
1.72k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
480
                auto& curModifier = op.modifier.GetVectorPtr();
2792
480
                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
399
                } else {
2797
15.8k
                    for (auto& c : curModifier) {
2798
15.8k
                        c++;
2799
15.8k
                    }
2800
399
                }
2801
480
            }
2802
1.72k
        }
2803
2804
7.09k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7.09k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7.09k
        const auto& result = results.back();
2811
2812
7.09k
        if ( result.second != std::nullopt ) {
2813
133
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
133
        }
2820
2821
7.09k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
7.09k
        if ( options.disableTests == false ) {
2830
7.09k
            tests::test(op, result.second);
2831
7.09k
        }
2832
2833
7.09k
        postprocess(module, op, result);
2834
7.09k
    }
2835
2836
5.63k
    if ( options.noCompare == false ) {
2837
5.36k
        compare(operations, results, data, size);
2838
5.36k
    }
2839
5.63k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
80
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
80
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
80
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
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
3
            break;
2736
3
        }
2737
180
    } while ( parentDs.Get<bool>() == true );
2738
2739
80
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
80
#if 1
2745
80
    {
2746
80
        std::set<uint64_t> moduleIDs;
2747
80
        for (const auto& m : modules ) {
2748
64
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
64
            moduleIDs.insert(moduleID);
2756
64
        }
2757
2758
80
        std::set<uint64_t> operationModuleIDs;
2759
142
        for (const auto& op : operations) {
2760
142
            operationModuleIDs.insert(op.first->ID);
2761
142
        }
2762
2763
80
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
80
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
80
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
80
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
80
    }
2771
80
#endif
2772
2773
80
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
80
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
222
    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
78
            auto& prevModule = operations[i-1].first;
2788
78
            auto& prevOp = operations[i-1].second;
2789
2790
78
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                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
930
                    for (auto& c : curModifier) {
2798
930
                        c++;
2799
930
                    }
2800
16
                }
2801
35
            }
2802
78
        }
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
43
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
43
        }
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
80
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
80
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.28k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.28k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.28k
    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
47
            break;
2736
47
        }
2737
4.87k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.28k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.28k
#if 1
2745
3.28k
    {
2746
3.28k
        std::set<uint64_t> moduleIDs;
2747
3.28k
        for (const auto& m : modules ) {
2748
3.01k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.01k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.01k
            moduleIDs.insert(moduleID);
2756
3.01k
        }
2757
2758
3.28k
        std::set<uint64_t> operationModuleIDs;
2759
4.41k
        for (const auto& op : operations) {
2760
4.41k
            operationModuleIDs.insert(op.first->ID);
2761
4.41k
        }
2762
2763
3.28k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.28k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.28k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.28k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.28k
    }
2771
3.28k
#endif
2772
2773
3.28k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.28k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.70k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.41k
        auto& operation = operations[i];
2782
2783
4.41k
        auto& module = operation.first;
2784
4.41k
        auto& op = operation.second;
2785
2786
4.41k
        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
531
                auto& curModifier = op.modifier.GetVectorPtr();
2792
531
                if ( curModifier.size() == 0 ) {
2793
91.8k
                    for (size_t j = 0; j < 512; j++) {
2794
91.6k
                        curModifier.push_back(1);
2795
91.6k
                    }
2796
352
                } else {
2797
31.9k
                    for (auto& c : curModifier) {
2798
31.9k
                        c++;
2799
31.9k
                    }
2800
352
                }
2801
531
            }
2802
1.39k
        }
2803
2804
4.41k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.41k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.41k
        const auto& result = results.back();
2811
2812
4.41k
        if ( result.second != std::nullopt ) {
2813
2.15k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
2.15k
        }
2820
2821
4.41k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.41k
        if ( options.disableTests == false ) {
2830
4.41k
            tests::test(op, result.second);
2831
4.41k
        }
2832
2833
4.41k
        postprocess(module, op, result);
2834
4.41k
    }
2835
2836
3.28k
    if ( options.noCompare == false ) {
2837
3.01k
        compare(operations, results, data, size);
2838
3.01k
    }
2839
3.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.50k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.50k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.50k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.05k
    do {
2725
3.05k
        auto op = getOp(&parentDs, data, size);
2726
3.05k
        auto module = getModule(parentDs);
2727
3.05k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.05k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.05k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
63
            break;
2736
63
        }
2737
3.05k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.50k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.50k
#if 1
2745
1.50k
    {
2746
1.50k
        std::set<uint64_t> moduleIDs;
2747
1.50k
        for (const auto& m : modules ) {
2748
1.27k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.27k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.27k
            moduleIDs.insert(moduleID);
2756
1.27k
        }
2757
2758
1.50k
        std::set<uint64_t> operationModuleIDs;
2759
2.63k
        for (const auto& op : operations) {
2760
2.63k
            operationModuleIDs.insert(op.first->ID);
2761
2.63k
        }
2762
2763
1.50k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.50k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.50k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.50k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.50k
    }
2771
1.50k
#endif
2772
2773
1.50k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.50k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.14k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.63k
        auto& operation = operations[i];
2782
2783
2.63k
        auto& module = operation.first;
2784
2.63k
        auto& op = operation.second;
2785
2786
2.63k
        if ( i > 0 ) {
2787
1.35k
            auto& prevModule = operations[i-1].first;
2788
1.35k
            auto& prevOp = operations[i-1].second;
2789
2790
1.35k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
513
                auto& curModifier = op.modifier.GetVectorPtr();
2792
513
                if ( curModifier.size() == 0 ) {
2793
133k
                    for (size_t j = 0; j < 512; j++) {
2794
133k
                        curModifier.push_back(1);
2795
133k
                    }
2796
260
                } else {
2797
38.3k
                    for (auto& c : curModifier) {
2798
38.3k
                        c++;
2799
38.3k
                    }
2800
253
                }
2801
513
            }
2802
1.35k
        }
2803
2804
2.63k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.63k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.63k
        const auto& result = results.back();
2811
2812
2.63k
        if ( result.second != std::nullopt ) {
2813
408
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
408
        }
2820
2821
2.63k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.63k
        if ( options.disableTests == false ) {
2830
2.63k
            tests::test(op, result.second);
2831
2.63k
        }
2832
2833
2.63k
        postprocess(module, op, result);
2834
2.63k
    }
2835
2836
1.50k
    if ( options.noCompare == false ) {
2837
1.27k
        compare(operations, results, data, size);
2838
1.27k
    }
2839
1.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
46.7k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
46.7k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
46.7k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
59.8k
    do {
2725
59.8k
        auto op = getOp(&parentDs, data, size);
2726
59.8k
        auto module = getModule(parentDs);
2727
59.8k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
59.8k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
59.8k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
464
            break;
2736
464
        }
2737
59.8k
    } while ( parentDs.Get<bool>() == true );
2738
2739
46.7k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
46.7k
#if 1
2745
46.7k
    {
2746
46.7k
        std::set<uint64_t> moduleIDs;
2747
46.7k
        for (const auto& m : modules ) {
2748
46.4k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
46.4k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
46.4k
            moduleIDs.insert(moduleID);
2756
46.4k
        }
2757
2758
46.7k
        std::set<uint64_t> operationModuleIDs;
2759
59.2k
        for (const auto& op : operations) {
2760
59.2k
            operationModuleIDs.insert(op.first->ID);
2761
59.2k
        }
2762
2763
46.7k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
46.7k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
46.7k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
46.7k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
46.7k
    }
2771
46.7k
#endif
2772
2773
46.7k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
46.7k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
106k
    for (size_t i = 0; i < operations.size(); i++) {
2781
59.2k
        auto& operation = operations[i];
2782
2783
59.2k
        auto& module = operation.first;
2784
59.2k
        auto& op = operation.second;
2785
2786
59.2k
        if ( i > 0 ) {
2787
12.8k
            auto& prevModule = operations[i-1].first;
2788
12.8k
            auto& prevOp = operations[i-1].second;
2789
2790
12.8k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4.32k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4.32k
                if ( curModifier.size() == 0 ) {
2793
1.33M
                    for (size_t j = 0; j < 512; j++) {
2794
1.33M
                        curModifier.push_back(1);
2795
1.33M
                    }
2796
2.59k
                } else {
2797
702k
                    for (auto& c : curModifier) {
2798
702k
                        c++;
2799
702k
                    }
2800
1.72k
                }
2801
4.32k
            }
2802
12.8k
        }
2803
2804
59.2k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
59.2k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
59.2k
        const auto& result = results.back();
2811
2812
59.2k
        if ( result.second != std::nullopt ) {
2813
22.0k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
22.0k
        }
2820
2821
59.2k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.2k
        if ( options.disableTests == false ) {
2830
59.2k
            tests::test(op, result.second);
2831
59.2k
        }
2832
2833
59.2k
        postprocess(module, op, result);
2834
59.2k
    }
2835
2836
46.7k
    if ( options.noCompare == false ) {
2837
46.4k
        compare(operations, results, data, size);
2838
46.4k
    }
2839
46.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
82
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
82
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
82
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
177
    do {
2725
177
        auto op = getOp(&parentDs, data, size);
2726
177
        auto module = getModule(parentDs);
2727
177
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
177
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
177
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
177
    } while ( parentDs.Get<bool>() == true );
2738
2739
82
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
82
#if 1
2745
82
    {
2746
82
        std::set<uint64_t> moduleIDs;
2747
82
        for (const auto& m : modules ) {
2748
65
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
65
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
65
            moduleIDs.insert(moduleID);
2756
65
        }
2757
2758
82
        std::set<uint64_t> operationModuleIDs;
2759
140
        for (const auto& op : operations) {
2760
140
            operationModuleIDs.insert(op.first->ID);
2761
140
        }
2762
2763
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
82
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
82
    }
2771
82
#endif
2772
2773
82
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
82
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
222
    for (size_t i = 0; i < operations.size(); i++) {
2781
140
        auto& operation = operations[i];
2782
2783
140
        auto& module = operation.first;
2784
140
        auto& op = operation.second;
2785
2786
140
        if ( i > 0 ) {
2787
75
            auto& prevModule = operations[i-1].first;
2788
75
            auto& prevOp = operations[i-1].second;
2789
2790
75
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
33
                auto& curModifier = op.modifier.GetVectorPtr();
2792
33
                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
1.84k
                    for (auto& c : curModifier) {
2798
1.84k
                        c++;
2799
1.84k
                    }
2800
16
                }
2801
33
            }
2802
75
        }
2803
2804
140
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
140
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
140
        const auto& result = results.back();
2811
2812
140
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
140
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
140
        if ( options.disableTests == false ) {
2830
140
            tests::test(op, result.second);
2831
140
        }
2832
2833
140
        postprocess(module, op, result);
2834
140
    }
2835
2836
82
    if ( options.noCompare == false ) {
2837
65
        compare(operations, results, data, size);
2838
65
    }
2839
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
372
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
372
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
372
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
771
    do {
2725
771
        auto op = getOp(&parentDs, data, size);
2726
771
        auto module = getModule(parentDs);
2727
771
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
771
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
771
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
771
    } while ( parentDs.Get<bool>() == true );
2738
2739
372
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
372
#if 1
2745
372
    {
2746
372
        std::set<uint64_t> moduleIDs;
2747
372
        for (const auto& m : modules ) {
2748
350
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
350
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
350
            moduleIDs.insert(moduleID);
2756
350
        }
2757
2758
372
        std::set<uint64_t> operationModuleIDs;
2759
734
        for (const auto& op : operations) {
2760
734
            operationModuleIDs.insert(op.first->ID);
2761
734
        }
2762
2763
372
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
372
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
372
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
372
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
372
    }
2771
372
#endif
2772
2773
372
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
372
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.10k
    for (size_t i = 0; i < operations.size(); i++) {
2781
734
        auto& operation = operations[i];
2782
2783
734
        auto& module = operation.first;
2784
734
        auto& op = operation.second;
2785
2786
734
        if ( i > 0 ) {
2787
384
            auto& prevModule = operations[i-1].first;
2788
384
            auto& prevOp = operations[i-1].second;
2789
2790
384
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
182
                auto& curModifier = op.modifier.GetVectorPtr();
2792
182
                if ( curModifier.size() == 0 ) {
2793
71.8k
                    for (size_t j = 0; j < 512; j++) {
2794
71.6k
                        curModifier.push_back(1);
2795
71.6k
                    }
2796
140
                } else {
2797
22.1k
                    for (auto& c : curModifier) {
2798
22.1k
                        c++;
2799
22.1k
                    }
2800
42
                }
2801
182
            }
2802
384
        }
2803
2804
734
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
734
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
734
        const auto& result = results.back();
2811
2812
734
        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
734
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
734
        if ( options.disableTests == false ) {
2830
734
            tests::test(op, result.second);
2831
734
        }
2832
2833
734
        postprocess(module, op, result);
2834
734
    }
2835
2836
372
    if ( options.noCompare == false ) {
2837
350
        compare(operations, results, data, size);
2838
350
    }
2839
372
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::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
88
    do {
2725
88
        auto op = getOp(&parentDs, data, size);
2726
88
        auto module = getModule(parentDs);
2727
88
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
88
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
88
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
88
    } 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
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
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
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
17
                auto& curModifier = op.modifier.GetVectorPtr();
2792
17
                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
12
                } else {
2797
227
                    for (auto& c : curModifier) {
2798
227
                        c++;
2799
227
                    }
2800
12
                }
2801
17
            }
2802
31
        }
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
23
        compare(operations, results, data, size);
2838
23
    }
2839
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::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
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
2
            break;
2736
2
        }
2737
92
    } 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
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
41
        std::set<uint64_t> operationModuleIDs;
2759
57
        for (const auto& op : operations) {
2760
57
            operationModuleIDs.insert(op.first->ID);
2761
57
        }
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
98
    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
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
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                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
11
                } else {
2797
226
                    for (auto& c : curModifier) {
2798
226
                        c++;
2799
226
                    }
2800
11
                }
2801
16
            }
2802
31
        }
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
41
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
41
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_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
88
    do {
2725
88
        auto op = getOp(&parentDs, data, size);
2726
88
        auto module = getModule(parentDs);
2727
88
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
88
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
88
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
88
    } 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
57
        for (const auto& op : operations) {
2760
57
            operationModuleIDs.insert(op.first->ID);
2761
57
        }
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
96
    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
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
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
257
                    for (auto& c : curModifier) {
2798
257
                        c++;
2799
257
                    }
2800
15
                }
2801
19
            }
2802
34
        }
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
39
    if ( options.noCompare == false ) {
2837
23
        compare(operations, results, data, size);
2838
23
    }
2839
39
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_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
61
    do {
2725
61
        auto op = getOp(&parentDs, data, size);
2726
61
        auto module = getModule(parentDs);
2727
61
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
61
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
61
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
61
    } 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
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
29
        std::set<uint64_t> operationModuleIDs;
2759
39
        for (const auto& op : operations) {
2760
39
            operationModuleIDs.insert(op.first->ID);
2761
39
        }
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
68
    for (size_t i = 0; i < operations.size(); i++) {
2781
39
        auto& operation = operations[i];
2782
2783
39
        auto& module = operation.first;
2784
39
        auto& op = operation.second;
2785
2786
39
        if ( i > 0 ) {
2787
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
11
                auto& curModifier = op.modifier.GetVectorPtr();
2792
11
                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
280
                    for (auto& c : curModifier) {
2798
280
                        c++;
2799
280
                    }
2800
5
                }
2801
11
            }
2802
25
        }
2803
2804
39
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
39
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
39
        const auto& result = results.back();
2811
2812
39
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
39
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
39
        if ( options.disableTests == false ) {
2830
39
            tests::test(op, result.second);
2831
39
        }
2832
2833
39
        postprocess(module, op, result);
2834
39
    }
2835
2836
29
    if ( options.noCompare == false ) {
2837
14
        compare(operations, results, data, size);
2838
14
    }
2839
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
118
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
118
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
118
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
206
    do {
2725
206
        auto op = getOp(&parentDs, data, size);
2726
206
        auto module = getModule(parentDs);
2727
206
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
206
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
206
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
206
    } while ( parentDs.Get<bool>() == true );
2738
2739
118
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
118
#if 1
2745
118
    {
2746
118
        std::set<uint64_t> moduleIDs;
2747
118
        for (const auto& m : modules ) {
2748
25
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
25
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
25
            moduleIDs.insert(moduleID);
2756
25
        }
2757
2758
118
        std::set<uint64_t> operationModuleIDs;
2759
118
        for (const auto& op : operations) {
2760
63
            operationModuleIDs.insert(op.first->ID);
2761
63
        }
2762
2763
118
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
118
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
118
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
118
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
118
    }
2771
118
#endif
2772
2773
118
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
118
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
181
    for (size_t i = 0; i < operations.size(); i++) {
2781
63
        auto& operation = operations[i];
2782
2783
63
        auto& module = operation.first;
2784
63
        auto& op = operation.second;
2785
2786
63
        if ( i > 0 ) {
2787
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
4.61k
                    for (size_t j = 0; j < 512; j++) {
2794
4.60k
                        curModifier.push_back(1);
2795
4.60k
                    }
2796
10
                } else {
2797
252
                    for (auto& c : curModifier) {
2798
252
                        c++;
2799
252
                    }
2800
10
                }
2801
19
            }
2802
38
        }
2803
2804
63
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
63
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
63
        const auto& result = results.back();
2811
2812
63
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
63
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
63
        if ( options.disableTests == false ) {
2830
63
            tests::test(op, result.second);
2831
63
        }
2832
2833
63
        postprocess(module, op, result);
2834
63
    }
2835
2836
118
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
118
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
81
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
81
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
81
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
162
    do {
2725
162
        auto op = getOp(&parentDs, data, size);
2726
162
        auto module = getModule(parentDs);
2727
162
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
162
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
162
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
162
    } while ( parentDs.Get<bool>() == true );
2738
2739
81
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
81
#if 1
2745
81
    {
2746
81
        std::set<uint64_t> moduleIDs;
2747
81
        for (const auto& m : modules ) {
2748
22
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
22
            moduleIDs.insert(moduleID);
2756
22
        }
2757
2758
81
        std::set<uint64_t> operationModuleIDs;
2759
81
        for (const auto& op : operations) {
2760
69
            operationModuleIDs.insert(op.first->ID);
2761
69
        }
2762
2763
81
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
81
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
81
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
81
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
81
    }
2771
81
#endif
2772
2773
81
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
81
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
150
    for (size_t i = 0; i < operations.size(); i++) {
2781
69
        auto& operation = operations[i];
2782
2783
69
        auto& module = operation.first;
2784
69
        auto& op = operation.second;
2785
2786
69
        if ( i > 0 ) {
2787
47
            auto& prevModule = operations[i-1].first;
2788
47
            auto& prevOp = operations[i-1].second;
2789
2790
47
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
19
                auto& curModifier = op.modifier.GetVectorPtr();
2792
19
                if ( curModifier.size() == 0 ) {
2793
7.18k
                    for (size_t j = 0; j < 512; j++) {
2794
7.16k
                        curModifier.push_back(1);
2795
7.16k
                    }
2796
14
                } else {
2797
176
                    for (auto& c : curModifier) {
2798
176
                        c++;
2799
176
                    }
2800
5
                }
2801
19
            }
2802
47
        }
2803
2804
69
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
69
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
69
        const auto& result = results.back();
2811
2812
69
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
69
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
69
        if ( options.disableTests == false ) {
2830
69
            tests::test(op, result.second);
2831
69
        }
2832
2833
69
        postprocess(module, op, result);
2834
69
    }
2835
2836
81
    if ( options.noCompare == false ) {
2837
22
        compare(operations, results, data, size);
2838
22
    }
2839
81
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
87
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
87
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
87
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
172
    do {
2725
172
        auto op = getOp(&parentDs, data, size);
2726
172
        auto module = getModule(parentDs);
2727
172
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
172
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
172
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
172
    } while ( parentDs.Get<bool>() == true );
2738
2739
87
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
87
#if 1
2745
87
    {
2746
87
        std::set<uint64_t> moduleIDs;
2747
87
        for (const auto& m : modules ) {
2748
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
87
        std::set<uint64_t> operationModuleIDs;
2759
87
        for (const auto& op : operations) {
2760
63
            operationModuleIDs.insert(op.first->ID);
2761
63
        }
2762
2763
87
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
87
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
87
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
87
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
87
    }
2771
87
#endif
2772
2773
87
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
87
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
150
    for (size_t i = 0; i < operations.size(); i++) {
2781
63
        auto& operation = operations[i];
2782
2783
63
        auto& module = operation.first;
2784
63
        auto& op = operation.second;
2785
2786
63
        if ( i > 0 ) {
2787
45
            auto& prevModule = operations[i-1].first;
2788
45
            auto& prevOp = operations[i-1].second;
2789
2790
45
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
19
                auto& curModifier = op.modifier.GetVectorPtr();
2792
19
                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
12
                } else {
2797
27
                    for (auto& c : curModifier) {
2798
27
                        c++;
2799
27
                    }
2800
7
                }
2801
19
            }
2802
45
        }
2803
2804
63
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
63
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
63
        const auto& result = results.back();
2811
2812
63
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
63
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
63
        if ( options.disableTests == false ) {
2830
63
            tests::test(op, result.second);
2831
63
        }
2832
2833
63
        postprocess(module, op, result);
2834
63
    }
2835
2836
87
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
90
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
90
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
90
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
170
    do {
2725
170
        auto op = getOp(&parentDs, data, size);
2726
170
        auto module = getModule(parentDs);
2727
170
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
170
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
170
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
170
    } while ( parentDs.Get<bool>() == true );
2738
2739
90
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
90
#if 1
2745
90
    {
2746
90
        std::set<uint64_t> moduleIDs;
2747
90
        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
90
        std::set<uint64_t> operationModuleIDs;
2759
90
        for (const auto& op : operations) {
2760
60
            operationModuleIDs.insert(op.first->ID);
2761
60
        }
2762
2763
90
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
90
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
90
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
90
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
90
    }
2771
90
#endif
2772
2773
90
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
90
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
150
    for (size_t i = 0; i < operations.size(); i++) {
2781
60
        auto& operation = operations[i];
2782
2783
60
        auto& module = operation.first;
2784
60
        auto& op = operation.second;
2785
2786
60
        if ( i > 0 ) {
2787
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
60
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
60
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
60
        const auto& result = results.back();
2811
2812
60
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
60
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
60
        if ( options.disableTests == false ) {
2830
60
            tests::test(op, result.second);
2831
60
        }
2832
2833
60
        postprocess(module, op, result);
2834
60
    }
2835
2836
90
    if ( options.noCompare == false ) {
2837
19
        compare(operations, results, data, size);
2838
19
    }
2839
90
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::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
89
    do {
2725
89
        auto op = getOp(&parentDs, data, size);
2726
89
        auto module = getModule(parentDs);
2727
89
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
89
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
89
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
89
    } while ( parentDs.Get<bool>() == true );
2738
2739
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
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
35
        std::set<uint64_t> operationModuleIDs;
2759
50
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
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
85
    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
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
762
                    for (auto& c : curModifier) {
2798
762
                        c++;
2799
762
                    }
2800
11
                }
2801
18
            }
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
35
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::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
91
    do {
2725
91
        auto op = getOp(&parentDs, data, size);
2726
91
        auto module = getModule(parentDs);
2727
91
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
91
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
91
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
91
    } while ( parentDs.Get<bool>() == true );
2738
2739
34
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
34
#if 1
2745
34
    {
2746
34
        std::set<uint64_t> moduleIDs;
2747
34
        for (const auto& m : modules ) {
2748
17
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
17
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
17
            moduleIDs.insert(moduleID);
2756
17
        }
2757
2758
34
        std::set<uint64_t> operationModuleIDs;
2759
52
        for (const auto& op : operations) {
2760
52
            operationModuleIDs.insert(op.first->ID);
2761
52
        }
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
86
    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
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
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
251
                    for (auto& c : curModifier) {
2798
251
                        c++;
2799
251
                    }
2800
12
                }
2801
16
            }
2802
35
        }
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
34
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
34
}
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
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
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
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
11
                } else {
2797
642
                    for (auto& c : curModifier) {
2798
642
                        c++;
2799
642
                    }
2800
11
                }
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
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
3
            break;
2736
3
        }
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
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
46
        for (const auto& op : operations) {
2760
46
            operationModuleIDs.insert(op.first->ID);
2761
46
        }
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
79
    for (size_t i = 0; i < operations.size(); i++) {
2781
46
        auto& operation = operations[i];
2782
2783
46
        auto& module = operation.first;
2784
46
        auto& op = operation.second;
2785
2786
46
        if ( i > 0 ) {
2787
29
            auto& prevModule = operations[i-1].first;
2788
29
            auto& prevOp = operations[i-1].second;
2789
2790
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
17
                auto& curModifier = op.modifier.GetVectorPtr();
2792
17
                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
12
                } else {
2797
307
                    for (auto& c : curModifier) {
2798
307
                        c++;
2799
307
                    }
2800
12
                }
2801
17
            }
2802
29
        }
2803
2804
46
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
46
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
46
        const auto& result = results.back();
2811
2812
46
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
46
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
46
        if ( options.disableTests == false ) {
2830
46
            tests::test(op, result.second);
2831
46
        }
2832
2833
46
        postprocess(module, op, result);
2834
46
    }
2835
2836
33
    if ( options.noCompare == false ) {
2837
17
        compare(operations, results, data, size);
2838
17
    }
2839
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::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
90
    do {
2725
90
        auto op = getOp(&parentDs, data, size);
2726
90
        auto module = getModule(parentDs);
2727
90
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
90
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
90
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
90
    } 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
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
34
        std::set<uint64_t> operationModuleIDs;
2759
58
        for (const auto& op : operations) {
2760
58
            operationModuleIDs.insert(op.first->ID);
2761
58
        }
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
92
    for (size_t i = 0; i < operations.size(); i++) {
2781
58
        auto& operation = operations[i];
2782
2783
58
        auto& module = operation.first;
2784
58
        auto& op = operation.second;
2785
2786
58
        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
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
38
        }
2803
2804
58
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
58
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
58
        const auto& result = results.back();
2811
2812
58
        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
58
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
58
        if ( options.disableTests == false ) {
2830
58
            tests::test(op, result.second);
2831
58
        }
2832
2833
58
        postprocess(module, op, result);
2834
58
    }
2835
2836
34
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
34
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
73
    do {
2725
73
        auto op = getOp(&parentDs, data, size);
2726
73
        auto module = getModule(parentDs);
2727
73
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
73
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
73
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
73
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
16
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
16
            moduleIDs.insert(moduleID);
2756
16
        }
2757
2758
29
        std::set<uint64_t> operationModuleIDs;
2759
43
        for (const auto& op : operations) {
2760
43
            operationModuleIDs.insert(op.first->ID);
2761
43
        }
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
72
    for (size_t i = 0; i < operations.size(); i++) {
2781
43
        auto& operation = operations[i];
2782
2783
43
        auto& module = operation.first;
2784
43
        auto& op = operation.second;
2785
2786
43
        if ( i > 0 ) {
2787
27
            auto& prevModule = operations[i-1].first;
2788
27
            auto& prevOp = operations[i-1].second;
2789
2790
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
11
                } else {
2797
232
                    for (auto& c : curModifier) {
2798
232
                        c++;
2799
232
                    }
2800
11
                }
2801
15
            }
2802
27
        }
2803
2804
43
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
43
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
43
        const auto& result = results.back();
2811
2812
43
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
43
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
43
        if ( options.disableTests == false ) {
2830
43
            tests::test(op, result.second);
2831
43
        }
2832
2833
43
        postprocess(module, op, result);
2834
43
    }
2835
2836
29
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
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
3
            break;
2736
3
        }
2737
84
    } 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
51
        for (const auto& op : operations) {
2760
51
            operationModuleIDs.insert(op.first->ID);
2761
51
        }
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
82
    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
33
            auto& prevModule = operations[i-1].first;
2788
33
            auto& prevOp = operations[i-1].second;
2789
2790
33
            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
288
                    for (auto& c : curModifier) {
2798
288
                        c++;
2799
288
                    }
2800
11
                }
2801
17
            }
2802
33
        }
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
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
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
114
    do {
2725
114
        auto op = getOp(&parentDs, data, size);
2726
114
        auto module = getModule(parentDs);
2727
114
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
114
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
114
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
114
    } 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
40
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
40
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
40
            moduleIDs.insert(moduleID);
2756
40
        }
2757
2758
53
        std::set<uint64_t> operationModuleIDs;
2759
85
        for (const auto& op : operations) {
2760
85
            operationModuleIDs.insert(op.first->ID);
2761
85
        }
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
138
    for (size_t i = 0; i < operations.size(); i++) {
2781
85
        auto& operation = operations[i];
2782
2783
85
        auto& module = operation.first;
2784
85
        auto& op = operation.second;
2785
2786
85
        if ( i > 0 ) {
2787
45
            auto& prevModule = operations[i-1].first;
2788
45
            auto& prevOp = operations[i-1].second;
2789
2790
45
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
24
                auto& curModifier = op.modifier.GetVectorPtr();
2792
24
                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
16
                } else {
2797
523
                    for (auto& c : curModifier) {
2798
523
                        c++;
2799
523
                    }
2800
16
                }
2801
24
            }
2802
45
        }
2803
2804
85
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
85
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
85
        const auto& result = results.back();
2811
2812
85
        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
85
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
85
        if ( options.disableTests == false ) {
2830
85
            tests::test(op, result.second);
2831
85
        }
2832
2833
85
        postprocess(module, op, result);
2834
85
    }
2835
2836
53
    if ( options.noCompare == false ) {
2837
40
        compare(operations, results, data, size);
2838
40
    }
2839
53
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
48
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
48
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
48
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
116
    do {
2725
116
        auto op = getOp(&parentDs, data, size);
2726
116
        auto module = getModule(parentDs);
2727
116
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
116
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
116
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
116
    } while ( parentDs.Get<bool>() == true );
2738
2739
48
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
48
#if 1
2745
48
    {
2746
48
        std::set<uint64_t> moduleIDs;
2747
48
        for (const auto& m : modules ) {
2748
34
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
34
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
34
            moduleIDs.insert(moduleID);
2756
34
        }
2757
2758
48
        std::set<uint64_t> operationModuleIDs;
2759
84
        for (const auto& op : operations) {
2760
84
            operationModuleIDs.insert(op.first->ID);
2761
84
        }
2762
2763
48
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
48
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
48
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
48
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
48
    }
2771
48
#endif
2772
2773
48
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
48
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
132
    for (size_t i = 0; i < operations.size(); i++) {
2781
84
        auto& operation = operations[i];
2782
2783
84
        auto& module = operation.first;
2784
84
        auto& op = operation.second;
2785
2786
84
        if ( i > 0 ) {
2787
50
            auto& prevModule = operations[i-1].first;
2788
50
            auto& prevOp = operations[i-1].second;
2789
2790
50
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
27
                auto& curModifier = op.modifier.GetVectorPtr();
2792
27
                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
389
                    for (auto& c : curModifier) {
2798
389
                        c++;
2799
389
                    }
2800
10
                }
2801
27
            }
2802
50
        }
2803
2804
84
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
84
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
84
        const auto& result = results.back();
2811
2812
84
        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
84
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
84
        if ( options.disableTests == false ) {
2830
84
            tests::test(op, result.second);
2831
84
        }
2832
2833
84
        postprocess(module, op, result);
2834
84
    }
2835
2836
48
    if ( options.noCompare == false ) {
2837
34
        compare(operations, results, data, size);
2838
34
    }
2839
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
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
81
    do {
2725
81
        auto op = getOp(&parentDs, data, size);
2726
81
        auto module = getModule(parentDs);
2727
81
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
81
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
81
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
81
    } while ( parentDs.Get<bool>() == true );
2738
2739
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
50
        for (const auto& op : operations) {
2760
50
            operationModuleIDs.insert(op.first->ID);
2761
50
        }
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
82
    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
307
                    for (auto& c : curModifier) {
2798
307
                        c++;
2799
307
                    }
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
32
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
32
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
34
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
34
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
34
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
86
    do {
2725
86
        auto op = getOp(&parentDs, data, size);
2726
86
        auto module = getModule(parentDs);
2727
86
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
86
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
86
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
86
    } while ( parentDs.Get<bool>() == true );
2738
2739
34
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
34
#if 1
2745
34
    {
2746
34
        std::set<uint64_t> moduleIDs;
2747
34
        for (const auto& m : modules ) {
2748
22
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
22
            moduleIDs.insert(moduleID);
2756
22
        }
2757
2758
34
        std::set<uint64_t> operationModuleIDs;
2759
57
        for (const auto& op : operations) {
2760
57
            operationModuleIDs.insert(op.first->ID);
2761
57
        }
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
91
    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
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.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
11
                } else {
2797
229
                    for (auto& c : curModifier) {
2798
229
                        c++;
2799
229
                    }
2800
11
                }
2801
17
            }
2802
35
        }
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
34
    if ( options.noCompare == false ) {
2837
22
        compare(operations, results, data, size);
2838
22
    }
2839
34
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::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
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
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
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
33
        std::set<uint64_t> operationModuleIDs;
2759
53
        for (const auto& op : operations) {
2760
53
            operationModuleIDs.insert(op.first->ID);
2761
53
        }
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
86
    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
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
220
                    for (auto& c : curModifier) {
2798
220
                        c++;
2799
220
                    }
2800
10
                }
2801
17
            }
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
33
    if ( options.noCompare == false ) {
2837
19
        compare(operations, results, data, size);
2838
19
    }
2839
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
36
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
36
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
36
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
90
    do {
2725
90
        auto op = getOp(&parentDs, data, size);
2726
90
        auto module = getModule(parentDs);
2727
90
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
90
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
90
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
90
    } while ( parentDs.Get<bool>() == true );
2738
2739
36
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
36
#if 1
2745
36
    {
2746
36
        std::set<uint64_t> moduleIDs;
2747
36
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
36
        std::set<uint64_t> operationModuleIDs;
2759
53
        for (const auto& op : operations) {
2760
53
            operationModuleIDs.insert(op.first->ID);
2761
53
        }
2762
2763
36
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
36
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
36
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
36
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
36
    }
2771
36
#endif
2772
2773
36
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
36
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
89
    for (size_t i = 0; i < operations.size(); i++) {
2781
53
        auto& operation = operations[i];
2782
2783
53
        auto& module = operation.first;
2784
53
        auto& op = operation.second;
2785
2786
53
        if ( i > 0 ) {
2787
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
14
                auto& curModifier = op.modifier.GetVectorPtr();
2792
14
                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
11
                } else {
2797
239
                    for (auto& c : curModifier) {
2798
239
                        c++;
2799
239
                    }
2800
11
                }
2801
14
            }
2802
32
        }
2803
2804
53
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
53
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
53
        const auto& result = results.back();
2811
2812
53
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
53
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
53
        if ( options.disableTests == false ) {
2830
53
            tests::test(op, result.second);
2831
53
        }
2832
2833
53
        postprocess(module, op, result);
2834
53
    }
2835
2836
36
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::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
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
33
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
33
#if 1
2745
33
    {
2746
33
        std::set<uint64_t> moduleIDs;
2747
33
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
33
        std::set<uint64_t> operationModuleIDs;
2759
55
        for (const auto& op : operations) {
2760
55
            operationModuleIDs.insert(op.first->ID);
2761
55
        }
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
88
    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
324
                    for (auto& c : curModifier) {
2798
324
                        c++;
2799
324
                    }
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
33
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
82
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
82
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
82
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
159
    do {
2725
159
        auto op = getOp(&parentDs, data, size);
2726
159
        auto module = getModule(parentDs);
2727
159
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
159
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
159
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
159
    } while ( parentDs.Get<bool>() == true );
2738
2739
82
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
82
#if 1
2745
82
    {
2746
82
        std::set<uint64_t> moduleIDs;
2747
82
        for (const auto& m : modules ) {
2748
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
82
        std::set<uint64_t> operationModuleIDs;
2759
136
        for (const auto& op : operations) {
2760
136
            operationModuleIDs.insert(op.first->ID);
2761
136
        }
2762
2763
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
82
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
82
    }
2771
82
#endif
2772
2773
82
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
82
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
218
    for (size_t i = 0; i < operations.size(); i++) {
2781
136
        auto& operation = operations[i];
2782
2783
136
        auto& module = operation.first;
2784
136
        auto& op = operation.second;
2785
2786
136
        if ( i > 0 ) {
2787
65
            auto& prevModule = operations[i-1].first;
2788
65
            auto& prevOp = operations[i-1].second;
2789
2790
65
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
16
                } else {
2797
2.08k
                    for (auto& c : curModifier) {
2798
2.08k
                        c++;
2799
2.08k
                    }
2800
16
                }
2801
31
            }
2802
65
        }
2803
2804
136
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
136
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
136
        const auto& result = results.back();
2811
2812
136
        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
136
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
136
        if ( options.disableTests == false ) {
2830
136
            tests::test(op, result.second);
2831
136
        }
2832
2833
136
        postprocess(module, op, result);
2834
136
    }
2835
2836
82
    if ( options.noCompare == false ) {
2837
71
        compare(operations, results, data, size);
2838
71
    }
2839
82
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::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
112
    do {
2725
112
        auto op = getOp(&parentDs, data, size);
2726
112
        auto module = getModule(parentDs);
2727
112
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
112
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
112
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
112
    } 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
39
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
39
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
39
            moduleIDs.insert(moduleID);
2756
39
        }
2757
2758
51
        std::set<uint64_t> operationModuleIDs;
2759
83
        for (const auto& op : operations) {
2760
83
            operationModuleIDs.insert(op.first->ID);
2761
83
        }
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
134
    for (size_t i = 0; i < operations.size(); i++) {
2781
83
        auto& operation = operations[i];
2782
2783
83
        auto& module = operation.first;
2784
83
        auto& op = operation.second;
2785
2786
83
        if ( i > 0 ) {
2787
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
24
                auto& curModifier = op.modifier.GetVectorPtr();
2792
24
                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
12
                } else {
2797
266
                    for (auto& c : curModifier) {
2798
266
                        c++;
2799
266
                    }
2800
12
                }
2801
24
            }
2802
44
        }
2803
2804
83
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
83
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
83
        const auto& result = results.back();
2811
2812
83
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
83
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
83
        if ( options.disableTests == false ) {
2830
83
            tests::test(op, result.second);
2831
83
        }
2832
2833
83
        postprocess(module, op, result);
2834
83
    }
2835
2836
51
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
51
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::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
142
    do {
2725
142
        auto op = getOp(&parentDs, data, size);
2726
142
        auto module = getModule(parentDs);
2727
142
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
142
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
142
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
142
    } while ( parentDs.Get<bool>() == true );
2738
2739
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
68
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
68
            moduleIDs.insert(moduleID);
2756
68
        }
2757
2758
77
        std::set<uint64_t> operationModuleIDs;
2759
125
        for (const auto& op : operations) {
2760
125
            operationModuleIDs.insert(op.first->ID);
2761
125
        }
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
202
    for (size_t i = 0; i < operations.size(); i++) {
2781
125
        auto& operation = operations[i];
2782
2783
125
        auto& module = operation.first;
2784
125
        auto& op = operation.second;
2785
2786
125
        if ( i > 0 ) {
2787
57
            auto& prevModule = operations[i-1].first;
2788
57
            auto& prevOp = operations[i-1].second;
2789
2790
57
            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
610
                    for (auto& c : curModifier) {
2798
610
                        c++;
2799
610
                    }
2800
14
                }
2801
31
            }
2802
57
        }
2803
2804
125
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
125
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
125
        const auto& result = results.back();
2811
2812
125
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
125
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
125
        if ( options.disableTests == false ) {
2830
125
            tests::test(op, result.second);
2831
125
        }
2832
2833
125
        postprocess(module, op, result);
2834
125
    }
2835
2836
77
    if ( options.noCompare == false ) {
2837
68
        compare(operations, results, data, size);
2838
68
    }
2839
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
60
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
60
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
60
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
122
    do {
2725
122
        auto op = getOp(&parentDs, data, size);
2726
122
        auto module = getModule(parentDs);
2727
122
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
122
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
122
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
122
    } while ( parentDs.Get<bool>() == true );
2738
2739
60
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
60
#if 1
2745
60
    {
2746
60
        std::set<uint64_t> moduleIDs;
2747
60
        for (const auto& m : modules ) {
2748
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
60
        std::set<uint64_t> operationModuleIDs;
2759
83
        for (const auto& op : operations) {
2760
83
            operationModuleIDs.insert(op.first->ID);
2761
83
        }
2762
2763
60
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
60
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
60
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
60
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
60
    }
2771
60
#endif
2772
2773
60
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
60
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
143
    for (size_t i = 0; i < operations.size(); i++) {
2781
83
        auto& operation = operations[i];
2782
2783
83
        auto& module = operation.first;
2784
83
        auto& op = operation.second;
2785
2786
83
        if ( i > 0 ) {
2787
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
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                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
13
                } else {
2797
316
                    for (auto& c : curModifier) {
2798
316
                        c++;
2799
316
                    }
2800
13
                }
2801
18
            }
2802
40
        }
2803
2804
83
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
83
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
83
        const auto& result = results.back();
2811
2812
83
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
83
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
83
        if ( options.disableTests == false ) {
2830
83
            tests::test(op, result.second);
2831
83
        }
2832
2833
83
        postprocess(module, op, result);
2834
83
    }
2835
2836
60
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
60
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_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
191
    do {
2725
191
        auto op = getOp(&parentDs, data, size);
2726
191
        auto module = getModule(parentDs);
2727
191
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
191
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
191
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
191
    } 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
70
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
70
            moduleIDs.insert(moduleID);
2756
70
        }
2757
2758
86
        std::set<uint64_t> operationModuleIDs;
2759
154
        for (const auto& op : operations) {
2760
154
            operationModuleIDs.insert(op.first->ID);
2761
154
        }
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
240
    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
84
            auto& prevModule = operations[i-1].first;
2788
84
            auto& prevOp = operations[i-1].second;
2789
2790
84
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                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
541
                    for (auto& c : curModifier) {
2798
541
                        c++;
2799
541
                    }
2800
15
                }
2801
43
            }
2802
84
        }
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
86
    if ( options.noCompare == false ) {
2837
70
        compare(operations, results, data, size);
2838
70
    }
2839
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::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
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
3
            break;
2736
3
        }
2737
151
    } 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
61
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
61
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
61
            moduleIDs.insert(moduleID);
2756
61
        }
2757
2758
77
        std::set<uint64_t> operationModuleIDs;
2759
115
        for (const auto& op : operations) {
2760
115
            operationModuleIDs.insert(op.first->ID);
2761
115
        }
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
192
    for (size_t i = 0; i < operations.size(); i++) {
2781
115
        auto& operation = operations[i];
2782
2783
115
        auto& module = operation.first;
2784
115
        auto& op = operation.second;
2785
2786
115
        if ( i > 0 ) {
2787
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
29
                auto& curModifier = op.modifier.GetVectorPtr();
2792
29
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
15
                } else {
2797
916
                    for (auto& c : curModifier) {
2798
916
                        c++;
2799
916
                    }
2800
14
                }
2801
29
            }
2802
54
        }
2803
2804
115
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
115
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
115
        const auto& result = results.back();
2811
2812
115
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
115
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
115
        if ( options.disableTests == false ) {
2830
115
            tests::test(op, result.second);
2831
115
        }
2832
2833
115
        postprocess(module, op, result);
2834
115
    }
2835
2836
77
    if ( options.noCompare == false ) {
2837
61
        compare(operations, results, data, size);
2838
61
    }
2839
77
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
116
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
116
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
116
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
222
    do {
2725
222
        auto op = getOp(&parentDs, data, size);
2726
222
        auto module = getModule(parentDs);
2727
222
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
222
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
222
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
5
            break;
2736
5
        }
2737
222
    } while ( parentDs.Get<bool>() == true );
2738
2739
116
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
116
#if 1
2745
116
    {
2746
116
        std::set<uint64_t> moduleIDs;
2747
116
        for (const auto& m : modules ) {
2748
94
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
94
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
94
            moduleIDs.insert(moduleID);
2756
94
        }
2757
2758
116
        std::set<uint64_t> operationModuleIDs;
2759
174
        for (const auto& op : operations) {
2760
174
            operationModuleIDs.insert(op.first->ID);
2761
174
        }
2762
2763
116
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
116
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
116
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
116
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
116
    }
2771
116
#endif
2772
2773
116
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
116
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
290
    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
80
            auto& prevModule = operations[i-1].first;
2788
80
            auto& prevOp = operations[i-1].second;
2789
2790
80
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
37
                auto& curModifier = op.modifier.GetVectorPtr();
2792
37
                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
2.17k
                    for (auto& c : curModifier) {
2798
2.17k
                        c++;
2799
2.17k
                    }
2800
18
                }
2801
37
            }
2802
80
        }
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
116
    if ( options.noCompare == false ) {
2837
94
        compare(operations, results, data, size);
2838
94
    }
2839
116
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::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
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
2
            break;
2736
2
        }
2737
145
    } 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
111
        for (const auto& op : operations) {
2760
111
            operationModuleIDs.insert(op.first->ID);
2761
111
        }
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
183
    for (size_t i = 0; i < operations.size(); i++) {
2781
111
        auto& operation = operations[i];
2782
2783
111
        auto& module = operation.first;
2784
111
        auto& op = operation.second;
2785
2786
111
        if ( i > 0 ) {
2787
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
29
                auto& curModifier = op.modifier.GetVectorPtr();
2792
29
                if ( curModifier.size() == 0 ) {
2793
6.66k
                    for (size_t j = 0; j < 512; j++) {
2794
6.65k
                        curModifier.push_back(1);
2795
6.65k
                    }
2796
16
                } else {
2797
2.54k
                    for (auto& c : curModifier) {
2798
2.54k
                        c++;
2799
2.54k
                    }
2800
16
                }
2801
29
            }
2802
53
        }
2803
2804
111
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
111
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
111
        const auto& result = results.back();
2811
2812
111
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
111
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
111
        if ( options.disableTests == false ) {
2830
111
            tests::test(op, result.second);
2831
111
        }
2832
2833
111
        postprocess(module, op, result);
2834
111
    }
2835
2836
72
    if ( options.noCompare == false ) {
2837
58
        compare(operations, results, data, size);
2838
58
    }
2839
72
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
122
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
122
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
122
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
237
    do {
2725
237
        auto op = getOp(&parentDs, data, size);
2726
237
        auto module = getModule(parentDs);
2727
237
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
237
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
237
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
237
    } while ( parentDs.Get<bool>() == true );
2738
2739
122
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
122
#if 1
2745
122
    {
2746
122
        std::set<uint64_t> moduleIDs;
2747
122
        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
122
        std::set<uint64_t> operationModuleIDs;
2759
127
        for (const auto& op : operations) {
2760
127
            operationModuleIDs.insert(op.first->ID);
2761
127
        }
2762
2763
122
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
122
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
122
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
122
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
122
    }
2771
122
#endif
2772
2773
122
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
122
    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
127
        auto& operation = operations[i];
2782
2783
127
        auto& module = operation.first;
2784
127
        auto& op = operation.second;
2785
2786
127
        if ( i > 0 ) {
2787
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
27
                auto& curModifier = op.modifier.GetVectorPtr();
2792
27
                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
16
                } else {
2797
5.26k
                    for (auto& c : curModifier) {
2798
5.26k
                        c++;
2799
5.26k
                    }
2800
16
                }
2801
27
            }
2802
72
        }
2803
2804
127
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
127
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
127
        const auto& result = results.back();
2811
2812
127
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
127
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
127
        if ( options.disableTests == false ) {
2830
127
            tests::test(op, result.second);
2831
127
        }
2832
2833
127
        postprocess(module, op, result);
2834
127
    }
2835
2836
122
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
122
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
29
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
29
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
29
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
82
    do {
2725
82
        auto op = getOp(&parentDs, data, size);
2726
82
        auto module = getModule(parentDs);
2727
82
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
82
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
82
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
82
    } while ( parentDs.Get<bool>() == true );
2738
2739
29
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
29
#if 1
2745
29
    {
2746
29
        std::set<uint64_t> moduleIDs;
2747
29
        for (const auto& m : modules ) {
2748
16
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
16
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
16
            moduleIDs.insert(moduleID);
2756
16
        }
2757
2758
29
        std::set<uint64_t> operationModuleIDs;
2759
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
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
77
    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
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
1.53k
                    for (auto& c : curModifier) {
2798
1.53k
                        c++;
2799
1.53k
                    }
2800
9
                }
2801
15
            }
2802
32
        }
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
29
    if ( options.noCompare == false ) {
2837
16
        compare(operations, results, data, size);
2838
16
    }
2839
29
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
134
    do {
2725
134
        auto op = getOp(&parentDs, data, size);
2726
134
        auto module = getModule(parentDs);
2727
134
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
134
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
134
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
134
    } while ( parentDs.Get<bool>() == true );
2738
2739
66
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
66
#if 1
2745
66
    {
2746
66
        std::set<uint64_t> moduleIDs;
2747
66
        for (const auto& m : modules ) {
2748
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
66
        std::set<uint64_t> operationModuleIDs;
2759
66
        for (const auto& op : operations) {
2760
47
            operationModuleIDs.insert(op.first->ID);
2761
47
        }
2762
2763
66
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
66
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
66
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
66
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
66
    }
2771
66
#endif
2772
2773
66
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
66
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
113
    for (size_t i = 0; i < operations.size(); i++) {
2781
47
        auto& operation = operations[i];
2782
2783
47
        auto& module = operation.first;
2784
47
        auto& op = operation.second;
2785
2786
47
        if ( i > 0 ) {
2787
29
            auto& prevModule = operations[i-1].first;
2788
29
            auto& prevOp = operations[i-1].second;
2789
2790
29
            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
236
                    for (auto& c : curModifier) {
2798
236
                        c++;
2799
236
                    }
2800
10
                }
2801
16
            }
2802
29
        }
2803
2804
47
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
47
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
47
        const auto& result = results.back();
2811
2812
47
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
47
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
47
        if ( options.disableTests == false ) {
2830
47
            tests::test(op, result.second);
2831
47
        }
2832
2833
47
        postprocess(module, op, result);
2834
47
    }
2835
2836
66
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
66
}
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 */