Coverage Report

Created: 2023-09-25 06:34

/src/cryptofuzz/executor.cpp
Line
Count
Source (jump to first uncovered line)
1
#include "executor.h"
2
#include "tests.h"
3
#include "mutatorpool.h"
4
#include "config.h"
5
#include <cryptofuzz/util.h>
6
#include <fuzzing/memory.hpp>
7
#include <algorithm>
8
#include <set>
9
#include <boost/multiprecision/cpp_int.hpp>
10
11
uint32_t PRNG(void);
12
13
93.0k
#define RETURN_IF_DISABLED(option, id) if ( !option.Have(id) ) return std::nullopt;
14
15
namespace cryptofuzz {
16
17
0
static std::string GxCoordMutate(const uint64_t curveID, std::string coord) {
18
0
    if ( (PRNG()%10) != 0 ) {
19
0
        return coord;
20
0
    }
21
22
0
    if ( curveID == CF_ECC_CURVE("BLS12_381") ) {
23
0
        const static auto prime = boost::multiprecision::cpp_int("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787");
24
0
        return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str();
25
0
    } else if ( curveID == CF_ECC_CURVE("alt_bn128") ) {
26
0
        const static auto prime = boost::multiprecision::cpp_int("21888242871839275222246405745257275088696311157297823662689037894645226208583");
27
0
        return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str();
28
0
    } else {
29
0
        return coord;
30
0
    }
31
0
}
32
0
static void G1AddToPool(const uint64_t curveID, const std::string& g1_x, const std::string& g1_y) {
33
0
    Pool_CurveBLSG1.Set({ curveID, GxCoordMutate(curveID, g1_x), GxCoordMutate(curveID, g1_y) });
34
0
}
35
36
static void G2AddToPool(const uint64_t curveID,
37
                        const std::string& g2_v,
38
                        const std::string& g2_w,
39
                        const std::string& g2_x,
40
0
                        const std::string& g2_y) {
41
42
0
    Pool_CurveBLSG2.Set({ curveID,
43
0
                                    GxCoordMutate(curveID, g2_v),
44
0
                                    GxCoordMutate(curveID, g2_w),
45
0
                                    GxCoordMutate(curveID, g2_x),
46
0
                                    GxCoordMutate(curveID, g2_y)
47
0
    });
48
0
}
49
50
/* Specialization for operation::Digest */
51
5.36k
template<> void ExecutorBase<component::Digest, operation::Digest>::postprocess(std::shared_ptr<Module> module, operation::Digest& op, const ExecutorBase<component::Digest, operation::Digest>::ResultPair& result) const {
52
5.36k
    (void)module;
53
5.36k
    (void)op;
54
55
5.36k
    if ( result.second != std::nullopt ) {
56
2.83k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
2.83k
    }
58
5.36k
}
59
60
5.36k
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
5.36k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
5.36k
    return module->OpDigest(op);
64
5.36k
}
65
66
/* Specialization for operation::HMAC */
67
3.31k
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
3.31k
    (void)module;
69
3.31k
    (void)op;
70
71
3.31k
    if ( result.second != std::nullopt ) {
72
1.12k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
1.12k
    }
74
3.31k
}
75
76
3.31k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
3.31k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
3.31k
    return module->OpHMAC(op);
80
3.31k
}
81
82
/* Specialization for operation::UMAC */
83
3.17k
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
3.17k
    (void)module;
85
3.17k
    (void)op;
86
87
3.17k
    if ( result.second != std::nullopt ) {
88
1.60k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
1.60k
    }
90
3.17k
}
91
92
3.17k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
3.17k
    return module->OpUMAC(op);
94
3.17k
}
95
96
/* Specialization for operation::CMAC */
97
4.20k
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
4.20k
    (void)module;
99
4.20k
    (void)op;
100
101
4.20k
    if ( result.second != std::nullopt ) {
102
1.83k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
1.83k
    }
104
4.20k
}
105
106
4.20k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
4.20k
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
4.20k
    return module->OpCMAC(op);
110
4.20k
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
19.0k
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
19.0k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
19.0k
    if ( result.second != std::nullopt ) {
119
7.33k
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
7.33k
        if ( result.second->tag != std::nullopt ) {
121
3.29k
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
3.29k
        }
123
7.33k
    }
124
125
19.0k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
6.69k
        using fuzzing::datasource::ID;
127
128
6.69k
        bool tryDecrypt = true;
129
130
6.69k
        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
6.69k
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
6.69k
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
6.69k
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
6.69k
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
6.69k
                    op.cleartext.GetSize() + 32,
171
172
6.69k
                    op.aad,
173
174
                    /* Empty modifier */
175
6.69k
                    {});
176
177
6.69k
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
6.69k
            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
6.69k
            } 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
6.69k
        }
208
6.69k
    }
209
19.0k
}
210
211
19.0k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
19.0k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
19.0k
    return module->OpSymmetricEncrypt(op);
215
19.0k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
10.7k
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
10.7k
    (void)module;
220
10.7k
    (void)op;
221
222
10.7k
    if ( result.second != std::nullopt ) {
223
1.47k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
1.47k
    }
225
10.7k
}
226
227
10.7k
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
10.7k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
10.7k
    return module->OpSymmetricDecrypt(op);
231
10.7k
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
875
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
875
    (void)module;
236
875
    (void)op;
237
238
875
    if ( result.second != std::nullopt ) {
239
254
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
254
    }
241
875
}
242
243
875
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
875
    return module->OpKDF_SCRYPT(op);
245
875
}
246
247
/* Specialization for operation::KDF_HKDF */
248
4.56k
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
4.56k
    (void)module;
250
4.56k
    (void)op;
251
252
4.56k
    if ( result.second != std::nullopt ) {
253
2.64k
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
2.64k
    }
255
4.56k
}
256
257
4.56k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
4.56k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
4.56k
    return module->OpKDF_HKDF(op);
261
4.56k
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
463
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
463
    (void)module;
266
463
    (void)op;
267
268
463
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
463
}
272
273
463
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
463
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
463
    return module->OpKDF_PBKDF(op);
277
463
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
435
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
435
    (void)module;
282
435
    (void)op;
283
284
435
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
435
}
288
289
435
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
435
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
435
    return module->OpKDF_PBKDF1(op);
293
435
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
2.13k
template<> void ExecutorBase<component::Key, operation::KDF_PBKDF2>::postprocess(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op, const ExecutorBase<component::Key, operation::KDF_PBKDF2>::ResultPair& result) const {
297
2.13k
    (void)module;
298
2.13k
    (void)op;
299
300
2.13k
    if ( result.second != std::nullopt ) {
301
708
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
708
    }
303
2.13k
}
304
305
2.13k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
2.13k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
2.13k
    return module->OpKDF_PBKDF2(op);
309
2.13k
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
587
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
587
    (void)module;
314
587
    (void)op;
315
316
587
    if ( result.second != std::nullopt ) {
317
263
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
263
    }
319
587
}
320
321
587
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
587
    return module->OpKDF_ARGON2(op);
323
587
}
324
325
/* Specialization for operation::KDF_SSH */
326
533
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
533
    (void)module;
328
533
    (void)op;
329
330
533
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
533
}
334
335
533
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
533
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
533
    return module->OpKDF_SSH(op);
339
533
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
589
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
589
    (void)module;
344
589
    (void)op;
345
346
589
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
589
}
350
351
589
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
589
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
589
    return module->OpKDF_TLS1_PRF(op);
355
589
}
356
357
/* Specialization for operation::KDF_X963 */
358
441
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
441
    (void)module;
360
441
    (void)op;
361
362
441
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
441
}
366
367
441
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
441
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
441
    return module->OpKDF_X963(op);
371
441
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
133
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
133
    (void)module;
376
133
    (void)op;
377
378
133
    if ( result.second != std::nullopt ) {
379
32
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
32
    }
381
133
}
382
383
133
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
133
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
133
    return module->OpKDF_BCRYPT(op);
387
133
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
1.75k
template<> void ExecutorBase<component::Key, operation::KDF_SP_800_108>::postprocess(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op, const ExecutorBase<component::Key, operation::KDF_SP_800_108>::ResultPair& result) const {
391
1.75k
    (void)module;
392
1.75k
    (void)op;
393
394
1.75k
    if ( result.second != std::nullopt ) {
395
834
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
834
    }
397
1.75k
}
398
399
1.75k
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SP_800_108>::callModule(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op) const {
400
1.75k
    if ( op.mech.mode == true ) {
401
1.05k
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
1.05k
    }
403
404
1.75k
    return module->OpKDF_SP_800_108(op);
405
1.75k
}
406
407
408
/* Specialization for operation::ECC_PrivateToPublic */
409
1.74k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
410
1.74k
    (void)module;
411
412
1.74k
    if ( result.second != std::nullopt  ) {
413
804
        const auto curveID = op.curveType.Get();
414
804
        const auto privkey = op.priv.ToTrimmedString();
415
804
        const auto pub_x = result.second->first.ToTrimmedString();
416
804
        const auto pub_y = result.second->second.ToTrimmedString();
417
418
804
        Pool_CurvePrivkey.Set({ curveID, privkey });
419
804
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
420
804
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
421
422
804
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
423
804
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
424
804
    }
425
1.74k
}
426
427
1.74k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
428
1.74k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
429
430
1.74k
    const size_t size = op.priv.ToTrimmedString().size();
431
432
1.74k
    if ( size == 0 || size > 4096 ) {
433
0
        return std::nullopt;
434
0
    }
435
436
1.74k
    return module->OpECC_PrivateToPublic(op);
437
1.74k
}
438
439
/* Specialization for operation::ECC_ValidatePubkey */
440
1.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 {
441
1.85k
    (void)module;
442
1.85k
    (void)op;
443
1.85k
    (void)result;
444
1.85k
}
445
446
1.85k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
447
1.85k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
448
449
1.85k
    return module->OpECC_ValidatePubkey(op);
450
1.85k
}
451
452
/* Specialization for operation::ECC_GenerateKeyPair */
453
454
/* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */
455
template <>
456
56
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
457
56
    (void)operations;
458
56
    (void)results;
459
56
    (void)data;
460
56
    (void)size;
461
56
}
462
463
1.56k
template<> void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op, const ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::ResultPair& result) const {
464
1.56k
    (void)module;
465
466
1.56k
    if ( result.second != std::nullopt  ) {
467
378
        const auto curveID = op.curveType.Get();
468
378
        const auto privkey = result.second->priv.ToTrimmedString();
469
378
        const auto pub_x = result.second->pub.first.ToTrimmedString();
470
378
        const auto pub_y = result.second->pub.second.ToTrimmedString();
471
472
378
        Pool_CurvePrivkey.Set({ curveID, privkey });
473
378
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
474
378
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
475
378
    }
476
1.56k
}
477
478
1.56k
template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const {
479
1.56k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
480
481
1.56k
    return module->OpECC_GenerateKeyPair(op);
482
1.56k
}
483
484
/* Specialization for operation::ECCSI_Sign */
485
152
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 {
486
152
    (void)module;
487
488
152
    if ( result.second != std::nullopt  ) {
489
0
        const auto curveID = op.curveType.Get();
490
0
        const auto cleartext = op.cleartext.ToHex();
491
0
        const auto id = op.id.ToHex();
492
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
493
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
494
0
        const auto pvt_x = result.second->pvt.first.ToTrimmedString();
495
0
        const auto pvt_y = result.second->pvt.second.ToTrimmedString();
496
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
497
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
498
499
0
        Pool_CurveECCSISignature.Set({
500
0
                curveID,
501
0
                cleartext,
502
0
                id,
503
0
                pub_x, pub_y,
504
0
                pvt_x, pvt_y,
505
0
                sig_r, sig_s});
506
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
507
0
        Pool_CurveECC_Point.Set({ curveID, pvt_x, pvt_y });
508
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
509
510
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
511
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
512
0
        if ( pvt_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_x); }
513
0
        if ( pvt_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_y); }
514
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
515
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
516
517
0
        {
518
0
            auto opVerify = operation::ECCSI_Verify(
519
0
                    op,
520
0
                    *(result.second),
521
0
                    op.modifier);
522
523
0
            const auto verifyResult = module->OpECCSI_Verify(opVerify);
524
0
            CF_ASSERT(
525
0
                    verifyResult == std::nullopt ||
526
0
                    *verifyResult == true,
527
0
                    "Cannot verify generated signature");
528
0
        }
529
0
    }
530
152
}
531
532
152
template<> std::optional<component::ECCSI_Signature> ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Sign& op) const {
533
152
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
534
152
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
535
536
152
    const size_t size = op.priv.ToTrimmedString().size();
537
538
152
    if ( size == 0 || size > 4096 ) {
539
0
        return std::nullopt;
540
0
    }
541
542
152
    return module->OpECCSI_Sign(op);
543
152
}
544
545
/* Specialization for operation::ECDSA_Sign */
546
1.84k
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 {
547
1.84k
    (void)module;
548
549
1.84k
    if ( result.second != std::nullopt  ) {
550
889
        const auto curveID = op.curveType.Get();
551
889
        const auto cleartext = op.cleartext.ToHex();
552
889
        const auto pub_x = result.second->pub.first.ToTrimmedString();
553
889
        const auto pub_y = result.second->pub.second.ToTrimmedString();
554
889
        const auto sig_r = result.second->signature.first.ToTrimmedString();
555
889
        const auto sig_s = result.second->signature.second.ToTrimmedString();
556
557
889
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
558
889
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
559
889
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
560
561
889
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
562
889
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
563
889
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
564
889
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
565
566
889
        {
567
889
            auto opVerify = operation::ECDSA_Verify(
568
889
                    op,
569
889
                    *(result.second),
570
889
                    op.modifier);
571
572
889
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
573
889
            CF_ASSERT(
574
889
                    verifyResult == std::nullopt ||
575
889
                    *verifyResult == true,
576
889
                    "Cannot verify generated signature");
577
889
        }
578
889
    }
579
1.84k
}
580
581
1.84k
template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const {
582
1.84k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
583
1.84k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
584
585
1.84k
    const size_t size = op.priv.ToTrimmedString().size();
586
587
1.84k
    if ( size == 0 || size > 4096 ) {
588
2
        return std::nullopt;
589
2
    }
590
591
1.84k
    return module->OpECDSA_Sign(op);
592
1.84k
}
593
594
/* Specialization for operation::ECGDSA_Sign */
595
457
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 {
596
457
    (void)module;
597
598
457
    if ( result.second != std::nullopt  ) {
599
73
        const auto curveID = op.curveType.Get();
600
73
        const auto cleartext = op.cleartext.ToHex();
601
73
        const auto pub_x = result.second->pub.first.ToTrimmedString();
602
73
        const auto pub_y = result.second->pub.second.ToTrimmedString();
603
73
        const auto sig_r = result.second->signature.first.ToTrimmedString();
604
73
        const auto sig_s = result.second->signature.second.ToTrimmedString();
605
606
73
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
607
73
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
608
73
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
609
610
73
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
611
73
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
612
73
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
613
73
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
614
73
    }
615
457
}
616
617
457
template<> std::optional<component::ECGDSA_Signature> ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op) const {
618
457
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
619
457
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
620
621
457
    const size_t size = op.priv.ToTrimmedString().size();
622
623
457
    if ( size == 0 || size > 4096 ) {
624
9
        return std::nullopt;
625
9
    }
626
627
448
    return module->OpECGDSA_Sign(op);
628
457
}
629
630
/* Specialization for operation::ECRDSA_Sign */
631
148
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 {
632
148
    (void)module;
633
634
148
    if ( result.second != std::nullopt  ) {
635
0
        const auto curveID = op.curveType.Get();
636
0
        const auto cleartext = op.cleartext.ToHex();
637
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
638
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
639
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
640
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
641
642
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
643
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
644
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
645
646
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
647
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
648
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
649
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
650
0
    }
651
148
}
652
653
148
template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const {
654
148
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
655
148
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
656
657
148
    const size_t size = op.priv.ToTrimmedString().size();
658
659
148
    if ( size == 0 || size > 4096 ) {
660
0
        return std::nullopt;
661
0
    }
662
663
148
    return module->OpECRDSA_Sign(op);
664
148
}
665
666
/* Specialization for operation::Schnorr_Sign */
667
172
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 {
668
172
    (void)module;
669
670
172
    if ( result.second != std::nullopt  ) {
671
0
        const auto curveID = op.curveType.Get();
672
0
        const auto cleartext = op.cleartext.ToHex();
673
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
674
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
675
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
676
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
677
678
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
679
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
680
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
681
682
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
683
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
684
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
685
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
686
0
    }
687
172
}
688
689
172
template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const {
690
172
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
691
172
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
692
693
172
    const size_t size = op.priv.ToTrimmedString().size();
694
695
172
    if ( size == 0 || size > 4096 ) {
696
0
        return std::nullopt;
697
0
    }
698
699
172
    return module->OpSchnorr_Sign(op);
700
172
}
701
702
/* Specialization for operation::ECCSI_Verify */
703
151
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 {
704
151
    (void)module;
705
151
    (void)op;
706
151
    (void)result;
707
151
}
708
709
151
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
710
151
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
711
151
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
712
713
151
    return module->OpECCSI_Verify(op);
714
151
}
715
716
/* Specialization for operation::ECDSA_Verify */
717
895
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 {
718
895
    (void)module;
719
895
    (void)op;
720
895
    (void)result;
721
895
}
722
723
895
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
724
895
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
895
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
    /* Intentionally do not constrain the size of the public key or
728
     * signature (like we do for BignumCalc).
729
     *
730
     * If any large public key or signature causes a time-out (or
731
     * worse), this is something that needs attention;
732
     * because verifiers sometimes process untrusted public keys,
733
     * signatures or both, they should be resistant to bugs
734
     * arising from large inputs.
735
     */
736
737
895
    return module->OpECDSA_Verify(op);
738
895
}
739
740
/* Specialization for operation::ECGDSA_Verify */
741
531
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 {
742
531
    (void)module;
743
531
    (void)op;
744
531
    (void)result;
745
531
}
746
747
531
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
748
531
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
749
531
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
750
751
    /* Intentionally do not constrain the size of the public key or
752
     * signature (like we do for BignumCalc).
753
     *
754
     * If any large public key or signature causes a time-out (or
755
     * worse), this is something that needs attention;
756
     * because verifiers sometimes process untrusted public keys,
757
     * signatures or both, they should be resistant to bugs
758
     * arising from large inputs.
759
     */
760
761
531
    return module->OpECGDSA_Verify(op);
762
531
}
763
764
/* Specialization for operation::ECRDSA_Verify */
765
128
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 {
766
128
    (void)module;
767
128
    (void)op;
768
128
    (void)result;
769
128
}
770
771
128
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
772
128
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
773
128
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
774
775
    /* Intentionally do not constrain the size of the public key or
776
     * signature (like we do for BignumCalc).
777
     *
778
     * If any large public key or signature causes a time-out (or
779
     * worse), this is something that needs attention;
780
     * because verifiers sometimes process untrusted public keys,
781
     * signatures or both, they should be resistant to bugs
782
     * arising from large inputs.
783
     */
784
785
128
    return module->OpECRDSA_Verify(op);
786
128
}
787
788
/* Specialization for operation::Schnorr_Verify */
789
134
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 {
790
134
    (void)module;
791
134
    (void)op;
792
134
    (void)result;
793
134
}
794
795
134
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
796
134
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
797
134
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
798
799
    /* Intentionally do not constrain the size of the public key or
800
     * signature (like we do for BignumCalc).
801
     *
802
     * If any large public key or signature causes a time-out (or
803
     * worse), this is something that needs attention;
804
     * because verifiers sometimes process untrusted public keys,
805
     * signatures or both, they should be resistant to bugs
806
     * arising from large inputs.
807
     */
808
809
134
    return module->OpSchnorr_Verify(op);
810
134
}
811
812
1.45k
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 {
813
1.45k
    (void)module;
814
1.45k
    (void)op;
815
1.45k
    (void)result;
816
1.45k
}
817
818
1.45k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
819
1.45k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
820
1.45k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
821
822
1.45k
    return module->OpECDSA_Recover(op);
823
1.45k
}
824
825
/* Specialization for operation::DSA_Verify */
826
0
template<> void ExecutorBase<bool, operation::DSA_Verify>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Verify& op) const {
827
0
    (void)moduleID;
828
0
    (void)op;
829
830
    /* TODO */
831
0
}
832
833
750
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 {
834
750
    (void)module;
835
750
    (void)op;
836
750
    (void)result;
837
750
}
838
839
750
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
840
750
    const std::vector<size_t> sizes = {
841
750
        op.parameters.p.ToTrimmedString().size(),
842
750
        op.parameters.q.ToTrimmedString().size(),
843
750
        op.parameters.g.ToTrimmedString().size(),
844
750
        op.pub.ToTrimmedString().size(),
845
750
        op.signature.first.ToTrimmedString().size(),
846
750
        op.signature.second.ToTrimmedString().size(),
847
750
    };
848
849
4.48k
    for (const auto& size : sizes) {
850
4.48k
        if ( size == 0 || size > 4096 ) {
851
9
            return std::nullopt;
852
9
        }
853
4.48k
    }
854
855
741
    return module->OpDSA_Verify(op);
856
750
}
857
858
/* Specialization for operation::DSA_Sign */
859
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
860
template <>
861
74
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 {
862
74
    (void)operations;
863
74
    (void)results;
864
74
    (void)data;
865
74
    (void)size;
866
74
}
867
0
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Sign& op) const {
868
0
    (void)moduleID;
869
0
    (void)op;
870
871
    /* TODO */
872
0
}
873
874
230
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 {
875
230
    (void)module;
876
230
    (void)op;
877
230
    if ( result.second != std::nullopt ) {
878
0
        const auto cleartext = op.cleartext.ToHex();
879
0
        const auto p = op.parameters.p.ToTrimmedString();
880
0
        const auto q = op.parameters.q.ToTrimmedString();
881
0
        const auto g = op.parameters.g.ToTrimmedString();
882
0
        const auto r = result.second->signature.first.ToTrimmedString();
883
0
        const auto s = result.second->signature.second.ToTrimmedString();
884
0
        const auto pub = result.second->pub.ToTrimmedString();
885
886
0
        Pool_DSASignature.Set({
887
0
                cleartext,
888
0
                p,
889
0
                q,
890
0
                g,
891
0
                pub,
892
0
                r,
893
0
                s
894
0
        });
895
896
0
        if ( r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(r); }
897
0
        if ( s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(s); }
898
0
    }
899
230
}
900
901
230
template<> std::optional<component::DSA_Signature> ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::callModule(std::shared_ptr<Module> module, operation::DSA_Sign& op) const {
902
230
    const std::vector<size_t> sizes = {
903
230
        op.parameters.p.ToTrimmedString().size(),
904
230
        op.parameters.q.ToTrimmedString().size(),
905
230
        op.parameters.g.ToTrimmedString().size(),
906
230
        op.priv.ToTrimmedString().size(),
907
230
    };
908
909
916
    for (const auto& size : sizes) {
910
916
        if ( size == 0 || size > 4096 ) {
911
4
            return std::nullopt;
912
4
        }
913
916
    }
914
915
226
    return module->OpDSA_Sign(op);
916
230
}
917
918
/* Specialization for operation::DSA_PrivateToPublic */
919
920
0
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::updateExtraCounters(const uint64_t moduleID, operation::DSA_PrivateToPublic& op) const {
921
0
    (void)moduleID;
922
0
    (void)op;
923
924
    /* TODO */
925
0
}
926
927
129
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 {
928
129
    (void)result;
929
129
    (void)module;
930
129
    (void)op;
931
129
    if ( result.second != std::nullopt ) {
932
        //Pool_DSA_PubPriv.Set({pub, priv});
933
0
    }
934
129
}
935
936
129
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
937
129
    return module->OpDSA_PrivateToPublic(op);
938
129
}
939
940
/* Specialization for operation::DSA_GenerateKeyPair */
941
942
/* Do not compare DSA_GenerateKeyPair results, because the result can be produced indeterministically */
943
template <>
944
66
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 {
945
66
    (void)operations;
946
66
    (void)results;
947
66
    (void)data;
948
66
    (void)size;
949
66
}
950
951
0
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateKeyPair& op) const {
952
0
    (void)moduleID;
953
0
    (void)op;
954
955
    /* TODO */
956
0
}
957
958
224
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 {
959
224
    (void)result;
960
224
    (void)module;
961
224
    (void)op;
962
224
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
963
0
        const auto priv = result.second->first.ToTrimmedString();
964
0
        const auto pub = result.second->second.ToTrimmedString();
965
966
0
        Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
224
}
969
970
224
template<> std::optional<component::DSA_KeyPair> ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op) const {
971
224
    const std::vector<size_t> sizes = {
972
224
        op.p.ToTrimmedString().size(),
973
224
        op.q.ToTrimmedString().size(),
974
224
        op.g.ToTrimmedString().size(),
975
224
    };
976
977
667
    for (const auto& size : sizes) {
978
667
        if ( size == 0 || size > 4096 ) {
979
14
            return std::nullopt;
980
14
        }
981
667
    }
982
983
210
    return module->OpDSA_GenerateKeyPair(op);
984
224
}
985
986
/* Specialization for operation::DSA_GenerateParameters */
987
988
/* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */
989
template <>
990
34
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 {
991
34
    (void)operations;
992
34
    (void)results;
993
34
    (void)data;
994
34
    (void)size;
995
34
}
996
997
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const {
998
0
    (void)moduleID;
999
0
    (void)op;
1000
1001
    /* TODO */
1002
0
}
1003
1004
124
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 {
1005
124
    (void)result;
1006
124
    (void)module;
1007
124
    (void)op;
1008
124
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1009
0
        const auto P = result.second->p.ToTrimmedString();
1010
0
        const auto Q = result.second->q.ToTrimmedString();
1011
0
        const auto G = result.second->g.ToTrimmedString();
1012
1013
0
        Pool_DSA_PQG.Set({P, Q, G});
1014
1015
0
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1016
0
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1017
0
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1018
0
    }
1019
124
}
1020
1021
124
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1022
124
    return module->OpDSA_GenerateParameters(op);
1023
124
}
1024
1025
/* Specialization for operation::ECDH_Derive */
1026
134
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 {
1027
134
    (void)module;
1028
134
    (void)op;
1029
134
    (void)result;
1030
134
}
1031
1032
134
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1033
134
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1034
1035
134
    return module->OpECDH_Derive(op);
1036
134
}
1037
1038
/* Specialization for operation::ECIES_Encrypt */
1039
template <>
1040
48
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 {
1041
48
    (void)operations;
1042
48
    (void)results;
1043
48
    (void)data;
1044
48
    (void)size;
1045
48
}
1046
168
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 {
1047
168
    (void)module;
1048
168
    (void)op;
1049
168
    (void)result;
1050
168
}
1051
1052
168
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1053
168
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1054
1055
168
    return module->OpECIES_Encrypt(op);
1056
168
}
1057
1058
/* Specialization for operation::ECIES_Decrypt */
1059
143
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 {
1060
143
    (void)module;
1061
143
    (void)op;
1062
143
    (void)result;
1063
143
}
1064
1065
143
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1066
143
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1067
1068
143
    return module->OpECIES_Decrypt(op);
1069
143
}
1070
1071
/* Specialization for operation::ECC_Point_Add */
1072
276
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 {
1073
276
    (void)module;
1074
1075
276
    if ( result.second != std::nullopt  ) {
1076
26
        const auto curveID = op.curveType.Get();
1077
26
        const auto x = result.second->first.ToTrimmedString();
1078
26
        const auto y = result.second->second.ToTrimmedString();
1079
1080
26
        Pool_CurveECC_Point.Set({ curveID, x, y });
1081
1082
26
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1083
26
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1084
26
    }
1085
276
}
1086
1087
276
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 {
1088
276
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1089
1090
276
    return module->OpECC_Point_Add(op);
1091
276
}
1092
1093
/* Specialization for operation::ECC_Point_Sub */
1094
312
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 {
1095
312
    (void)module;
1096
1097
312
    if ( result.second != std::nullopt  ) {
1098
48
        const auto curveID = op.curveType.Get();
1099
48
        const auto x = result.second->first.ToTrimmedString();
1100
48
        const auto y = result.second->second.ToTrimmedString();
1101
1102
48
        Pool_CurveECC_Point.Set({ curveID, x, y });
1103
1104
48
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1105
48
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1106
48
    }
1107
312
}
1108
1109
312
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 {
1110
312
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1111
1112
312
    return module->OpECC_Point_Sub(op);
1113
312
}
1114
1115
/* Specialization for operation::ECC_Point_Mul */
1116
457
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 {
1117
457
    (void)module;
1118
1119
457
    if ( result.second != std::nullopt  ) {
1120
148
        const auto curveID = op.curveType.Get();
1121
148
        const auto x = result.second->first.ToTrimmedString();
1122
148
        const auto y = result.second->second.ToTrimmedString();
1123
1124
148
        Pool_CurveECC_Point.Set({ curveID, x, y });
1125
1126
148
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1127
148
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1128
148
    }
1129
457
}
1130
1131
457
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 {
1132
457
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1133
1134
457
    return module->OpECC_Point_Mul(op);
1135
457
}
1136
1137
/* Specialization for operation::ECC_Point_Neg */
1138
246
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 {
1139
246
    (void)module;
1140
1141
246
    if ( result.second != std::nullopt  ) {
1142
44
        const auto curveID = op.curveType.Get();
1143
44
        const auto x = result.second->first.ToTrimmedString();
1144
44
        const auto y = result.second->second.ToTrimmedString();
1145
1146
44
        Pool_CurveECC_Point.Set({ curveID, x, y });
1147
1148
44
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1149
44
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1150
44
    }
1151
246
}
1152
1153
246
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 {
1154
246
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1155
1156
246
    return module->OpECC_Point_Neg(op);
1157
246
}
1158
1159
/* Specialization for operation::ECC_Point_Dbl */
1160
229
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 {
1161
229
    (void)module;
1162
1163
229
    if ( result.second != std::nullopt  ) {
1164
32
        const auto curveID = op.curveType.Get();
1165
32
        const auto x = result.second->first.ToTrimmedString();
1166
32
        const auto y = result.second->second.ToTrimmedString();
1167
1168
32
        Pool_CurveECC_Point.Set({ curveID, x, y });
1169
1170
32
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1171
32
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1172
32
    }
1173
229
}
1174
1175
229
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 {
1176
229
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1177
1178
229
    return module->OpECC_Point_Dbl(op);
1179
229
}
1180
1181
/* Specialization for operation::ECC_Point_Cmp */
1182
238
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 {
1183
238
    (void)module;
1184
238
    (void)result;
1185
238
    (void)op;
1186
238
}
1187
1188
238
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1189
238
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1190
1191
238
    return module->OpECC_Point_Cmp(op);
1192
238
}
1193
1194
/* Specialization for operation::DH_Derive */
1195
677
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 {
1196
677
    (void)module;
1197
677
    (void)op;
1198
677
    (void)result;
1199
677
}
1200
1201
677
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1202
677
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1203
668
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1204
659
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1205
650
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1206
1207
641
    return module->OpDH_Derive(op);
1208
650
}
1209
1210
/* Specialization for operation::DH_GenerateKeyPair */
1211
195
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 {
1212
195
    (void)result;
1213
195
    (void)op;
1214
195
    (void)module;
1215
1216
195
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1217
0
        const auto priv = result.second->first.ToTrimmedString();
1218
0
        const auto pub = result.second->second.ToTrimmedString();
1219
1220
0
        Pool_DH_PrivateKey.Set(priv);
1221
0
        Pool_DH_PublicKey.Set(pub);
1222
0
    }
1223
195
}
1224
1225
195
template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const {
1226
195
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1227
186
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1228
1229
177
    return module->OpDH_GenerateKeyPair(op);
1230
186
}
1231
1232
/* Specialization for operation::BignumCalc */
1233
17.0k
template<> void ExecutorBase<component::Bignum, operation::BignumCalc>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc& op, const ExecutorBase<component::Bignum, operation::BignumCalc>::ResultPair& result) const {
1234
17.0k
    (void)module;
1235
17.0k
    (void)op;
1236
1237
17.0k
    if ( result.second != std::nullopt  ) {
1238
4.04k
        const auto bignum = result.second->ToTrimmedString();
1239
1240
4.04k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1241
4.02k
            Pool_Bignum.Set(bignum);
1242
4.02k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1243
573
                Pool_Bignum_Primes.Set(bignum);
1244
573
            }
1245
4.02k
        }
1246
4.04k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1247
252
            if ( bignum == "1" ) {
1248
124
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1249
124
            }
1250
252
        }
1251
4.04k
    }
1252
17.0k
}
1253
1254
17.0k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1255
17.0k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1256
1257
    /* Prevent timeouts */
1258
17.0k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1259
17.0k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1260
17.0k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
17.0k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
17.0k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1264
1.69k
        return std::nullopt;
1265
1.69k
    }
1266
1267
15.3k
    switch ( op.calcOp.Get() ) {
1268
51
        case    CF_CALCOP("SetBit(A,B)"):
1269
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1270
51
            if ( op.bn1.GetSize() > 4 ) {
1271
13
                return std::nullopt;
1272
13
            }
1273
38
            break;
1274
74
        case    CF_CALCOP("Exp(A,B)"):
1275
74
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1276
20
                return std::nullopt;
1277
20
            }
1278
54
            break;
1279
54
        case    CF_CALCOP("ModLShift(A,B,C)"):
1280
20
            if ( op.bn1.GetSize() > 4 ) {
1281
10
                return std::nullopt;
1282
10
            }
1283
10
            break;
1284
129
        case    CF_CALCOP("Exp2(A)"):
1285
129
            if ( op.bn0.GetSize() > 4 ) {
1286
10
                return std::nullopt;
1287
10
            }
1288
119
            break;
1289
15.3k
    }
1290
1291
15.3k
    return module->OpBignumCalc(op);
1292
15.3k
}
1293
1294
/* Specialization for operation::BignumCalc_Fp2 */
1295
215
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 {
1296
215
    (void)module;
1297
215
    (void)op;
1298
1299
215
    if ( result.second != std::nullopt  ) {
1300
0
        const auto bignum_first = result.second->first.ToTrimmedString();
1301
0
        const auto bignum_second = result.second->second.ToTrimmedString();
1302
1303
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1304
0
            Pool_Bignum.Set(bignum_first);
1305
0
        }
1306
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1307
0
            Pool_Bignum.Set(bignum_second);
1308
0
        }
1309
0
    }
1310
215
}
1311
1312
215
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1313
215
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1314
1315
    /* Prevent timeouts */
1316
215
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1317
206
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1318
197
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1319
188
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1320
179
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1321
170
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1322
161
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1323
152
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1324
1325
143
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1326
0
        return std::nullopt;
1327
0
    }
1328
1329
143
    return module->OpBignumCalc_Fp2(op);
1330
143
}
1331
1332
/* Specialization for operation::BignumCalc_Fp12 */
1333
675
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 {
1334
675
    (void)module;
1335
675
    (void)op;
1336
1337
675
    if ( result.second != std::nullopt  ) {
1338
0
        Pool_Fp12.Set({
1339
0
                result.second->bn1.ToTrimmedString(),
1340
0
                result.second->bn2.ToTrimmedString(),
1341
0
                result.second->bn3.ToTrimmedString(),
1342
0
                result.second->bn4.ToTrimmedString(),
1343
0
                result.second->bn5.ToTrimmedString(),
1344
0
                result.second->bn6.ToTrimmedString(),
1345
0
                result.second->bn7.ToTrimmedString(),
1346
0
                result.second->bn8.ToTrimmedString(),
1347
0
                result.second->bn9.ToTrimmedString(),
1348
0
                result.second->bn10.ToTrimmedString(),
1349
0
                result.second->bn11.ToTrimmedString(),
1350
0
                result.second->bn12.ToTrimmedString()
1351
0
        });
1352
        /* TODO */
1353
#if 0
1354
        const auto bignum_first = result.second->first.ToTrimmedString();
1355
        const auto bignum_second = result.second->second.ToTrimmedString();
1356
1357
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1358
            Pool_Bignum.Set(bignum_first);
1359
        }
1360
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1361
            Pool_Bignum.Set(bignum_second);
1362
        }
1363
#endif
1364
0
    }
1365
675
}
1366
1367
675
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1368
675
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1369
1370
    /* Prevent timeouts */
1371
675
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1372
666
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1373
657
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1374
648
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1375
639
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1376
630
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1377
621
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1378
612
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1379
603
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1380
594
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1381
585
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1382
576
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1383
1384
567
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1385
558
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1386
549
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1387
540
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1388
531
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1389
522
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1390
513
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1391
504
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1392
495
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1393
486
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1394
477
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1395
468
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1396
1397
459
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1398
450
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1399
441
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1400
432
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1401
423
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1402
414
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1403
405
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1404
396
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1405
387
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
378
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
369
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
360
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
1410
351
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
342
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
333
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
324
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
315
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
306
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
297
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
288
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1418
279
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
270
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
261
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
252
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
1423
243
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1424
0
        return std::nullopt;
1425
0
    }
1426
1427
243
    return module->OpBignumCalc_Fp12(op);
1428
243
}
1429
1430
/* Specialization for operation::BLS_PrivateToPublic */
1431
148
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 {
1432
148
    (void)module;
1433
1434
148
    if ( result.second != std::nullopt  ) {
1435
0
        const auto curveID = op.curveType.Get();
1436
0
        const auto g1_x = result.second->first.ToTrimmedString();
1437
0
        const auto g1_y = result.second->second.ToTrimmedString();
1438
1439
0
        G1AddToPool(curveID, g1_x, g1_y);
1440
1441
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1442
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1443
0
    }
1444
148
}
1445
1446
148
template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const {
1447
148
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1448
1449
148
    const size_t size = op.priv.ToTrimmedString().size();
1450
1451
148
    if ( size == 0 || size > 4096 ) {
1452
9
        return std::nullopt;
1453
9
    }
1454
1455
139
    return module->OpBLS_PrivateToPublic(op);
1456
148
}
1457
1458
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1459
142
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 {
1460
142
    (void)module;
1461
142
    if ( result.second != std::nullopt  ) {
1462
0
        const auto curveID = op.curveType.Get();
1463
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1464
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1465
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1466
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1467
1468
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1469
1470
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1471
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1472
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1473
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1474
0
    }
1475
142
}
1476
1477
142
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const {
1478
142
    const size_t size = op.priv.ToTrimmedString().size();
1479
1480
142
    if ( size == 0 || size > 4096 ) {
1481
9
        return std::nullopt;
1482
9
    }
1483
1484
133
    return module->OpBLS_PrivateToPublic_G2(op);
1485
142
}
1486
1487
/* Specialization for operation::BLS_Sign */
1488
149
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 {
1489
149
    (void)module;
1490
1491
149
    if ( result.second != std::nullopt  ) {
1492
0
        const auto curveID = op.curveType.Get();
1493
0
        const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : "";
1494
0
        const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : "";
1495
0
        const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : "";
1496
0
        const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : "";
1497
0
        const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : "";
1498
0
        const auto dest = op.dest.ToHex();
1499
0
        const auto aug = op.aug.ToHex();
1500
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
1501
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
1502
0
        const auto sig_v = result.second->signature.first.first.ToTrimmedString();
1503
0
        const auto sig_w = result.second->signature.first.second.ToTrimmedString();
1504
0
        const auto sig_x = result.second->signature.second.first.ToTrimmedString();
1505
0
        const auto sig_y = result.second->signature.second.second.ToTrimmedString();
1506
1507
0
        G1AddToPool(curveID, pub_x, pub_y);
1508
0
        G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y);
1509
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});
1510
1511
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
1512
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
1513
0
        if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); }
1514
0
        if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); }
1515
0
        if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); }
1516
0
        if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); }
1517
0
    }
1518
149
}
1519
1520
149
template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const {
1521
149
    const size_t size = op.priv.ToTrimmedString().size();
1522
1523
149
    if ( size == 0 || size > 4096 ) {
1524
0
        return std::nullopt;
1525
0
    }
1526
1527
149
    return module->OpBLS_Sign(op);
1528
149
}
1529
1530
/* Specialization for operation::BLS_Verify */
1531
135
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 {
1532
135
    (void)module;
1533
135
    (void)op;
1534
135
    (void)result;
1535
135
}
1536
1537
135
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const {
1538
#if 0
1539
    const std::vector<size_t> sizes = {
1540
        op.pub.first.ToTrimmedString().size(),
1541
        op.pub.second.ToTrimmedString().size(),
1542
        op.signature.first.ToTrimmedString().size(),
1543
        op.signature.second.ToTrimmedString().size(),
1544
    };
1545
1546
    for (const auto& size : sizes) {
1547
        if ( size == 0 || size > 4096 ) {
1548
            return std::nullopt;
1549
        }
1550
    }
1551
#endif
1552
1553
135
    return module->OpBLS_Verify(op);
1554
135
}
1555
1556
/* Specialization for operation::BLS_BatchSign */
1557
172
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 {
1558
172
    (void)module;
1559
172
    (void)op;
1560
1561
172
    if ( result.second != std::nullopt  ) {
1562
0
        std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub;
1563
0
        for (const auto& mp : result.second->msgpub) {
1564
0
            msgpub.push_back(
1565
0
                    std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{
1566
0
                        {
1567
0
                            mp.first.first.ToTrimmedString(),
1568
0
                            mp.first.second.ToTrimmedString()
1569
0
                        },
1570
0
                        {
1571
0
                            mp.second.first.first.ToTrimmedString(),
1572
0
                            mp.second.first.second.ToTrimmedString(),
1573
0
                            mp.second.second.first.ToTrimmedString(),
1574
0
                            mp.second.second.second.ToTrimmedString()
1575
0
                        }
1576
0
                    }
1577
0
            );
1578
0
            G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString());
1579
0
            Pool_CurveBLSG2.Set({
1580
0
                    CF_ECC_CURVE("BLS12_381"),
1581
0
                    mp.second.first.first.ToTrimmedString(),
1582
0
                    mp.second.first.second.ToTrimmedString(),
1583
0
                    mp.second.second.first.ToTrimmedString(),
1584
0
                    mp.second.second.second.ToTrimmedString()
1585
0
            });
1586
0
        }
1587
0
        Pool_BLS_BatchSignature.Set({msgpub});
1588
0
    }
1589
172
}
1590
1591
172
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1592
172
    return module->OpBLS_BatchSign(op);
1593
172
}
1594
1595
/* Specialization for operation::BLS_BatchVerify */
1596
153
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 {
1597
153
    (void)module;
1598
153
    (void)op;
1599
153
    (void)result;
1600
153
}
1601
1602
153
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1603
153
    return module->OpBLS_BatchVerify(op);
1604
153
}
1605
1606
/* Specialization for operation::BLS_Aggregate_G1 */
1607
140
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 {
1608
140
    (void)module;
1609
140
    (void)op;
1610
140
    (void)result;
1611
140
}
1612
1613
140
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1614
140
    return module->OpBLS_Aggregate_G1(op);
1615
140
}
1616
1617
/* Specialization for operation::BLS_Aggregate_G2 */
1618
149
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 {
1619
149
    (void)module;
1620
149
    (void)op;
1621
149
    (void)result;
1622
149
}
1623
1624
149
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1625
149
    return module->OpBLS_Aggregate_G2(op);
1626
149
}
1627
1628
/* Specialization for operation::BLS_Pairing */
1629
123
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 {
1630
123
    (void)module;
1631
123
    (void)op;
1632
1633
123
    if ( result.second != std::nullopt  ) {
1634
0
        Pool_Fp12.Set({
1635
0
                result.second->bn1.ToTrimmedString(),
1636
0
                result.second->bn2.ToTrimmedString(),
1637
0
                result.second->bn3.ToTrimmedString(),
1638
0
                result.second->bn4.ToTrimmedString(),
1639
0
                result.second->bn5.ToTrimmedString(),
1640
0
                result.second->bn6.ToTrimmedString(),
1641
0
                result.second->bn7.ToTrimmedString(),
1642
0
                result.second->bn8.ToTrimmedString(),
1643
0
                result.second->bn9.ToTrimmedString(),
1644
0
                result.second->bn10.ToTrimmedString(),
1645
0
                result.second->bn11.ToTrimmedString(),
1646
0
                result.second->bn12.ToTrimmedString()
1647
0
        });
1648
0
    }
1649
123
}
1650
1651
123
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1652
123
    return module->OpBLS_Pairing(op);
1653
123
}
1654
1655
/* Specialization for operation::BLS_MillerLoop */
1656
134
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 {
1657
134
    (void)module;
1658
134
    (void)op;
1659
1660
134
    if ( result.second != std::nullopt  ) {
1661
0
        Pool_Fp12.Set({
1662
0
                result.second->bn1.ToTrimmedString(),
1663
0
                result.second->bn2.ToTrimmedString(),
1664
0
                result.second->bn3.ToTrimmedString(),
1665
0
                result.second->bn4.ToTrimmedString(),
1666
0
                result.second->bn5.ToTrimmedString(),
1667
0
                result.second->bn6.ToTrimmedString(),
1668
0
                result.second->bn7.ToTrimmedString(),
1669
0
                result.second->bn8.ToTrimmedString(),
1670
0
                result.second->bn9.ToTrimmedString(),
1671
0
                result.second->bn10.ToTrimmedString(),
1672
0
                result.second->bn11.ToTrimmedString(),
1673
0
                result.second->bn12.ToTrimmedString()
1674
0
        });
1675
0
    }
1676
134
}
1677
1678
134
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1679
134
    return module->OpBLS_MillerLoop(op);
1680
134
}
1681
1682
/* Specialization for operation::BLS_FinalExp */
1683
206
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 {
1684
206
    (void)module;
1685
206
    (void)op;
1686
1687
206
    if ( result.second != std::nullopt  ) {
1688
0
        Pool_Fp12.Set({
1689
0
                result.second->bn1.ToTrimmedString(),
1690
0
                result.second->bn2.ToTrimmedString(),
1691
0
                result.second->bn3.ToTrimmedString(),
1692
0
                result.second->bn4.ToTrimmedString(),
1693
0
                result.second->bn5.ToTrimmedString(),
1694
0
                result.second->bn6.ToTrimmedString(),
1695
0
                result.second->bn7.ToTrimmedString(),
1696
0
                result.second->bn8.ToTrimmedString(),
1697
0
                result.second->bn9.ToTrimmedString(),
1698
0
                result.second->bn10.ToTrimmedString(),
1699
0
                result.second->bn11.ToTrimmedString(),
1700
0
                result.second->bn12.ToTrimmedString()
1701
0
        });
1702
0
    }
1703
206
}
1704
1705
206
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1706
206
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1707
206
    return module->OpBLS_FinalExp(op);
1708
206
}
1709
1710
/* Specialization for operation::BLS_HashToG1 */
1711
148
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 {
1712
148
    (void)module;
1713
1714
148
    if ( result.second != std::nullopt  ) {
1715
0
        const auto curveID = op.curveType.Get();
1716
0
        const auto g1_x = result.second->first.ToTrimmedString();
1717
0
        const auto g1_y = result.second->second.ToTrimmedString();
1718
1719
0
        G1AddToPool(curveID, g1_x, g1_y);
1720
1721
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1722
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1723
0
    }
1724
148
}
1725
1726
148
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1727
148
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1728
148
    return module->OpBLS_HashToG1(op);
1729
148
}
1730
1731
/* Specialization for operation::BLS_MapToG1 */
1732
140
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 {
1733
140
    (void)module;
1734
1735
140
    if ( result.second != std::nullopt  ) {
1736
0
        const auto curveID = op.curveType.Get();
1737
0
        const auto g1_x = result.second->first.ToTrimmedString();
1738
0
        const auto g1_y = result.second->second.ToTrimmedString();
1739
1740
0
        G1AddToPool(curveID, g1_x, g1_y);
1741
1742
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1743
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1744
0
    }
1745
140
}
1746
1747
140
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1748
140
    return module->OpBLS_MapToG1(op);
1749
140
}
1750
1751
/* Specialization for operation::BLS_MapToG2 */
1752
122
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 {
1753
122
    (void)module;
1754
1755
122
    if ( result.second != std::nullopt  ) {
1756
0
        const auto curveID = op.curveType.Get();
1757
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1758
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1759
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1760
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1761
1762
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1763
1764
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1765
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1766
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1767
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1768
0
    }
1769
122
}
1770
1771
122
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1772
122
    return module->OpBLS_MapToG2(op);
1773
122
}
1774
1775
/* Specialization for operation::BLS_IsG1OnCurve */
1776
128
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 {
1777
128
    (void)module;
1778
128
    (void)op;
1779
128
    (void)result;
1780
128
}
1781
1782
128
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1783
128
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1784
128
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1785
123
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1786
1787
123
    return module->OpBLS_IsG1OnCurve(op);
1788
123
}
1789
1790
/* Specialization for operation::BLS_IsG2OnCurve */
1791
179
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 {
1792
179
    (void)module;
1793
179
    (void)op;
1794
179
    (void)result;
1795
179
}
1796
1797
179
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1798
179
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1799
170
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1800
161
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1801
152
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1802
1803
143
    return module->OpBLS_IsG2OnCurve(op);
1804
152
}
1805
1806
/* Specialization for operation::BLS_GenerateKeyPair */
1807
133
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 {
1808
133
    (void)module;
1809
1810
133
    if ( result.second != std::nullopt  ) {
1811
0
        const auto curveID = op.curveType.Get();
1812
0
        const auto priv = result.second->priv.ToTrimmedString();
1813
0
        const auto g1_x = result.second->pub.first.ToTrimmedString();
1814
0
        const auto g1_y = result.second->pub.second.ToTrimmedString();
1815
1816
0
        G1AddToPool(curveID, g1_x, g1_y);
1817
1818
0
        if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); }
1819
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1820
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1821
0
    }
1822
133
}
1823
1824
133
template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const {
1825
133
    return module->OpBLS_GenerateKeyPair(op);
1826
133
}
1827
1828
/* Specialization for operation::BLS_Decompress_G1 */
1829
136
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 {
1830
136
    (void)module;
1831
1832
136
    if ( result.second != std::nullopt  ) {
1833
0
        const auto curveID = op.curveType.Get();
1834
0
        const auto g1_x = result.second->first.ToTrimmedString();
1835
0
        const auto g1_y = result.second->second.ToTrimmedString();
1836
1837
0
        G1AddToPool(curveID, g1_x, g1_y);
1838
1839
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1840
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1841
0
    }
1842
136
}
1843
1844
136
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const {
1845
136
    return module->OpBLS_Decompress_G1(op);
1846
136
}
1847
1848
/* Specialization for operation::BLS_Compress_G1 */
1849
122
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 {
1850
122
    (void)module;
1851
122
    (void)op;
1852
1853
122
    if ( result.second != std::nullopt  ) {
1854
0
        const auto compressed = result.second->ToTrimmedString();
1855
1856
0
        if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); }
1857
0
    }
1858
122
}
1859
1860
122
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const {
1861
122
    return module->OpBLS_Compress_G1(op);
1862
122
}
1863
1864
/* Specialization for operation::BLS_Decompress_G2 */
1865
118
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 {
1866
118
    (void)module;
1867
1868
118
    if ( result.second != std::nullopt  ) {
1869
0
        const auto curveID = op.curveType.Get();
1870
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1871
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1872
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1873
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1874
1875
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1876
1877
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1878
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1879
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1880
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1881
0
    }
1882
118
}
1883
1884
118
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1885
118
    return module->OpBLS_Decompress_G2(op);
1886
118
}
1887
1888
/* Specialization for operation::BLS_Compress_G2 */
1889
140
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 {
1890
140
    (void)module;
1891
1892
140
    if ( result.second != std::nullopt  ) {
1893
0
        const auto curveID = op.curveType.Get();
1894
0
        const auto g1_x = result.second->first.ToTrimmedString();
1895
0
        const auto g1_y = result.second->second.ToTrimmedString();
1896
1897
0
        G1AddToPool(curveID, g1_x, g1_y);
1898
1899
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1900
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1901
0
    }
1902
140
}
1903
1904
140
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const {
1905
140
    return module->OpBLS_Compress_G2(op);
1906
140
}
1907
1908
/* Specialization for operation::BLS_G1_Add */
1909
170
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 {
1910
170
    (void)module;
1911
1912
170
    if ( result.second != std::nullopt  ) {
1913
0
        const auto curveID = op.curveType.Get();
1914
0
        const auto g1_x = result.second->first.ToTrimmedString();
1915
0
        const auto g1_y = result.second->second.ToTrimmedString();
1916
1917
0
        G1AddToPool(curveID, g1_x, g1_y);
1918
1919
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1920
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1921
0
    }
1922
170
}
1923
1924
170
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const {
1925
170
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1926
170
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1927
161
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1928
152
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1929
143
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1930
1931
134
    return module->OpBLS_G1_Add(op);
1932
143
}
1933
1934
/* Specialization for operation::BLS_G1_Mul */
1935
139
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 {
1936
139
    (void)module;
1937
1938
139
    if ( result.second != std::nullopt  ) {
1939
0
        const auto curveID = op.curveType.Get();
1940
0
        const auto g1_x = result.second->first.ToTrimmedString();
1941
0
        const auto g1_y = result.second->second.ToTrimmedString();
1942
1943
0
        G1AddToPool(curveID, g1_x, g1_y);
1944
1945
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1946
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1947
0
    }
1948
139
}
1949
1950
139
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1951
139
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1952
139
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1953
137
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1954
135
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1955
1956
135
    return module->OpBLS_G1_Mul(op);
1957
135
}
1958
1959
/* Specialization for operation::BLS_G1_IsEq */
1960
199
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 {
1961
199
    (void)module;
1962
199
    (void)op;
1963
199
    (void)result;
1964
199
}
1965
1966
199
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
1967
199
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1968
199
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1969
190
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1970
181
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1971
172
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1972
1973
163
    return module->OpBLS_G1_IsEq(op);
1974
172
}
1975
1976
/* Specialization for operation::BLS_G1_Neg */
1977
124
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 {
1978
124
    (void)module;
1979
1980
124
    if ( result.second != std::nullopt  ) {
1981
0
        const auto curveID = op.curveType.Get();
1982
0
        const auto g1_x = result.second->first.ToTrimmedString();
1983
0
        const auto g1_y = result.second->second.ToTrimmedString();
1984
1985
0
        G1AddToPool(curveID, g1_x, g1_y);
1986
1987
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1988
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1989
0
    }
1990
124
}
1991
1992
124
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const {
1993
124
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1994
124
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1995
122
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1996
1997
120
    return module->OpBLS_G1_Neg(op);
1998
122
}
1999
2000
/* Specialization for operation::BLS_G2_Add */
2001
217
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 {
2002
217
    (void)module;
2003
2004
217
    if ( result.second != std::nullopt  ) {
2005
0
        const auto curveID = op.curveType.Get();
2006
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2007
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2008
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2009
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2010
2011
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2012
2013
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2014
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2015
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2016
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2017
0
    }
2018
217
}
2019
2020
217
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
2021
217
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2022
217
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2023
208
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2024
199
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2025
190
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2026
181
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2027
172
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2028
163
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
154
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
145
    return module->OpBLS_G2_Add(op);
2032
154
}
2033
2034
/* Specialization for operation::BLS_G2_Mul */
2035
215
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 {
2036
215
    (void)module;
2037
2038
215
    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
215
}
2053
2054
215
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const {
2055
215
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
215
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
206
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
197
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
188
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
179
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
2062
170
    return module->OpBLS_G2_Mul(op);
2063
179
}
2064
2065
/* Specialization for operation::BLS_G2_IsEq */
2066
216
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 {
2067
216
    (void)module;
2068
216
    (void)op;
2069
216
    (void)result;
2070
216
}
2071
2072
216
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2073
216
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2074
216
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2075
207
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2076
198
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2077
189
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2078
180
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2079
171
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2080
162
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2081
153
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2082
2083
144
    return module->OpBLS_G2_IsEq(op);
2084
153
}
2085
2086
/* Specialization for operation::BLS_G2_Neg */
2087
190
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 {
2088
190
    (void)module;
2089
2090
190
    if ( result.second != std::nullopt  ) {
2091
0
        const auto curveID = op.curveType.Get();
2092
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2093
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2094
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2095
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2096
2097
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2098
2099
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2100
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2101
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2102
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2103
0
    }
2104
190
}
2105
2106
190
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const {
2107
190
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
190
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
181
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
172
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
163
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
2113
154
    return module->OpBLS_G2_Neg(op);
2114
163
}
2115
2116
/* Specialization for operation::BLS_G1_MultiExp */
2117
232
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 {
2118
232
    (void)module;
2119
2120
232
    if ( result.second != std::nullopt  ) {
2121
0
        const auto curveID = op.curveType.Get();
2122
0
        const auto g1_x = result.second->first.ToTrimmedString();
2123
0
        const auto g1_y = result.second->second.ToTrimmedString();
2124
2125
0
        G1AddToPool(curveID, g1_x, g1_y);
2126
2127
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
2128
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
2129
0
    }
2130
232
}
2131
2132
232
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op) const {
2133
232
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2134
2135
1.46k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2136
1.46k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2137
1.45k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2138
1.44k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2139
1.44k
    }
2140
2141
203
    return module->OpBLS_G1_MultiExp(op);
2142
232
}
2143
2144
/* Specialization for operation::Misc */
2145
124
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2146
124
    (void)module;
2147
124
    (void)op;
2148
124
    (void)result;
2149
124
}
2150
2151
124
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2152
124
    return module->OpMisc(op);
2153
124
}
2154
2155
/* Specialization for operation::BLS_HashToG2 */
2156
116
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 {
2157
116
    (void)module;
2158
2159
116
    if ( result.second != std::nullopt  ) {
2160
0
        const auto curveID = op.curveType.Get();
2161
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2162
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2163
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2164
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2165
2166
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2167
2168
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2169
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2170
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2171
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2172
0
    }
2173
116
}
2174
2175
116
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2176
116
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2177
116
    return module->OpBLS_HashToG2(op);
2178
116
}
2179
2180
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2181
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2182
23
{ }
2183
22
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2184
22
    this->modulo = component::Bignum(modulo);
2185
22
}
2186
2187
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) :
2188
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2189
1
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2190
1
}
2191
2192
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) :
2193
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2194
1
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2195
1
}
2196
2197
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) :
2198
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2199
1
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2200
1
}
2201
2202
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) :
2203
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2204
1
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2205
1
}
2206
2207
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) :
2208
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2209
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2210
1
}
2211
2212
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) :
2213
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2214
1
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2215
1
}
2216
2217
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) :
2218
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2219
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2220
1
}
2221
2222
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) :
2223
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2224
1
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2225
1
}
2226
2227
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2228
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2229
1
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2230
1
}
2231
2232
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) :
2233
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2234
1
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2235
1
}
2236
2237
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) :
2238
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2239
1
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2240
1
}
2241
2242
ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2243
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2244
1
    CF_NORET(SetModulo("18446744069414584321"));
2245
1
}
2246
2247
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) :
2248
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2249
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2250
1
}
2251
2252
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) :
2253
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2254
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2255
1
}
2256
2257
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) :
2258
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2259
1
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2260
1
}
2261
2262
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) :
2263
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2264
1
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2265
1
}
2266
2267
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2268
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2269
1
    CF_NORET(SetModulo("18446744073709551616"));
2270
1
}
2271
2272
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2273
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2274
1
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2275
1
}
2276
2277
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2278
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2279
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2280
1
}
2281
2282
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2283
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2284
1
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2285
1
}
2286
2287
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2288
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2289
1
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2290
1
}
2291
2292
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) :
2293
1
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2294
1
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2295
1
}
2296
2297
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2298
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2299
1
{ }
2300
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2301
0
    this->modulo = component::Bignum(modulo);
2302
0
}
2303
2304
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2305
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2306
1
{ }
2307
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2308
0
    this->modulo = component::Bignum(modulo);
2309
0
}
2310
2311
template <class ResultType, class OperationType>
2312
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2313
    operationID(operationID),
2314
    modules(modules),
2315
    options(options)
2316
105
{
2317
105
}
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
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
23
{
2317
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2316
1
{
2317
1
}
2318
2319
/* Specialization for operation::SR25519_Verify */
2320
135
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 {
2321
135
    (void)module;
2322
135
    (void)op;
2323
135
    (void)result;
2324
135
}
2325
2326
135
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2327
135
    return module->OpSR25519_Verify(op);
2328
135
}
2329
2330
template <class ResultType, class OperationType>
2331
105
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
105
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2331
23
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2331
1
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2332
1
}
2333
2334
/* Filter away the values in the set that are std::nullopt */
2335
template <class ResultType, class OperationType>
2336
26.8k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
26.8k
    ResultSet ret;
2338
2339
94.7k
    for (const auto& result : results) {
2340
94.7k
        if ( result.second == std::nullopt ) {
2341
64.4k
            continue;
2342
64.4k
        }
2343
2344
30.2k
        ret.push_back(result);
2345
30.2k
    }
2346
2347
26.8k
    return ret;
2348
26.8k
}
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
2336
1.67k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
1.67k
    ResultSet ret;
2338
2339
5.36k
    for (const auto& result : results) {
2340
5.36k
        if ( result.second == std::nullopt ) {
2341
2.53k
            continue;
2342
2.53k
        }
2343
2344
2.83k
        ret.push_back(result);
2345
2.83k
    }
2346
2347
1.67k
    return ret;
2348
1.67k
}
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
2336
1.01k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
1.01k
    ResultSet ret;
2338
2339
3.31k
    for (const auto& result : results) {
2340
3.31k
        if ( result.second == std::nullopt ) {
2341
2.19k
            continue;
2342
2.19k
        }
2343
2344
1.12k
        ret.push_back(result);
2345
1.12k
    }
2346
2347
1.01k
    return ret;
2348
1.01k
}
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
2336
526
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
526
    ResultSet ret;
2338
2339
3.17k
    for (const auto& result : results) {
2340
3.17k
        if ( result.second == std::nullopt ) {
2341
1.56k
            continue;
2342
1.56k
        }
2343
2344
1.60k
        ret.push_back(result);
2345
1.60k
    }
2346
2347
526
    return ret;
2348
526
}
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
2336
985
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
985
    ResultSet ret;
2338
2339
4.20k
    for (const auto& result : results) {
2340
4.20k
        if ( result.second == std::nullopt ) {
2341
2.37k
            continue;
2342
2.37k
        }
2343
2344
1.83k
        ret.push_back(result);
2345
1.83k
    }
2346
2347
985
    return ret;
2348
985
}
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
2336
4.16k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
4.16k
    ResultSet ret;
2338
2339
19.0k
    for (const auto& result : results) {
2340
19.0k
        if ( result.second == std::nullopt ) {
2341
11.7k
            continue;
2342
11.7k
        }
2343
2344
7.33k
        ret.push_back(result);
2345
7.33k
    }
2346
2347
4.16k
    return ret;
2348
4.16k
}
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
2336
1.90k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
1.90k
    ResultSet ret;
2338
2339
10.7k
    for (const auto& result : results) {
2340
10.7k
        if ( result.second == std::nullopt ) {
2341
9.31k
            continue;
2342
9.31k
        }
2343
2344
1.47k
        ret.push_back(result);
2345
1.47k
    }
2346
2347
1.90k
    return ret;
2348
1.90k
}
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
2336
124
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
124
    ResultSet ret;
2338
2339
875
    for (const auto& result : results) {
2340
875
        if ( result.second == std::nullopt ) {
2341
621
            continue;
2342
621
        }
2343
2344
254
        ret.push_back(result);
2345
254
    }
2346
2347
124
    return ret;
2348
124
}
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
2336
1.09k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
1.09k
    ResultSet ret;
2338
2339
4.56k
    for (const auto& result : results) {
2340
4.56k
        if ( result.second == std::nullopt ) {
2341
1.91k
            continue;
2342
1.91k
        }
2343
2344
2.64k
        ret.push_back(result);
2345
2.64k
    }
2346
2347
1.09k
    return ret;
2348
1.09k
}
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
2336
104
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
104
    ResultSet ret;
2338
2339
589
    for (const auto& result : results) {
2340
589
        if ( result.second == std::nullopt ) {
2341
589
            continue;
2342
589
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
104
    return ret;
2348
104
}
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
2336
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
64
    ResultSet ret;
2338
2339
463
    for (const auto& result : results) {
2340
463
        if ( result.second == std::nullopt ) {
2341
463
            continue;
2342
463
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
64
    return ret;
2348
64
}
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
2336
61
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
61
    ResultSet ret;
2338
2339
435
    for (const auto& result : results) {
2340
435
        if ( result.second == std::nullopt ) {
2341
435
            continue;
2342
435
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
61
    return ret;
2348
61
}
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
2336
587
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
587
    ResultSet ret;
2338
2339
2.13k
    for (const auto& result : results) {
2340
2.13k
        if ( result.second == std::nullopt ) {
2341
1.42k
            continue;
2342
1.42k
        }
2343
2344
708
        ret.push_back(result);
2345
708
    }
2346
2347
587
    return ret;
2348
587
}
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
2336
237
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
237
    ResultSet ret;
2338
2339
587
    for (const auto& result : results) {
2340
587
        if ( result.second == std::nullopt ) {
2341
324
            continue;
2342
324
        }
2343
2344
263
        ret.push_back(result);
2345
263
    }
2346
2347
237
    return ret;
2348
237
}
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
2336
65
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
65
    ResultSet ret;
2338
2339
533
    for (const auto& result : results) {
2340
533
        if ( result.second == std::nullopt ) {
2341
533
            continue;
2342
533
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
65
    return ret;
2348
65
}
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
2336
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
57
    ResultSet ret;
2338
2339
441
    for (const auto& result : results) {
2340
441
        if ( result.second == std::nullopt ) {
2341
441
            continue;
2342
441
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
57
    return ret;
2348
57
}
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
2336
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
57
    ResultSet ret;
2338
2339
133
    for (const auto& result : results) {
2340
133
        if ( result.second == std::nullopt ) {
2341
101
            continue;
2342
101
        }
2343
2344
32
        ret.push_back(result);
2345
32
    }
2346
2347
57
    return ret;
2348
57
}
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
2336
319
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
319
    ResultSet ret;
2338
2339
1.75k
    for (const auto& result : results) {
2340
1.75k
        if ( result.second == std::nullopt ) {
2341
923
            continue;
2342
923
        }
2343
2344
834
        ret.push_back(result);
2345
834
    }
2346
2347
319
    return ret;
2348
319
}
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
2336
728
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
728
    ResultSet ret;
2338
2339
1.74k
    for (const auto& result : results) {
2340
1.74k
        if ( result.second == std::nullopt ) {
2341
938
            continue;
2342
938
        }
2343
2344
804
        ret.push_back(result);
2345
804
    }
2346
2347
728
    return ret;
2348
728
}
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
2336
833
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
833
    ResultSet ret;
2338
2339
1.85k
    for (const auto& result : results) {
2340
1.85k
        if ( result.second == std::nullopt ) {
2341
189
            continue;
2342
189
        }
2343
2344
1.66k
        ret.push_back(result);
2345
1.66k
    }
2346
2347
833
    return ret;
2348
833
}
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
2336
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
42
    ResultSet ret;
2338
2339
152
    for (const auto& result : results) {
2340
152
        if ( result.second == std::nullopt ) {
2341
152
            continue;
2342
152
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
42
    return ret;
2348
42
}
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
2336
648
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
648
    ResultSet ret;
2338
2339
1.84k
    for (const auto& result : results) {
2340
1.84k
        if ( result.second == std::nullopt ) {
2341
958
            continue;
2342
958
        }
2343
2344
889
        ret.push_back(result);
2345
889
    }
2346
2347
648
    return ret;
2348
648
}
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
2336
140
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
140
    ResultSet ret;
2338
2339
457
    for (const auto& result : results) {
2340
457
        if ( result.second == std::nullopt ) {
2341
384
            continue;
2342
384
        }
2343
2344
73
        ret.push_back(result);
2345
73
    }
2346
2347
140
    return ret;
2348
140
}
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
2336
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
41
    ResultSet ret;
2338
2339
148
    for (const auto& result : results) {
2340
148
        if ( result.second == std::nullopt ) {
2341
148
            continue;
2342
148
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
41
    return ret;
2348
41
}
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
2336
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
46
    ResultSet ret;
2338
2339
172
    for (const auto& result : results) {
2340
172
        if ( result.second == std::nullopt ) {
2341
172
            continue;
2342
172
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
46
    return ret;
2348
46
}
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
2336
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
41
    ResultSet ret;
2338
2339
151
    for (const auto& result : results) {
2340
151
        if ( result.second == std::nullopt ) {
2341
151
            continue;
2342
151
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
41
    return ret;
2348
41
}
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
2336
294
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
294
    ResultSet ret;
2338
2339
895
    for (const auto& result : results) {
2340
895
        if ( result.second == std::nullopt ) {
2341
430
            continue;
2342
430
        }
2343
2344
465
        ret.push_back(result);
2345
465
    }
2346
2347
294
    return ret;
2348
294
}
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
2336
182
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
182
    ResultSet ret;
2338
2339
531
    for (const auto& result : results) {
2340
531
        if ( result.second == std::nullopt ) {
2341
376
            continue;
2342
376
        }
2343
2344
155
        ret.push_back(result);
2345
155
    }
2346
2347
182
    return ret;
2348
182
}
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
2336
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
35
    ResultSet ret;
2338
2339
128
    for (const auto& result : results) {
2340
128
        if ( result.second == std::nullopt ) {
2341
128
            continue;
2342
128
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
35
    return ret;
2348
35
}
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
2336
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
37
    ResultSet ret;
2338
2339
134
    for (const auto& result : results) {
2340
134
        if ( result.second == std::nullopt ) {
2341
134
            continue;
2342
134
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
37
    return ret;
2348
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2336
569
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
569
    ResultSet ret;
2338
2339
1.45k
    for (const auto& result : results) {
2340
1.45k
        if ( result.second == std::nullopt ) {
2341
850
            continue;
2342
850
        }
2343
2344
605
        ret.push_back(result);
2345
605
    }
2346
2347
569
    return ret;
2348
569
}
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
2336
262
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
262
    ResultSet ret;
2338
2339
750
    for (const auto& result : results) {
2340
750
        if ( result.second == std::nullopt ) {
2341
460
            continue;
2342
460
        }
2343
2344
290
        ret.push_back(result);
2345
290
    }
2346
2347
262
    return ret;
2348
262
}
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
2336
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
37
    ResultSet ret;
2338
2339
129
    for (const auto& result : results) {
2340
129
        if ( result.second == std::nullopt ) {
2341
129
            continue;
2342
129
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
37
    return ret;
2348
37
}
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
2336
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
39
    ResultSet ret;
2338
2339
134
    for (const auto& result : results) {
2340
134
        if ( result.second == std::nullopt ) {
2341
134
            continue;
2342
134
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
39
    return ret;
2348
39
}
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
2336
39
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
39
    ResultSet ret;
2338
2339
143
    for (const auto& result : results) {
2340
143
        if ( result.second == std::nullopt ) {
2341
143
            continue;
2342
143
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
39
    return ret;
2348
39
}
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
2336
78
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
78
    ResultSet ret;
2338
2339
276
    for (const auto& result : results) {
2340
276
        if ( result.second == std::nullopt ) {
2341
250
            continue;
2342
250
        }
2343
2344
26
        ret.push_back(result);
2345
26
    }
2346
2347
78
    return ret;
2348
78
}
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
2336
86
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
86
    ResultSet ret;
2338
2339
312
    for (const auto& result : results) {
2340
312
        if ( result.second == std::nullopt ) {
2341
264
            continue;
2342
264
        }
2343
2344
48
        ret.push_back(result);
2345
48
    }
2346
2347
86
    return ret;
2348
86
}
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
2336
134
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
134
    ResultSet ret;
2338
2339
457
    for (const auto& result : results) {
2340
457
        if ( result.second == std::nullopt ) {
2341
309
            continue;
2342
309
        }
2343
2344
148
        ret.push_back(result);
2345
148
    }
2346
2347
134
    return ret;
2348
134
}
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
2336
69
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
69
    ResultSet ret;
2338
2339
246
    for (const auto& result : results) {
2340
246
        if ( result.second == std::nullopt ) {
2341
202
            continue;
2342
202
        }
2343
2344
44
        ret.push_back(result);
2345
44
    }
2346
2347
69
    return ret;
2348
69
}
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
2336
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
66
    ResultSet ret;
2338
2339
229
    for (const auto& result : results) {
2340
229
        if ( result.second == std::nullopt ) {
2341
197
            continue;
2342
197
        }
2343
2344
32
        ret.push_back(result);
2345
32
    }
2346
2347
66
    return ret;
2348
66
}
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
2336
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
66
    ResultSet ret;
2338
2339
238
    for (const auto& result : results) {
2340
238
        if ( result.second == std::nullopt ) {
2341
221
            continue;
2342
221
        }
2343
2344
17
        ret.push_back(result);
2345
17
    }
2346
2347
66
    return ret;
2348
66
}
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
2336
217
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
217
    ResultSet ret;
2338
2339
677
    for (const auto& result : results) {
2340
677
        if ( result.second == std::nullopt ) {
2341
637
            continue;
2342
637
        }
2343
2344
40
        ret.push_back(result);
2345
40
    }
2346
2347
217
    return ret;
2348
217
}
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
2336
7.23k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
7.23k
    ResultSet ret;
2338
2339
17.0k
    for (const auto& result : results) {
2340
17.0k
        if ( result.second == std::nullopt ) {
2341
13.0k
            continue;
2342
13.0k
        }
2343
2344
4.04k
        ret.push_back(result);
2345
4.04k
    }
2346
2347
7.23k
    return ret;
2348
7.23k
}
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
2336
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
66
    ResultSet ret;
2338
2339
215
    for (const auto& result : results) {
2340
215
        if ( result.second == std::nullopt ) {
2341
215
            continue;
2342
215
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
66
    return ret;
2348
66
}
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
2336
231
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
231
    ResultSet ret;
2338
2339
675
    for (const auto& result : results) {
2340
675
        if ( result.second == std::nullopt ) {
2341
675
            continue;
2342
675
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
231
    return ret;
2348
231
}
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
2336
45
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
45
    ResultSet ret;
2338
2339
148
    for (const auto& result : results) {
2340
148
        if ( result.second == std::nullopt ) {
2341
148
            continue;
2342
148
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
45
    return ret;
2348
45
}
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
2336
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
43
    ResultSet ret;
2338
2339
142
    for (const auto& result : results) {
2340
142
        if ( result.second == std::nullopt ) {
2341
142
            continue;
2342
142
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
43
    return ret;
2348
43
}
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
2336
44
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
44
    ResultSet ret;
2338
2339
149
    for (const auto& result : results) {
2340
149
        if ( result.second == std::nullopt ) {
2341
149
            continue;
2342
149
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
44
    return ret;
2348
44
}
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
2336
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
41
    ResultSet ret;
2338
2339
135
    for (const auto& result : results) {
2340
135
        if ( result.second == std::nullopt ) {
2341
135
            continue;
2342
135
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
41
    return ret;
2348
41
}
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
2336
50
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
50
    ResultSet ret;
2338
2339
172
    for (const auto& result : results) {
2340
172
        if ( result.second == std::nullopt ) {
2341
172
            continue;
2342
172
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
50
    return ret;
2348
50
}
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
2336
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
42
    ResultSet ret;
2338
2339
153
    for (const auto& result : results) {
2340
153
        if ( result.second == std::nullopt ) {
2341
153
            continue;
2342
153
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
42
    return ret;
2348
42
}
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
2336
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
41
    ResultSet ret;
2338
2339
140
    for (const auto& result : results) {
2340
140
        if ( result.second == std::nullopt ) {
2341
140
            continue;
2342
140
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
41
    return ret;
2348
41
}
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
2336
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
42
    ResultSet ret;
2338
2339
149
    for (const auto& result : results) {
2340
149
        if ( result.second == std::nullopt ) {
2341
149
            continue;
2342
149
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
42
    return ret;
2348
42
}
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
2336
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
34
    ResultSet ret;
2338
2339
123
    for (const auto& result : results) {
2340
123
        if ( result.second == std::nullopt ) {
2341
123
            continue;
2342
123
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
34
    return ret;
2348
34
}
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
2336
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
35
    ResultSet ret;
2338
2339
134
    for (const auto& result : results) {
2340
134
        if ( result.second == std::nullopt ) {
2341
134
            continue;
2342
134
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
35
    return ret;
2348
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2336
60
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
60
    ResultSet ret;
2338
2339
206
    for (const auto& result : results) {
2340
206
        if ( result.second == std::nullopt ) {
2341
206
            continue;
2342
206
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
60
    return ret;
2348
60
}
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
2336
42
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
42
    ResultSet ret;
2338
2339
148
    for (const auto& result : results) {
2340
148
        if ( result.second == std::nullopt ) {
2341
148
            continue;
2342
148
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
42
    return ret;
2348
42
}
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
2336
31
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
31
    ResultSet ret;
2338
2339
116
    for (const auto& result : results) {
2340
116
        if ( result.second == std::nullopt ) {
2341
116
            continue;
2342
116
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
31
    return ret;
2348
31
}
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
2336
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
41
    ResultSet ret;
2338
2339
140
    for (const auto& result : results) {
2340
140
        if ( result.second == std::nullopt ) {
2341
140
            continue;
2342
140
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
41
    return ret;
2348
41
}
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
2336
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
33
    ResultSet ret;
2338
2339
122
    for (const auto& result : results) {
2340
122
        if ( result.second == std::nullopt ) {
2341
122
            continue;
2342
122
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
33
    return ret;
2348
33
}
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
2336
36
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
36
    ResultSet ret;
2338
2339
128
    for (const auto& result : results) {
2340
128
        if ( result.second == std::nullopt ) {
2341
128
            continue;
2342
128
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
36
    return ret;
2348
36
}
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
2336
57
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
57
    ResultSet ret;
2338
2339
179
    for (const auto& result : results) {
2340
179
        if ( result.second == std::nullopt ) {
2341
179
            continue;
2342
179
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
57
    return ret;
2348
57
}
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
2336
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
37
    ResultSet ret;
2338
2339
133
    for (const auto& result : results) {
2340
133
        if ( result.second == std::nullopt ) {
2341
133
            continue;
2342
133
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
37
    return ret;
2348
37
}
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
2336
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
40
    ResultSet ret;
2338
2339
136
    for (const auto& result : results) {
2340
136
        if ( result.second == std::nullopt ) {
2341
136
            continue;
2342
136
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
40
    return ret;
2348
40
}
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
2336
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
33
    ResultSet ret;
2338
2339
122
    for (const auto& result : results) {
2340
122
        if ( result.second == std::nullopt ) {
2341
122
            continue;
2342
122
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
33
    return ret;
2348
33
}
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
2336
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
33
    ResultSet ret;
2338
2339
118
    for (const auto& result : results) {
2340
118
        if ( result.second == std::nullopt ) {
2341
118
            continue;
2342
118
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
33
    return ret;
2348
33
}
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
2336
38
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
38
    ResultSet ret;
2338
2339
140
    for (const auto& result : results) {
2340
140
        if ( result.second == std::nullopt ) {
2341
140
            continue;
2342
140
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
38
    return ret;
2348
38
}
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
2336
52
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
52
    ResultSet ret;
2338
2339
170
    for (const auto& result : results) {
2340
170
        if ( result.second == std::nullopt ) {
2341
170
            continue;
2342
170
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
52
    return ret;
2348
52
}
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
2336
41
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
41
    ResultSet ret;
2338
2339
139
    for (const auto& result : results) {
2340
139
        if ( result.second == std::nullopt ) {
2341
139
            continue;
2342
139
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
41
    return ret;
2348
41
}
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
2336
66
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
66
    ResultSet ret;
2338
2339
199
    for (const auto& result : results) {
2340
199
        if ( result.second == std::nullopt ) {
2341
199
            continue;
2342
199
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
66
    return ret;
2348
66
}
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
2336
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
37
    ResultSet ret;
2338
2339
124
    for (const auto& result : results) {
2340
124
        if ( result.second == std::nullopt ) {
2341
124
            continue;
2342
124
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
37
    return ret;
2348
37
}
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
2336
70
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
70
    ResultSet ret;
2338
2339
217
    for (const auto& result : results) {
2340
217
        if ( result.second == std::nullopt ) {
2341
217
            continue;
2342
217
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
70
    return ret;
2348
70
}
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
2336
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
64
    ResultSet ret;
2338
2339
215
    for (const auto& result : results) {
2340
215
        if ( result.second == std::nullopt ) {
2341
215
            continue;
2342
215
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
64
    return ret;
2348
64
}
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
2336
71
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
71
    ResultSet ret;
2338
2339
216
    for (const auto& result : results) {
2340
216
        if ( result.second == std::nullopt ) {
2341
216
            continue;
2342
216
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
71
    return ret;
2348
71
}
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
2336
64
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
64
    ResultSet ret;
2338
2339
190
    for (const auto& result : results) {
2340
190
        if ( result.second == std::nullopt ) {
2341
190
            continue;
2342
190
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
64
    return ret;
2348
64
}
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
2336
65
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
65
    ResultSet ret;
2338
2339
232
    for (const auto& result : results) {
2340
232
        if ( result.second == std::nullopt ) {
2341
232
            continue;
2342
232
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
65
    return ret;
2348
65
}
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
2336
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
35
    ResultSet ret;
2338
2339
124
    for (const auto& result : results) {
2340
124
        if ( result.second == std::nullopt ) {
2341
124
            continue;
2342
124
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
35
    return ret;
2348
35
}
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
2336
37
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2337
37
    ResultSet ret;
2338
2339
135
    for (const auto& result : results) {
2340
135
        if ( result.second == std::nullopt ) {
2341
135
            continue;
2342
135
        }
2343
2344
0
        ret.push_back(result);
2345
0
    }
2346
2347
37
    return ret;
2348
37
}
2349
2350
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2351
template <>
2352
705
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 {
2353
705
    (void)operations;
2354
705
    (void)results;
2355
705
    (void)data;
2356
705
    (void)size;
2357
705
}
2358
2359
template <class ResultType, class OperationType>
2360
3.01k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
3.01k
    (void)operation;
2362
2363
3.01k
    return false;
2364
3.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2360
539
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
539
    (void)operation;
2362
2363
539
    return false;
2364
539
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Line
Count
Source
2360
214
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
214
    (void)operation;
2362
2363
214
    return false;
2364
214
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
Line
Count
Source
2360
29
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
29
    (void)operation;
2362
2363
29
    return false;
2364
29
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2360
581
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
581
    (void)operation;
2362
2363
581
    return false;
2364
581
}
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
2360
107
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
107
    (void)operation;
2362
2363
107
    return false;
2364
107
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Line
Count
Source
2360
40
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
40
    (void)operation;
2362
2363
40
    return false;
2364
40
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::dontCompare(cryptofuzz::operation::KDF_SSH const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::dontCompare(cryptofuzz::operation::KDF_X963 const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const
Line
Count
Source
2360
4
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
4
    (void)operation;
2362
2363
4
    return false;
2364
4
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Line
Count
Source
2360
98
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
98
    (void)operation;
2362
2363
98
    return false;
2364
98
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2360
228
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
228
    (void)operation;
2362
2363
228
    return false;
2364
228
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2360
759
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
759
    (void)operation;
2362
2363
759
    return false;
2364
759
}
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
2360
147
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
147
    (void)operation;
2362
2363
147
    return false;
2364
147
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Line
Count
Source
2360
34
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
34
    (void)operation;
2362
2363
34
    return false;
2364
34
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const
Line
Count
Source
2360
81
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
81
    (void)operation;
2362
2363
81
    return false;
2364
81
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Line
Count
Source
2360
62
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
62
    (void)operation;
2362
2363
62
    return false;
2364
62
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2360
7
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
7
    (void)operation;
2362
2363
7
    return false;
2364
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
Line
Count
Source
2360
13
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
13
    (void)operation;
2362
2363
13
    return false;
2364
13
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2360
43
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
43
    (void)operation;
2362
2363
43
    return false;
2364
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2360
11
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
11
    (void)operation;
2362
2363
11
    return false;
2364
11
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2360
8
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
8
    (void)operation;
2362
2363
8
    return false;
2364
8
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2360
4
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
4
    (void)operation;
2362
2363
4
    return false;
2364
4
}
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
2360
9
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2361
9
    (void)operation;
2362
2363
9
    return false;
2364
9
}
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
2365
2366
template <>
2367
874
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2368
874
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2369
874
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2370
874
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2371
773
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2372
2373
769
    return false;
2374
773
}
2375
2376
template <>
2377
0
bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const {
2378
0
    (void)operation;
2379
0
    return true;
2380
0
}
2381
2382
template <>
2383
168
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2384
168
    if (
2385
168
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2386
168
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2387
110
        if ( operation.UseRandomNonce() ) {
2388
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2389
88
            return true;
2390
88
        }
2391
110
    }
2392
2393
80
    return false;
2394
168
}
2395
2396
template <>
2397
20
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2398
20
    if (
2399
20
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2400
20
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2401
20
        if ( operation.UseRandomNonce() ) {
2402
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2403
20
            return true;
2404
20
        }
2405
20
    }
2406
2407
0
    return false;
2408
20
}
2409
2410
template <>
2411
0
bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const {
2412
0
    if (
2413
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2414
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2415
0
        if ( operation.UseRandomNonce() ) {
2416
            /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */
2417
0
            return true;
2418
0
        }
2419
0
    }
2420
2421
0
    return false;
2422
0
}
2423
2424
/* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */
2425
template <>
2426
1.06k
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2427
1.06k
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2428
2429
1.06k
    return false;
2430
1.06k
}
2431
2432
template <>
2433
227
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2434
227
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2435
2436
227
    return false;
2437
227
}
2438
2439
template <>
2440
247
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2441
247
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2442
2443
247
    return false;
2444
247
}
2445
2446
template <>
2447
218
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2448
218
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2449
2450
217
    return false;
2451
218
}
2452
2453
template <class ResultType, class OperationType>
2454
26.8k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
26.8k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
26.8k
    const auto filtered = filter(results);
2461
2462
26.8k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
20.9k
        return;
2465
20.9k
    }
2466
2467
5.83k
    if ( dontCompare(operations[0].second) == true ) {
2468
214
        return;
2469
214
    }
2470
2471
25.2k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
19.6k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
19.6k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
19.6k
        const bool equal = *prev == *cur;
2476
2477
19.6k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
19.6k
    }
2494
5.62k
}
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
2454
1.67k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
1.67k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
1.67k
    const auto filtered = filter(results);
2461
2462
1.67k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
1.13k
        return;
2465
1.13k
    }
2466
2467
539
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
2.61k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
2.07k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
2.07k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
2.07k
        const bool equal = *prev == *cur;
2476
2477
2.07k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
2.07k
    }
2494
539
}
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
2454
1.01k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
1.01k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
1.01k
    const auto filtered = filter(results);
2461
2462
1.01k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
801
        return;
2465
801
    }
2466
2467
218
    if ( dontCompare(operations[0].second) == true ) {
2468
1
        return;
2469
1
    }
2470
2471
1.04k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
832
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
832
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
832
        const bool equal = *prev == *cur;
2476
2477
832
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
832
    }
2494
217
}
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
2454
526
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
526
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
526
    const auto filtered = filter(results);
2461
2462
526
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
312
        return;
2465
312
    }
2466
2467
214
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.46k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.25k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.25k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.25k
        const bool equal = *prev == *cur;
2476
2477
1.25k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.25k
    }
2494
214
}
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
2454
985
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
985
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
985
    const auto filtered = filter(results);
2461
2462
985
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
738
        return;
2465
738
    }
2466
2467
247
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.61k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.36k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.36k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.36k
        const bool equal = *prev == *cur;
2476
2477
1.36k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.36k
    }
2494
247
}
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
2454
4.16k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
4.16k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
4.16k
    const auto filtered = filter(results);
2461
2462
4.16k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
3.10k
        return;
2465
3.10k
    }
2466
2467
1.06k
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
6.97k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
5.90k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
5.90k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
5.90k
        const bool equal = *prev == *cur;
2476
2477
5.90k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
5.90k
    }
2494
1.06k
}
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
2454
1.90k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
1.90k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
1.90k
    const auto filtered = filter(results);
2461
2462
1.90k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
1.67k
        return;
2465
1.67k
    }
2466
2467
227
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.35k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.12k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.12k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.12k
        const bool equal = *prev == *cur;
2476
2477
1.12k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.12k
    }
2494
227
}
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
2454
124
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
124
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
124
    const auto filtered = filter(results);
2461
2462
124
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
95
        return;
2465
95
    }
2466
2467
29
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
226
    for (size_t i = 1; i < filtered.size(); i++) {
2472
197
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
197
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
197
        const bool equal = *prev == *cur;
2476
2477
197
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
197
    }
2494
29
}
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
2454
1.09k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
1.09k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
1.09k
    const auto filtered = filter(results);
2461
2462
1.09k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
511
        return;
2465
511
    }
2466
2467
581
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
2.41k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.83k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.83k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.83k
        const bool equal = *prev == *cur;
2476
2477
1.83k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.83k
    }
2494
581
}
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
2454
104
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
104
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
104
    const auto filtered = filter(results);
2461
2462
104
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
104
        return;
2465
104
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
64
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
64
    const auto filtered = filter(results);
2461
2462
64
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
64
        return;
2465
64
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
61
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
61
    const auto filtered = filter(results);
2461
2462
61
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
61
        return;
2465
61
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
587
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
587
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
587
    const auto filtered = filter(results);
2461
2462
587
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
480
        return;
2465
480
    }
2466
2467
107
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
592
    for (size_t i = 1; i < filtered.size(); i++) {
2472
485
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
485
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
485
        const bool equal = *prev == *cur;
2476
2477
485
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
485
    }
2494
107
}
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
2454
237
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
237
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
237
    const auto filtered = filter(results);
2461
2462
237
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
197
        return;
2465
197
    }
2466
2467
40
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
108
    for (size_t i = 1; i < filtered.size(); i++) {
2472
68
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
68
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
68
        const bool equal = *prev == *cur;
2476
2477
68
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
68
    }
2494
40
}
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
2454
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 {
2455
65
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
65
    const auto filtered = filter(results);
2461
2462
65
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
65
        return;
2465
65
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
57
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
57
    const auto filtered = filter(results);
2461
2462
57
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
57
        return;
2465
57
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
57
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
57
    const auto filtered = filter(results);
2461
2462
57
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
53
        return;
2465
53
    }
2466
2467
4
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
8
    for (size_t i = 1; i < filtered.size(); i++) {
2472
4
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
4
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
4
        const bool equal = *prev == *cur;
2476
2477
4
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
4
    }
2494
4
}
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
2454
319
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
319
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
319
    const auto filtered = filter(results);
2461
2462
319
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
221
        return;
2465
221
    }
2466
2467
98
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
716
    for (size_t i = 1; i < filtered.size(); i++) {
2472
618
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
618
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
618
        const bool equal = *prev == *cur;
2476
2477
618
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
618
    }
2494
98
}
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
2454
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 {
2455
728
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
728
    const auto filtered = filter(results);
2461
2462
728
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
500
        return;
2465
500
    }
2466
2467
228
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
561
    for (size_t i = 1; i < filtered.size(); i++) {
2472
333
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
333
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
333
        const bool equal = *prev == *cur;
2476
2477
333
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
333
    }
2494
228
}
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
2454
833
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
833
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
833
    const auto filtered = filter(results);
2461
2462
833
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
74
        return;
2465
74
    }
2466
2467
759
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
1.65k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
892
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
892
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
892
        const bool equal = *prev == *cur;
2476
2477
892
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
892
    }
2494
759
}
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
2454
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
42
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
42
    const auto filtered = filter(results);
2461
2462
42
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
42
        return;
2465
42
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
648
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
648
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
648
    const auto filtered = filter(results);
2461
2462
648
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
480
        return;
2465
480
    }
2466
2467
168
    if ( dontCompare(operations[0].second) == true ) {
2468
88
        return;
2469
88
    }
2470
2471
275
    for (size_t i = 1; i < filtered.size(); i++) {
2472
195
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
195
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
195
        const bool equal = *prev == *cur;
2476
2477
195
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
195
    }
2494
80
}
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
2454
140
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
140
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
140
    const auto filtered = filter(results);
2461
2462
140
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
120
        return;
2465
120
    }
2466
2467
20
    if ( dontCompare(operations[0].second) == true ) {
2468
20
        return;
2469
20
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
41
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
41
    const auto filtered = filter(results);
2461
2462
41
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
41
        return;
2465
41
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
46
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
46
    const auto filtered = filter(results);
2461
2462
46
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
46
        return;
2465
46
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
41
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
41
    const auto filtered = filter(results);
2461
2462
41
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
41
        return;
2465
41
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
294
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
294
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
294
    const auto filtered = filter(results);
2461
2462
294
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
147
        return;
2465
147
    }
2466
2467
147
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
418
    for (size_t i = 1; i < filtered.size(); i++) {
2472
271
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
271
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
271
        const bool equal = *prev == *cur;
2476
2477
271
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
271
    }
2494
147
}
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
2454
182
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
182
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
182
    const auto filtered = filter(results);
2461
2462
182
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
148
        return;
2465
148
    }
2466
2467
34
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
105
    for (size_t i = 1; i < filtered.size(); i++) {
2472
71
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
71
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
71
        const bool equal = *prev == *cur;
2476
2477
71
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
71
    }
2494
34
}
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
2454
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
35
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
35
    const auto filtered = filter(results);
2461
2462
35
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
35
        return;
2465
35
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
37
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
37
    const auto filtered = filter(results);
2461
2462
37
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
37
        return;
2465
37
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
569
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
569
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
569
    const auto filtered = filter(results);
2461
2462
569
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
488
        return;
2465
488
    }
2466
2467
81
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
244
    for (size_t i = 1; i < filtered.size(); i++) {
2472
163
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
163
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
163
        const bool equal = *prev == *cur;
2476
2477
163
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
163
    }
2494
81
}
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
2454
262
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
262
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
262
    const auto filtered = filter(results);
2461
2462
262
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
200
        return;
2465
200
    }
2466
2467
62
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
170
    for (size_t i = 1; i < filtered.size(); i++) {
2472
108
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
108
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
108
        const bool equal = *prev == *cur;
2476
2477
108
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
108
    }
2494
62
}
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
2454
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
37
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
37
    const auto filtered = filter(results);
2461
2462
37
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
37
        return;
2465
37
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
39
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
39
    const auto filtered = filter(results);
2461
2462
39
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
39
        return;
2465
39
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2454
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 {
2455
39
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
39
    const auto filtered = filter(results);
2461
2462
39
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
39
        return;
2465
39
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2454
78
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
78
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
78
    const auto filtered = filter(results);
2461
2462
78
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
71
        return;
2465
71
    }
2466
2467
7
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
23
    for (size_t i = 1; i < filtered.size(); i++) {
2472
16
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
16
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
16
        const bool equal = *prev == *cur;
2476
2477
16
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
16
    }
2494
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2454
86
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
86
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
86
    const auto filtered = filter(results);
2461
2462
86
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
73
        return;
2465
73
    }
2466
2467
13
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
43
    for (size_t i = 1; i < filtered.size(); i++) {
2472
30
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
30
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
30
        const bool equal = *prev == *cur;
2476
2477
30
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
30
    }
2494
13
}
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
2454
134
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
134
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
134
    const auto filtered = filter(results);
2461
2462
134
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
91
        return;
2465
91
    }
2466
2467
43
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
137
    for (size_t i = 1; i < filtered.size(); i++) {
2472
94
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
94
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
94
        const bool equal = *prev == *cur;
2476
2477
94
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
94
    }
2494
43
}
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
2454
69
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
69
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
69
    const auto filtered = filter(results);
2461
2462
69
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
58
        return;
2465
58
    }
2466
2467
11
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
37
    for (size_t i = 1; i < filtered.size(); i++) {
2472
26
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
26
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
26
        const bool equal = *prev == *cur;
2476
2477
26
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
26
    }
2494
11
}
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
2454
66
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
66
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
66
    const auto filtered = filter(results);
2461
2462
66
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
58
        return;
2465
58
    }
2466
2467
8
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
26
    for (size_t i = 1; i < filtered.size(); i++) {
2472
18
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
18
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
18
        const bool equal = *prev == *cur;
2476
2477
18
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
18
    }
2494
8
}
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
2454
66
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
66
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
66
    const auto filtered = filter(results);
2461
2462
66
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
62
        return;
2465
62
    }
2466
2467
4
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
14
    for (size_t i = 1; i < filtered.size(); i++) {
2472
10
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
10
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
10
        const bool equal = *prev == *cur;
2476
2477
10
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
10
    }
2494
4
}
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
2454
217
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
217
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
217
    const auto filtered = filter(results);
2461
2462
217
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
208
        return;
2465
208
    }
2466
2467
9
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
30
    for (size_t i = 1; i < filtered.size(); i++) {
2472
21
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
21
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
21
        const bool equal = *prev == *cur;
2476
2477
21
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
21
    }
2494
9
}
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
2454
7.23k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
7.23k
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
7.23k
    const auto filtered = filter(results);
2461
2462
7.23k
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
6.36k
        return;
2465
6.36k
    }
2466
2467
874
    if ( dontCompare(operations[0].second) == true ) {
2468
105
        return;
2469
105
    }
2470
2471
2.36k
    for (size_t i = 1; i < filtered.size(); i++) {
2472
1.60k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
1.60k
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
1.60k
        const bool equal = *prev == *cur;
2476
2477
1.60k
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
1.60k
    }
2494
769
}
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
2454
66
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
66
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
66
    const auto filtered = filter(results);
2461
2462
66
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
66
        return;
2465
66
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
231
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
231
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
231
    const auto filtered = filter(results);
2461
2462
231
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
231
        return;
2465
231
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
45
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
45
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
45
    const auto filtered = filter(results);
2461
2462
45
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
45
        return;
2465
45
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
43
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
43
    const auto filtered = filter(results);
2461
2462
43
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
43
        return;
2465
43
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
44
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
44
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
44
    const auto filtered = filter(results);
2461
2462
44
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
44
        return;
2465
44
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
41
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
41
    const auto filtered = filter(results);
2461
2462
41
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
41
        return;
2465
41
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
50
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
50
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
50
    const auto filtered = filter(results);
2461
2462
50
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
50
        return;
2465
50
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
42
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
42
    const auto filtered = filter(results);
2461
2462
42
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
42
        return;
2465
42
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
41
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
41
    const auto filtered = filter(results);
2461
2462
41
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
41
        return;
2465
41
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
42
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
42
    const auto filtered = filter(results);
2461
2462
42
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
42
        return;
2465
42
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
34
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
34
    const auto filtered = filter(results);
2461
2462
34
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
34
        return;
2465
34
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
35
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
35
    const auto filtered = filter(results);
2461
2462
35
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
35
        return;
2465
35
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
60
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
60
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
60
    const auto filtered = filter(results);
2461
2462
60
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
60
        return;
2465
60
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
42
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
42
    const auto filtered = filter(results);
2461
2462
42
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
42
        return;
2465
42
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
31
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
31
    const auto filtered = filter(results);
2461
2462
31
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
31
        return;
2465
31
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
41
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
41
    const auto filtered = filter(results);
2461
2462
41
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
41
        return;
2465
41
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
33
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
33
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
33
    const auto filtered = filter(results);
2461
2462
33
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
33
        return;
2465
33
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
36
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
36
    const auto filtered = filter(results);
2461
2462
36
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
36
        return;
2465
36
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
57
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
57
    const auto filtered = filter(results);
2461
2462
57
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
57
        return;
2465
57
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
37
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
37
    const auto filtered = filter(results);
2461
2462
37
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
37
        return;
2465
37
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
40
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
40
    const auto filtered = filter(results);
2461
2462
40
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
40
        return;
2465
40
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
33
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
33
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
33
    const auto filtered = filter(results);
2461
2462
33
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
33
        return;
2465
33
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
33
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
33
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
33
    const auto filtered = filter(results);
2461
2462
33
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
33
        return;
2465
33
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
38
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
38
    const auto filtered = filter(results);
2461
2462
38
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
38
        return;
2465
38
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
52
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
52
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
52
    const auto filtered = filter(results);
2461
2462
52
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
52
        return;
2465
52
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
41
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
41
    const auto filtered = filter(results);
2461
2462
41
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
41
        return;
2465
41
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
66
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
66
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
66
    const auto filtered = filter(results);
2461
2462
66
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
66
        return;
2465
66
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
37
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
37
    const auto filtered = filter(results);
2461
2462
37
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
37
        return;
2465
37
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
70
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
70
    const auto filtered = filter(results);
2461
2462
70
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
70
        return;
2465
70
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
64
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
64
    const auto filtered = filter(results);
2461
2462
64
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
64
        return;
2465
64
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
71
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
71
    const auto filtered = filter(results);
2461
2462
71
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
71
        return;
2465
71
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
64
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
64
    const auto filtered = filter(results);
2461
2462
64
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
64
        return;
2465
64
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
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 {
2455
65
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
65
    const auto filtered = filter(results);
2461
2462
65
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
65
        return;
2465
65
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
35
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
35
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
35
    const auto filtered = filter(results);
2461
2462
35
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
35
        return;
2465
35
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
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
2454
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2455
37
    if ( results.size() < 2 ) {
2456
        /* Nothing to compare. Don't even bother filtering. */
2457
0
        return;
2458
0
    }
2459
2460
37
    const auto filtered = filter(results);
2461
2462
37
    if ( filtered.size() < 2 ) {
2463
        /* Nothing to compare */
2464
37
        return;
2465
37
    }
2466
2467
0
    if ( dontCompare(operations[0].second) == true ) {
2468
0
        return;
2469
0
    }
2470
2471
0
    for (size_t i = 1; i < filtered.size(); i++) {
2472
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2473
0
        const std::optional<ResultType>& cur = filtered[i].second;
2474
2475
0
        const bool equal = *prev == *cur;
2476
2477
0
        if ( !equal ) {
2478
            /* Reconstruct operation */
2479
0
            const auto op = getOp(nullptr, data, size);
2480
2481
0
            printf("Difference detected\n\n");
2482
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2483
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2484
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2485
2486
0
            abort(
2487
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2488
0
                    op.Name(),
2489
0
                    op.GetAlgorithmString(),
2490
0
                    "difference"
2491
0
            );
2492
0
        }
2493
0
    }
2494
0
}
2495
2496
template <class ResultType, class OperationType>
2497
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2498
0
    std::sort(moduleNames.begin(), moduleNames.end());
2499
2500
0
    printf("CPU:\n");
2501
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2502
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2503
2504
0
    printf("Assertion failure: ");
2505
0
    for (const auto& moduleName : moduleNames) {
2506
0
        printf("%s-", moduleName.c_str());
2507
0
    }
2508
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2509
0
    fflush(stdout);
2510
2511
0
    ::abort();
2512
0
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::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
2513
2514
template <class ResultType, class OperationType>
2515
245k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
245k
    (void)parentDs;
2517
245k
    return op;
2518
245k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2515
5.32k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
5.32k
    (void)parentDs;
2517
5.32k
    return op;
2518
5.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2515
4.32k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
4.32k
    (void)parentDs;
2517
4.32k
    return op;
2518
4.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2515
4.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
4.65k
    (void)parentDs;
2517
4.65k
    return op;
2518
4.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2515
5.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
5.31k
    (void)parentDs;
2517
5.31k
    return op;
2518
5.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2515
18.5k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
18.5k
    (void)parentDs;
2517
18.5k
    return op;
2518
18.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2515
11.3k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
11.3k
    (void)parentDs;
2517
11.3k
    return op;
2518
11.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2515
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.69k
    (void)parentDs;
2517
2.69k
    return op;
2518
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2515
6.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
6.29k
    (void)parentDs;
2517
6.29k
    return op;
2518
6.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2515
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.28k
    (void)parentDs;
2517
2.28k
    return op;
2518
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2515
2.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.86k
    (void)parentDs;
2517
2.86k
    return op;
2518
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2515
2.69k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.69k
    (void)parentDs;
2517
2.69k
    return op;
2518
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2515
3.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.50k
    (void)parentDs;
2517
3.50k
    return op;
2518
3.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2515
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.66k
    (void)parentDs;
2517
2.66k
    return op;
2518
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2515
2.96k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.96k
    (void)parentDs;
2517
2.96k
    return op;
2518
2.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2515
2.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.58k
    (void)parentDs;
2517
2.58k
    return op;
2518
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2515
2.45k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.45k
    (void)parentDs;
2517
2.45k
    return op;
2518
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2515
3.70k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.70k
    (void)parentDs;
2517
3.70k
    return op;
2518
3.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2515
2.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.18k
    (void)parentDs;
2517
2.18k
    return op;
2518
2.18k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2515
2.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.53k
    (void)parentDs;
2517
2.53k
    return op;
2518
2.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2515
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.05k
    (void)parentDs;
2517
2.05k
    return op;
2518
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2515
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.26k
    (void)parentDs;
2517
2.26k
    return op;
2518
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2515
3.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.17k
    (void)parentDs;
2517
3.17k
    return op;
2518
3.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2515
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.40k
    (void)parentDs;
2517
2.40k
    return op;
2518
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2515
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.26k
    (void)parentDs;
2517
2.26k
    return op;
2518
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2515
2.46k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.46k
    (void)parentDs;
2517
2.46k
    return op;
2518
2.46k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2515
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.89k
    (void)parentDs;
2517
2.89k
    return op;
2518
2.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2515
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.40k
    (void)parentDs;
2517
2.40k
    return op;
2518
2.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2515
2.63k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.63k
    (void)parentDs;
2517
2.63k
    return op;
2518
2.63k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2515
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.27k
    (void)parentDs;
2517
2.27k
    return op;
2518
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2515
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.50k
    (void)parentDs;
2517
2.50k
    return op;
2518
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2515
3.09k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.09k
    (void)parentDs;
2517
3.09k
    return op;
2518
3.09k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2515
2.82k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.82k
    (void)parentDs;
2517
2.82k
    return op;
2518
2.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2515
2.73k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.73k
    (void)parentDs;
2517
2.73k
    return op;
2518
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2515
1.62k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.62k
    (void)parentDs;
2517
1.62k
    return op;
2518
1.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2515
2.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.83k
    (void)parentDs;
2517
2.83k
    return op;
2518
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2515
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.52k
    (void)parentDs;
2517
2.52k
    return op;
2518
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2515
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.30k
    (void)parentDs;
2517
2.30k
    return op;
2518
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2515
2.71k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.71k
    (void)parentDs;
2517
2.71k
    return op;
2518
2.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2515
3.08k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.08k
    (void)parentDs;
2517
3.08k
    return op;
2518
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2515
2.08k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.08k
    (void)parentDs;
2517
2.08k
    return op;
2518
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
Line
Count
Source
2515
2.35k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.35k
    (void)parentDs;
2517
2.35k
    return op;
2518
2.35k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2515
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.60k
    (void)parentDs;
2517
2.60k
    return op;
2518
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2515
1.83k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.83k
    (void)parentDs;
2517
1.83k
    return op;
2518
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2515
2.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.01k
    (void)parentDs;
2517
2.01k
    return op;
2518
2.01k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2515
2.04k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.04k
    (void)parentDs;
2517
2.04k
    return op;
2518
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2515
2.48k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.48k
    (void)parentDs;
2517
2.48k
    return op;
2518
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2515
3.42k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
3.42k
    (void)parentDs;
2517
3.42k
    return op;
2518
3.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2515
9.25k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
9.25k
    (void)parentDs;
2517
9.25k
    return op;
2518
9.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2515
1.84k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.84k
    (void)parentDs;
2517
1.84k
    return op;
2518
1.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2515
2.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.61k
    (void)parentDs;
2517
2.61k
    return op;
2518
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2515
1.79k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.79k
    (void)parentDs;
2517
1.79k
    return op;
2518
1.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2515
1.68k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.68k
    (void)parentDs;
2517
1.68k
    return op;
2518
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2515
2.35k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.35k
    (void)parentDs;
2517
2.35k
    return op;
2518
2.35k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2515
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.52k
    (void)parentDs;
2517
2.52k
    return op;
2518
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2515
2.27k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.27k
    (void)parentDs;
2517
2.27k
    return op;
2518
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2515
1.97k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.97k
    (void)parentDs;
2517
1.97k
    return op;
2518
1.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2515
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.41k
    (void)parentDs;
2517
2.41k
    return op;
2518
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2515
1.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.89k
    (void)parentDs;
2517
1.89k
    return op;
2518
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2515
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.56k
    (void)parentDs;
2517
2.56k
    return op;
2518
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2515
2.64k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.64k
    (void)parentDs;
2517
2.64k
    return op;
2518
2.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2515
2.20k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.20k
    (void)parentDs;
2517
2.20k
    return op;
2518
2.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2515
2.87k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.87k
    (void)parentDs;
2517
2.87k
    return op;
2518
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2515
2.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.67k
    (void)parentDs;
2517
2.67k
    return op;
2518
2.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2515
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.28k
    (void)parentDs;
2517
2.28k
    return op;
2518
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2515
2.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.13k
    (void)parentDs;
2517
2.13k
    return op;
2518
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2515
1.99k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.99k
    (void)parentDs;
2517
1.99k
    return op;
2518
1.99k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2515
1.86k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.86k
    (void)parentDs;
2517
1.86k
    return op;
2518
1.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2515
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.24k
    (void)parentDs;
2517
2.24k
    return op;
2518
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
Line
Count
Source
2515
1.64k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.64k
    (void)parentDs;
2517
1.64k
    return op;
2518
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2515
1.93k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.93k
    (void)parentDs;
2517
1.93k
    return op;
2518
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2515
1.76k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.76k
    (void)parentDs;
2517
1.76k
    return op;
2518
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2515
2.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.17k
    (void)parentDs;
2517
2.17k
    return op;
2518
2.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2515
2.29k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.29k
    (void)parentDs;
2517
2.29k
    return op;
2518
2.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2515
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.89k
    (void)parentDs;
2517
2.89k
    return op;
2518
2.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2515
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.06k
    (void)parentDs;
2517
2.06k
    return op;
2518
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2515
1.71k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.71k
    (void)parentDs;
2517
1.71k
    return op;
2518
1.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2515
2.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.65k
    (void)parentDs;
2517
2.65k
    return op;
2518
2.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2515
2.39k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.39k
    (void)parentDs;
2517
2.39k
    return op;
2518
2.39k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2515
2.54k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.54k
    (void)parentDs;
2517
2.54k
    return op;
2518
2.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2515
2.40k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.40k
    (void)parentDs;
2517
2.40k
    return op;
2518
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2515
2.01k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.01k
    (void)parentDs;
2517
2.01k
    return op;
2518
2.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2515
1.67k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
1.67k
    (void)parentDs;
2517
1.67k
    return op;
2518
1.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2515
2.54k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2516
2.54k
    (void)parentDs;
2517
2.54k
    return op;
2518
2.54k
}
2519
2520
329
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2521
329
    (void)parentDs;
2522
329
    op.modulo = modulo;
2523
329
    return op;
2524
329
}
2525
2526
265
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2527
265
    (void)parentDs;
2528
265
    op.modulo = modulo;
2529
265
    return op;
2530
265
}
2531
2532
653
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2533
653
    (void)parentDs;
2534
653
    op.modulo = modulo;
2535
653
    return op;
2536
653
}
2537
2538
360
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2539
360
    (void)parentDs;
2540
360
    op.modulo = modulo;
2541
360
    return op;
2542
360
}
2543
2544
237
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2545
237
    (void)parentDs;
2546
237
    op.modulo = modulo;
2547
237
    return op;
2548
237
}
2549
2550
310
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2551
310
    (void)parentDs;
2552
310
    op.modulo = modulo;
2553
310
    return op;
2554
310
}
2555
2556
637
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2557
637
    (void)parentDs;
2558
637
    op.modulo = modulo;
2559
637
    return op;
2560
637
}
2561
2562
240
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2563
240
    (void)parentDs;
2564
240
    op.modulo = modulo;
2565
240
    return op;
2566
240
}
2567
2568
715
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2569
715
    (void)parentDs;
2570
715
    op.modulo = modulo;
2571
715
    return op;
2572
715
}
2573
2574
311
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2575
311
    (void)parentDs;
2576
311
    op.modulo = modulo;
2577
311
    return op;
2578
311
}
2579
2580
316
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2581
316
    (void)parentDs;
2582
316
    op.modulo = modulo;
2583
316
    return op;
2584
316
}
2585
2586
343
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2587
343
    (void)parentDs;
2588
343
    op.modulo = modulo;
2589
343
    return op;
2590
343
}
2591
2592
259
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2593
259
    (void)parentDs;
2594
259
    op.modulo = modulo;
2595
259
    return op;
2596
259
}
2597
2598
235
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2599
235
    (void)parentDs;
2600
235
    op.modulo = modulo;
2601
235
    return op;
2602
235
}
2603
2604
309
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2605
309
    (void)parentDs;
2606
309
    op.modulo = modulo;
2607
309
    return op;
2608
309
}
2609
2610
230
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2611
230
    (void)parentDs;
2612
230
    op.modulo = modulo;
2613
230
    return op;
2614
230
}
2615
2616
317
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2617
317
    (void)parentDs;
2618
317
    op.modulo = modulo;
2619
317
    return op;
2620
317
}
2621
2622
397
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2623
397
    (void)parentDs;
2624
397
    op.modulo = modulo;
2625
397
    return op;
2626
397
}
2627
2628
278
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2629
278
    (void)parentDs;
2630
278
    op.modulo = modulo;
2631
278
    return op;
2632
278
}
2633
2634
314
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2635
314
    (void)parentDs;
2636
314
    op.modulo = modulo;
2637
314
    return op;
2638
314
}
2639
2640
407
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2641
407
    (void)parentDs;
2642
407
    op.modulo = modulo;
2643
407
    return op;
2644
407
}
2645
2646
202
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2647
202
    (void)parentDs;
2648
202
    op.modulo = modulo;
2649
202
    return op;
2650
202
}
2651
2652
template <class ResultType, class OperationType>
2653
255k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
255k
    Datasource ds(data, size);
2655
255k
    if ( parentDs != nullptr ) {
2656
255k
        auto modifier = parentDs->GetData(0);
2657
255k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
255k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
255k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
5.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
5.33k
    Datasource ds(data, size);
2655
5.33k
    if ( parentDs != nullptr ) {
2656
5.33k
        auto modifier = parentDs->GetData(0);
2657
5.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
5.33k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
5.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
4.34k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
4.34k
    Datasource ds(data, size);
2655
4.34k
    if ( parentDs != nullptr ) {
2656
4.34k
        auto modifier = parentDs->GetData(0);
2657
4.34k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
4.34k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
4.34k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
4.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
4.67k
    Datasource ds(data, size);
2655
4.67k
    if ( parentDs != nullptr ) {
2656
4.67k
        auto modifier = parentDs->GetData(0);
2657
4.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
4.67k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
4.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
5.33k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
5.33k
    Datasource ds(data, size);
2655
5.33k
    if ( parentDs != nullptr ) {
2656
5.33k
        auto modifier = parentDs->GetData(0);
2657
5.33k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
5.33k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
5.33k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
18.6k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
18.6k
    Datasource ds(data, size);
2655
18.6k
    if ( parentDs != nullptr ) {
2656
18.6k
        auto modifier = parentDs->GetData(0);
2657
18.6k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
18.6k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
18.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
11.3k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
11.3k
    Datasource ds(data, size);
2655
11.3k
    if ( parentDs != nullptr ) {
2656
11.3k
        auto modifier = parentDs->GetData(0);
2657
11.3k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
11.3k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
11.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.71k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.71k
    Datasource ds(data, size);
2655
2.71k
    if ( parentDs != nullptr ) {
2656
2.71k
        auto modifier = parentDs->GetData(0);
2657
2.71k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.71k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
6.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
6.31k
    Datasource ds(data, size);
2655
6.31k
    if ( parentDs != nullptr ) {
2656
6.31k
        auto modifier = parentDs->GetData(0);
2657
6.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
6.31k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
6.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.30k
    Datasource ds(data, size);
2655
2.30k
    if ( parentDs != nullptr ) {
2656
2.30k
        auto modifier = parentDs->GetData(0);
2657
2.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.30k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.88k
    Datasource ds(data, size);
2655
2.88k
    if ( parentDs != nullptr ) {
2656
2.88k
        auto modifier = parentDs->GetData(0);
2657
2.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.88k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.72k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.72k
    Datasource ds(data, size);
2655
2.72k
    if ( parentDs != nullptr ) {
2656
2.72k
        auto modifier = parentDs->GetData(0);
2657
2.72k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.72k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.72k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.52k
    Datasource ds(data, size);
2655
3.52k
    if ( parentDs != nullptr ) {
2656
3.52k
        auto modifier = parentDs->GetData(0);
2657
3.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.52k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.68k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.68k
    Datasource ds(data, size);
2655
2.68k
    if ( parentDs != nullptr ) {
2656
2.68k
        auto modifier = parentDs->GetData(0);
2657
2.68k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.68k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.98k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.98k
    Datasource ds(data, size);
2655
2.98k
    if ( parentDs != nullptr ) {
2656
2.98k
        auto modifier = parentDs->GetData(0);
2657
2.98k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.98k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.60k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.60k
    Datasource ds(data, size);
2655
2.60k
    if ( parentDs != nullptr ) {
2656
2.60k
        auto modifier = parentDs->GetData(0);
2657
2.60k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.60k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.47k
    Datasource ds(data, size);
2655
2.47k
    if ( parentDs != nullptr ) {
2656
2.47k
        auto modifier = parentDs->GetData(0);
2657
2.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.47k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.73k
    Datasource ds(data, size);
2655
3.73k
    if ( parentDs != nullptr ) {
2656
3.73k
        auto modifier = parentDs->GetData(0);
2657
3.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.73k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.19k
    Datasource ds(data, size);
2655
2.19k
    if ( parentDs != nullptr ) {
2656
2.19k
        auto modifier = parentDs->GetData(0);
2657
2.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.19k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.19k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.55k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.55k
    Datasource ds(data, size);
2655
2.55k
    if ( parentDs != nullptr ) {
2656
2.55k
        auto modifier = parentDs->GetData(0);
2657
2.55k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.55k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.06k
    Datasource ds(data, size);
2655
2.06k
    if ( parentDs != nullptr ) {
2656
2.06k
        auto modifier = parentDs->GetData(0);
2657
2.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.06k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.28k
    Datasource ds(data, size);
2655
2.28k
    if ( parentDs != nullptr ) {
2656
2.28k
        auto modifier = parentDs->GetData(0);
2657
2.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.28k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.18k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.18k
    Datasource ds(data, size);
2655
3.18k
    if ( parentDs != nullptr ) {
2656
3.18k
        auto modifier = parentDs->GetData(0);
2657
3.18k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.18k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.41k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.41k
    Datasource ds(data, size);
2655
2.41k
    if ( parentDs != nullptr ) {
2656
2.41k
        auto modifier = parentDs->GetData(0);
2657
2.41k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.41k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.28k
    Datasource ds(data, size);
2655
2.28k
    if ( parentDs != nullptr ) {
2656
2.28k
        auto modifier = parentDs->GetData(0);
2657
2.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.28k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.48k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.48k
    Datasource ds(data, size);
2655
2.48k
    if ( parentDs != nullptr ) {
2656
2.48k
        auto modifier = parentDs->GetData(0);
2657
2.48k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.48k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.48k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.92k
    Datasource ds(data, size);
2655
2.92k
    if ( parentDs != nullptr ) {
2656
2.92k
        auto modifier = parentDs->GetData(0);
2657
2.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.92k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.92k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.42k
    Datasource ds(data, size);
2655
2.42k
    if ( parentDs != nullptr ) {
2656
2.42k
        auto modifier = parentDs->GetData(0);
2657
2.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.42k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.42k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.65k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.65k
    Datasource ds(data, size);
2655
2.65k
    if ( parentDs != nullptr ) {
2656
2.65k
        auto modifier = parentDs->GetData(0);
2657
2.65k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.65k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.65k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.29k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.29k
    Datasource ds(data, size);
2655
2.29k
    if ( parentDs != nullptr ) {
2656
2.29k
        auto modifier = parentDs->GetData(0);
2657
2.29k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.29k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.29k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.52k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.52k
    Datasource ds(data, size);
2655
2.52k
    if ( parentDs != nullptr ) {
2656
2.52k
        auto modifier = parentDs->GetData(0);
2657
2.52k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.52k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.11k
    Datasource ds(data, size);
2655
3.11k
    if ( parentDs != nullptr ) {
2656
3.11k
        auto modifier = parentDs->GetData(0);
2657
3.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.11k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.11k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.84k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.84k
    Datasource ds(data, size);
2655
2.84k
    if ( parentDs != nullptr ) {
2656
2.84k
        auto modifier = parentDs->GetData(0);
2657
2.84k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.84k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.76k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.76k
    Datasource ds(data, size);
2655
2.76k
    if ( parentDs != nullptr ) {
2656
2.76k
        auto modifier = parentDs->GetData(0);
2657
2.76k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.76k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.63k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.63k
    Datasource ds(data, size);
2655
1.63k
    if ( parentDs != nullptr ) {
2656
1.63k
        auto modifier = parentDs->GetData(0);
2657
1.63k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.63k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.63k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.86k
    Datasource ds(data, size);
2655
2.86k
    if ( parentDs != nullptr ) {
2656
2.86k
        auto modifier = parentDs->GetData(0);
2657
2.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.86k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.54k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.54k
    Datasource ds(data, size);
2655
2.54k
    if ( parentDs != nullptr ) {
2656
2.54k
        auto modifier = parentDs->GetData(0);
2657
2.54k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.54k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.32k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.32k
    Datasource ds(data, size);
2655
2.32k
    if ( parentDs != nullptr ) {
2656
2.32k
        auto modifier = parentDs->GetData(0);
2657
2.32k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.32k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.73k
    Datasource ds(data, size);
2655
2.73k
    if ( parentDs != nullptr ) {
2656
2.73k
        auto modifier = parentDs->GetData(0);
2657
2.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.73k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.11k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.11k
    Datasource ds(data, size);
2655
3.11k
    if ( parentDs != nullptr ) {
2656
3.11k
        auto modifier = parentDs->GetData(0);
2657
3.11k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.11k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.10k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.10k
    Datasource ds(data, size);
2655
2.10k
    if ( parentDs != nullptr ) {
2656
2.10k
        auto modifier = parentDs->GetData(0);
2657
2.10k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.10k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.10k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.37k
    Datasource ds(data, size);
2655
2.37k
    if ( parentDs != nullptr ) {
2656
2.37k
        auto modifier = parentDs->GetData(0);
2657
2.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.37k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.37k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.62k
    Datasource ds(data, size);
2655
2.62k
    if ( parentDs != nullptr ) {
2656
2.62k
        auto modifier = parentDs->GetData(0);
2657
2.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.62k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.85k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.85k
    Datasource ds(data, size);
2655
1.85k
    if ( parentDs != nullptr ) {
2656
1.85k
        auto modifier = parentDs->GetData(0);
2657
1.85k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.85k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.85k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.03k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.03k
    Datasource ds(data, size);
2655
2.03k
    if ( parentDs != nullptr ) {
2656
2.03k
        auto modifier = parentDs->GetData(0);
2657
2.03k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.03k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.03k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.06k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.06k
    Datasource ds(data, size);
2655
2.06k
    if ( parentDs != nullptr ) {
2656
2.06k
        auto modifier = parentDs->GetData(0);
2657
2.06k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.06k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.50k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.50k
    Datasource ds(data, size);
2655
2.50k
    if ( parentDs != nullptr ) {
2656
2.50k
        auto modifier = parentDs->GetData(0);
2657
2.50k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.50k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
3.45k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
3.45k
    Datasource ds(data, size);
2655
3.45k
    if ( parentDs != nullptr ) {
2656
3.45k
        auto modifier = parentDs->GetData(0);
2657
3.45k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
3.45k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
3.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
16.9k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
16.9k
    Datasource ds(data, size);
2655
16.9k
    if ( parentDs != nullptr ) {
2656
16.9k
        auto modifier = parentDs->GetData(0);
2657
16.9k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
16.9k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
16.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.86k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.86k
    Datasource ds(data, size);
2655
1.86k
    if ( parentDs != nullptr ) {
2656
1.86k
        auto modifier = parentDs->GetData(0);
2657
1.86k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.86k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.65k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.65k
    Datasource ds(data, size);
2655
2.65k
    if ( parentDs != nullptr ) {
2656
2.65k
        auto modifier = parentDs->GetData(0);
2657
2.65k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.65k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.81k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.81k
    Datasource ds(data, size);
2655
1.81k
    if ( parentDs != nullptr ) {
2656
1.81k
        auto modifier = parentDs->GetData(0);
2657
1.81k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.81k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.81k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.70k
    Datasource ds(data, size);
2655
1.70k
    if ( parentDs != nullptr ) {
2656
1.70k
        auto modifier = parentDs->GetData(0);
2657
1.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.70k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.37k
    Datasource ds(data, size);
2655
2.37k
    if ( parentDs != nullptr ) {
2656
2.37k
        auto modifier = parentDs->GetData(0);
2657
2.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.37k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.37k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.56k
    Datasource ds(data, size);
2655
2.56k
    if ( parentDs != nullptr ) {
2656
2.56k
        auto modifier = parentDs->GetData(0);
2657
2.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.56k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.37k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.37k
    Datasource ds(data, size);
2655
2.37k
    if ( parentDs != nullptr ) {
2656
2.37k
        auto modifier = parentDs->GetData(0);
2657
2.37k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.37k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.37k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.00k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.00k
    Datasource ds(data, size);
2655
2.00k
    if ( parentDs != nullptr ) {
2656
2.00k
        auto modifier = parentDs->GetData(0);
2657
2.00k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.00k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.47k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.47k
    Datasource ds(data, size);
2655
2.47k
    if ( parentDs != nullptr ) {
2656
2.47k
        auto modifier = parentDs->GetData(0);
2657
2.47k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.47k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.92k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.92k
    Datasource ds(data, size);
2655
1.92k
    if ( parentDs != nullptr ) {
2656
1.92k
        auto modifier = parentDs->GetData(0);
2657
1.92k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.92k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.61k
    Datasource ds(data, size);
2655
2.61k
    if ( parentDs != nullptr ) {
2656
2.61k
        auto modifier = parentDs->GetData(0);
2657
2.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.61k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.66k
    Datasource ds(data, size);
2655
2.66k
    if ( parentDs != nullptr ) {
2656
2.66k
        auto modifier = parentDs->GetData(0);
2657
2.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.66k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.22k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.22k
    Datasource ds(data, size);
2655
2.22k
    if ( parentDs != nullptr ) {
2656
2.22k
        auto modifier = parentDs->GetData(0);
2657
2.22k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.22k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.89k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.89k
    Datasource ds(data, size);
2655
2.89k
    if ( parentDs != nullptr ) {
2656
2.89k
        auto modifier = parentDs->GetData(0);
2657
2.89k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.89k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.70k
    Datasource ds(data, size);
2655
2.70k
    if ( parentDs != nullptr ) {
2656
2.70k
        auto modifier = parentDs->GetData(0);
2657
2.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.70k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.30k
    Datasource ds(data, size);
2655
2.30k
    if ( parentDs != nullptr ) {
2656
2.30k
        auto modifier = parentDs->GetData(0);
2657
2.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.30k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.15k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.15k
    Datasource ds(data, size);
2655
2.15k
    if ( parentDs != nullptr ) {
2656
2.15k
        auto modifier = parentDs->GetData(0);
2657
2.15k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.15k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.15k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.01k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.01k
    Datasource ds(data, size);
2655
2.01k
    if ( parentDs != nullptr ) {
2656
2.01k
        auto modifier = parentDs->GetData(0);
2657
2.01k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.01k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.01k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.88k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.88k
    Datasource ds(data, size);
2655
1.88k
    if ( parentDs != nullptr ) {
2656
1.88k
        auto modifier = parentDs->GetData(0);
2657
1.88k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.88k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.88k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.26k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.26k
    Datasource ds(data, size);
2655
2.26k
    if ( parentDs != nullptr ) {
2656
2.26k
        auto modifier = parentDs->GetData(0);
2657
2.26k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.26k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.66k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.66k
    Datasource ds(data, size);
2655
1.66k
    if ( parentDs != nullptr ) {
2656
1.66k
        auto modifier = parentDs->GetData(0);
2657
1.66k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.66k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.95k
    Datasource ds(data, size);
2655
1.95k
    if ( parentDs != nullptr ) {
2656
1.95k
        auto modifier = parentDs->GetData(0);
2657
1.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.95k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.77k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.77k
    Datasource ds(data, size);
2655
1.77k
    if ( parentDs != nullptr ) {
2656
1.77k
        auto modifier = parentDs->GetData(0);
2657
1.77k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.77k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.77k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.19k
    Datasource ds(data, size);
2655
2.19k
    if ( parentDs != nullptr ) {
2656
2.19k
        auto modifier = parentDs->GetData(0);
2657
2.19k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.19k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.31k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.31k
    Datasource ds(data, size);
2655
2.31k
    if ( parentDs != nullptr ) {
2656
2.31k
        auto modifier = parentDs->GetData(0);
2657
2.31k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.31k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.90k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.90k
    Datasource ds(data, size);
2655
2.90k
    if ( parentDs != nullptr ) {
2656
2.90k
        auto modifier = parentDs->GetData(0);
2657
2.90k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.90k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.90k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.08k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.08k
    Datasource ds(data, size);
2655
2.08k
    if ( parentDs != nullptr ) {
2656
2.08k
        auto modifier = parentDs->GetData(0);
2657
2.08k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.08k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.73k
    Datasource ds(data, size);
2655
1.73k
    if ( parentDs != nullptr ) {
2656
1.73k
        auto modifier = parentDs->GetData(0);
2657
1.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.73k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.67k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.67k
    Datasource ds(data, size);
2655
2.67k
    if ( parentDs != nullptr ) {
2656
2.67k
        auto modifier = parentDs->GetData(0);
2657
2.67k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.67k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.42k
    Datasource ds(data, size);
2655
2.42k
    if ( parentDs != nullptr ) {
2656
2.42k
        auto modifier = parentDs->GetData(0);
2657
2.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.42k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.42k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.56k
    Datasource ds(data, size);
2655
2.56k
    if ( parentDs != nullptr ) {
2656
2.56k
        auto modifier = parentDs->GetData(0);
2657
2.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.56k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.42k
    Datasource ds(data, size);
2655
2.42k
    if ( parentDs != nullptr ) {
2656
2.42k
        auto modifier = parentDs->GetData(0);
2657
2.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.42k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.05k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.05k
    Datasource ds(data, size);
2655
2.05k
    if ( parentDs != nullptr ) {
2656
2.05k
        auto modifier = parentDs->GetData(0);
2657
2.05k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.05k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
1.69k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
1.69k
    Datasource ds(data, size);
2655
1.69k
    if ( parentDs != nullptr ) {
2656
1.69k
        auto modifier = parentDs->GetData(0);
2657
1.69k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
1.69k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
1.69k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2653
2.59k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2654
2.59k
    Datasource ds(data, size);
2655
2.59k
    if ( parentDs != nullptr ) {
2656
2.59k
        auto modifier = parentDs->GetData(0);
2657
2.59k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2658
2.59k
    } else {
2659
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2660
0
    }
2661
2.59k
}
2662
2663
template <class ResultType, class OperationType>
2664
253k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
253k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
253k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
253k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
253k
    if ( modules.find(moduleID) == modules.end() ) {
2678
173k
        return nullptr;
2679
173k
    }
2680
2681
79.9k
    return modules.at(moduleID);
2682
253k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
5.32k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
5.32k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
5.32k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
5.32k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
5.32k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.38k
        return nullptr;
2679
1.38k
    }
2680
2681
3.93k
    return modules.at(moduleID);
2682
5.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
4.32k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
4.32k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
4.32k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
4.32k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
4.32k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.77k
        return nullptr;
2679
1.77k
    }
2680
2681
2.54k
    return modules.at(moduleID);
2682
4.32k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
4.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
4.65k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
4.65k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
4.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
4.65k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.67k
        return nullptr;
2679
1.67k
    }
2680
2681
2.98k
    return modules.at(moduleID);
2682
4.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
5.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
5.31k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
5.31k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
5.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
5.31k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.83k
        return nullptr;
2679
1.83k
    }
2680
2681
3.48k
    return modules.at(moduleID);
2682
5.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
18.5k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
18.5k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
18.5k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
18.5k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
18.5k
    if ( modules.find(moduleID) == modules.end() ) {
2678
3.24k
        return nullptr;
2679
3.24k
    }
2680
2681
15.3k
    return modules.at(moduleID);
2682
18.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
11.3k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
11.3k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
11.3k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
11.3k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
11.3k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.09k
        return nullptr;
2679
2.09k
    }
2680
2681
9.21k
    return modules.at(moduleID);
2682
11.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.69k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.69k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.69k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.67k
        return nullptr;
2679
1.67k
    }
2680
2681
1.01k
    return modules.at(moduleID);
2682
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
6.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
6.29k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
6.29k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
6.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
6.29k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.45k
        return nullptr;
2679
2.45k
    }
2680
2681
3.83k
    return modules.at(moduleID);
2682
6.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.28k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.28k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.28k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.56k
        return nullptr;
2679
1.56k
    }
2680
2681
728
    return modules.at(moduleID);
2682
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.86k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.86k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.86k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.21k
        return nullptr;
2679
2.21k
    }
2680
2681
657
    return modules.at(moduleID);
2682
2.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.69k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.69k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.69k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.69k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.69k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.12k
        return nullptr;
2679
2.12k
    }
2680
2681
574
    return modules.at(moduleID);
2682
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.50k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.50k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.50k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.74k
        return nullptr;
2679
1.74k
    }
2680
2681
1.76k
    return modules.at(moduleID);
2682
3.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.66k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.66k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.66k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.66k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.66k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.25k
        return nullptr;
2679
2.25k
    }
2680
2681
410
    return modules.at(moduleID);
2682
2.66k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.96k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.96k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.96k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.96k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.96k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.17k
        return nullptr;
2679
2.17k
    }
2680
2681
784
    return modules.at(moduleID);
2682
2.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.58k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.58k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.58k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.82k
        return nullptr;
2679
1.82k
    }
2680
2681
764
    return modules.at(moduleID);
2682
2.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.45k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.45k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.45k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.45k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.45k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.33k
        return nullptr;
2679
2.33k
    }
2680
2681
121
    return modules.at(moduleID);
2682
2.45k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.70k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.70k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.70k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.70k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.70k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.99k
        return nullptr;
2679
1.99k
    }
2680
2681
1.71k
    return modules.at(moduleID);
2682
3.70k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.18k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.18k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.18k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.09k
        return nullptr;
2679
1.09k
    }
2680
2681
1.08k
    return modules.at(moduleID);
2682
2.18k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.53k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.53k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.53k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.42k
        return nullptr;
2679
1.42k
    }
2680
2681
1.11k
    return modules.at(moduleID);
2682
2.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.05k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.05k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.05k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.05k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.05k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.13k
        return nullptr;
2679
1.13k
    }
2680
2681
918
    return modules.at(moduleID);
2682
2.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.26k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.26k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.26k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.06k
        return nullptr;
2679
2.06k
    }
2680
2681
192
    return modules.at(moduleID);
2682
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.17k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.17k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.17k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.87k
        return nullptr;
2679
1.87k
    }
2680
2681
1.29k
    return modules.at(moduleID);
2682
3.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.40k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.40k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.40k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.99k
        return nullptr;
2679
1.99k
    }
2680
2681
409
    return modules.at(moduleID);
2682
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.26k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.26k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.26k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.26k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.26k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.08k
        return nullptr;
2679
2.08k
    }
2680
2681
176
    return modules.at(moduleID);
2682
2.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.46k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.46k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.46k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.46k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.46k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.27k
        return nullptr;
2679
2.27k
    }
2680
2681
186
    return modules.at(moduleID);
2682
2.46k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.89k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.89k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.89k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.71k
        return nullptr;
2679
2.71k
    }
2680
2681
184
    return modules.at(moduleID);
2682
2.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.40k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.40k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.40k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.75k
        return nullptr;
2679
1.75k
    }
2680
2681
652
    return modules.at(moduleID);
2682
2.40k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.63k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.63k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.63k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.63k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.63k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.21k
        return nullptr;
2679
2.21k
    }
2680
2681
421
    return modules.at(moduleID);
2682
2.63k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.27k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.27k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.27k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.27k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.27k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.10k
        return nullptr;
2679
2.10k
    }
2680
2681
169
    return modules.at(moduleID);
2682
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.50k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.50k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.50k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.34k
        return nullptr;
2679
2.34k
    }
2680
2681
161
    return modules.at(moduleID);
2682
2.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.09k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.09k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.09k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.09k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.09k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.14k
        return nullptr;
2679
2.14k
    }
2680
2681
952
    return modules.at(moduleID);
2682
3.09k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.82k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.82k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.82k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.82k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.82k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.26k
        return nullptr;
2679
2.26k
    }
2680
2681
562
    return modules.at(moduleID);
2682
2.82k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.73k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.73k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.73k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.73k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.73k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.49k
        return nullptr;
2679
2.49k
    }
2680
2681
245
    return modules.at(moduleID);
2682
2.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.62k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.62k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.62k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.62k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.62k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.47k
        return nullptr;
2679
1.47k
    }
2680
2681
150
    return modules.at(moduleID);
2682
1.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.83k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.83k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.83k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.66k
        return nullptr;
2679
2.66k
    }
2680
2681
176
    return modules.at(moduleID);
2682
2.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.52k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.52k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.52k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.25k
        return nullptr;
2679
2.25k
    }
2680
2681
269
    return modules.at(moduleID);
2682
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.30k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.30k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.30k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.30k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.30k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.11k
        return nullptr;
2679
2.11k
    }
2680
2681
185
    return modules.at(moduleID);
2682
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.71k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.71k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.71k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.71k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.71k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.49k
        return nullptr;
2679
2.49k
    }
2680
2681
223
    return modules.at(moduleID);
2682
2.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.08k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.08k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.08k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.08k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.08k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.88k
        return nullptr;
2679
2.88k
    }
2680
2681
201
    return modules.at(moduleID);
2682
3.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.08k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.08k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.08k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.08k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.08k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.79k
        return nullptr;
2679
1.79k
    }
2680
2681
293
    return modules.at(moduleID);
2682
2.08k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.35k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.35k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.35k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.35k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.35k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.02k
        return nullptr;
2679
2.02k
    }
2680
2681
333
    return modules.at(moduleID);
2682
2.35k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.60k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.60k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.60k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.60k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.60k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.19k
        return nullptr;
2679
2.19k
    }
2680
2681
411
    return modules.at(moduleID);
2682
2.60k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.83k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.83k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.83k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.83k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.83k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.58k
        return nullptr;
2679
1.58k
    }
2680
2681
247
    return modules.at(moduleID);
2682
1.83k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.01k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.01k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.01k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.74k
        return nullptr;
2679
1.74k
    }
2680
2681
270
    return modules.at(moduleID);
2682
2.01k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.04k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.04k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.04k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.04k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.04k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.77k
        return nullptr;
2679
1.77k
    }
2680
2681
269
    return modules.at(moduleID);
2682
2.04k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.48k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.48k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.48k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.48k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.48k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.25k
        return nullptr;
2679
2.25k
    }
2680
2681
232
    return modules.at(moduleID);
2682
2.48k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
3.42k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
3.42k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
3.42k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
3.42k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
3.42k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.87k
        return nullptr;
2679
2.87k
    }
2680
2681
553
    return modules.at(moduleID);
2682
3.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
16.9k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
16.9k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
16.9k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
16.9k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
16.9k
    if ( modules.find(moduleID) == modules.end() ) {
2678
6.76k
        return nullptr;
2679
6.76k
    }
2680
2681
10.1k
    return modules.at(moduleID);
2682
16.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.84k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.84k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.84k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.84k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.84k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.63k
        return nullptr;
2679
1.63k
    }
2680
2681
214
    return modules.at(moduleID);
2682
1.84k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.61k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.61k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.61k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.09k
        return nullptr;
2679
2.09k
    }
2680
2681
515
    return modules.at(moduleID);
2682
2.61k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.79k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.79k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.79k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.79k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.79k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.61k
        return nullptr;
2679
1.61k
    }
2680
2681
185
    return modules.at(moduleID);
2682
1.79k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.68k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.68k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.68k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.68k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.68k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.51k
        return nullptr;
2679
1.51k
    }
2680
2681
172
    return modules.at(moduleID);
2682
1.68k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.35k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.35k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.35k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.35k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.35k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.18k
        return nullptr;
2679
2.18k
    }
2680
2681
168
    return modules.at(moduleID);
2682
2.35k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.52k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.52k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.52k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.37k
        return nullptr;
2679
2.37k
    }
2680
2681
158
    return modules.at(moduleID);
2682
2.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.27k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.27k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.27k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.27k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.27k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.03k
        return nullptr;
2679
2.03k
    }
2680
2681
239
    return modules.at(moduleID);
2682
2.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.97k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.97k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.97k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.97k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.97k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.73k
        return nullptr;
2679
1.73k
    }
2680
2681
236
    return modules.at(moduleID);
2682
1.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.41k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.41k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.41k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.41k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.41k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.19k
        return nullptr;
2679
2.19k
    }
2680
2681
216
    return modules.at(moduleID);
2682
2.41k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.89k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.89k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.89k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.70k
        return nullptr;
2679
1.70k
    }
2680
2681
190
    return modules.at(moduleID);
2682
1.89k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.56k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.56k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.56k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.56k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.56k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.38k
        return nullptr;
2679
2.38k
    }
2680
2681
182
    return modules.at(moduleID);
2682
2.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.64k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.64k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.64k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.64k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.64k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.45k
        return nullptr;
2679
2.45k
    }
2680
2681
192
    return modules.at(moduleID);
2682
2.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.20k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.20k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.20k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.20k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.20k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.94k
        return nullptr;
2679
1.94k
    }
2680
2681
262
    return modules.at(moduleID);
2682
2.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.87k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.87k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.87k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.87k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.87k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.65k
        return nullptr;
2679
2.65k
    }
2680
2681
220
    return modules.at(moduleID);
2682
2.87k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.67k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.67k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.67k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.51k
        return nullptr;
2679
2.51k
    }
2680
2681
161
    return modules.at(moduleID);
2682
2.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.28k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.28k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.28k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.28k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.28k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.10k
        return nullptr;
2679
2.10k
    }
2680
2681
181
    return modules.at(moduleID);
2682
2.28k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.13k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.13k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.13k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.96k
        return nullptr;
2679
1.96k
    }
2680
2681
171
    return modules.at(moduleID);
2682
2.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.99k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.99k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.99k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.99k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.99k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.81k
        return nullptr;
2679
1.81k
    }
2680
2681
177
    return modules.at(moduleID);
2682
1.99k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.86k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.86k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.86k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.86k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.86k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.64k
        return nullptr;
2679
1.64k
    }
2680
2681
217
    return modules.at(moduleID);
2682
1.86k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.24k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.24k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.24k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.24k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.24k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.07k
        return nullptr;
2679
2.07k
    }
2680
2681
173
    return modules.at(moduleID);
2682
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.64k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.64k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.64k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.64k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.64k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.47k
        return nullptr;
2679
1.47k
    }
2680
2681
172
    return modules.at(moduleID);
2682
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.93k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.93k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.93k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.93k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.93k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.75k
        return nullptr;
2679
1.75k
    }
2680
2681
183
    return modules.at(moduleID);
2682
1.93k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.76k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.76k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.76k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.76k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.76k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.60k
        return nullptr;
2679
1.60k
    }
2680
2681
158
    return modules.at(moduleID);
2682
1.76k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.17k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.17k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.17k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.98k
        return nullptr;
2679
1.98k
    }
2680
2681
194
    return modules.at(moduleID);
2682
2.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.29k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.29k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.29k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.29k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.29k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.06k
        return nullptr;
2679
2.06k
    }
2680
2681
238
    return modules.at(moduleID);
2682
2.29k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.89k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.89k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.89k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.89k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.89k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.69k
        return nullptr;
2679
2.69k
    }
2680
2681
200
    return modules.at(moduleID);
2682
2.89k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.06k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.06k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.06k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.06k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.06k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.84k
        return nullptr;
2679
1.84k
    }
2680
2681
216
    return modules.at(moduleID);
2682
2.06k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.71k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.71k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.71k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.71k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.71k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.52k
        return nullptr;
2679
1.52k
    }
2680
2681
189
    return modules.at(moduleID);
2682
1.71k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.65k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.65k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.65k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.40k
        return nullptr;
2679
2.40k
    }
2680
2681
253
    return modules.at(moduleID);
2682
2.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.39k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.39k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.39k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.39k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.39k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.14k
        return nullptr;
2679
2.14k
    }
2680
2681
256
    return modules.at(moduleID);
2682
2.39k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.54k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.54k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.54k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.54k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.54k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.30k
        return nullptr;
2679
2.30k
    }
2680
2681
241
    return modules.at(moduleID);
2682
2.54k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.40k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.40k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.40k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.40k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.40k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.18k
        return nullptr;
2679
2.18k
    }
2680
2681
224
    return modules.at(moduleID);
2682
2.40k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.01k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.01k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.01k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.01k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.01k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.73k
        return nullptr;
2679
1.73k
    }
2680
2681
285
    return modules.at(moduleID);
2682
2.01k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
1.67k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
1.67k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
1.67k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
1.67k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
1.67k
    if ( modules.find(moduleID) == modules.end() ) {
2678
1.50k
        return nullptr;
2679
1.50k
    }
2680
2681
168
    return modules.at(moduleID);
2682
1.67k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2664
2.54k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2665
2.54k
    auto moduleID = ds.Get<uint64_t>();
2666
2667
    /* Override the extracted module ID with the preferred one, if specified */
2668
2.54k
    if ( options.forceModule != std::nullopt ) {
2669
0
        moduleID = *options.forceModule;
2670
0
    }
2671
2672
    /* Skip if this is a disabled module */
2673
2.54k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2674
0
        return nullptr;
2675
0
    }
2676
2677
2.54k
    if ( modules.find(moduleID) == modules.end() ) {
2678
2.33k
        return nullptr;
2679
2.33k
    }
2680
2681
211
    return modules.at(moduleID);
2682
2.54k
}
2683
2684
template <class ResultType, class OperationType>
2685
37.3k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
37.3k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
37.3k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
255k
    do {
2691
255k
        auto op = getOp(&parentDs, data, size);
2692
255k
        auto module = getModule(parentDs);
2693
255k
        if ( module == nullptr ) {
2694
173k
            continue;
2695
173k
        }
2696
2697
81.8k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
81.8k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
688
            break;
2702
688
        }
2703
254k
    } while ( parentDs.Get<bool>() == true );
2704
2705
37.3k
    if ( operations.empty() == true ) {
2706
610
        return;
2707
610
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
36.7k
#if 1
2711
36.7k
    {
2712
36.7k
        std::set<uint64_t> moduleIDs;
2713
55.5k
        for (const auto& m : modules ) {
2714
55.5k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
55.5k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
55.5k
            moduleIDs.insert(moduleID);
2722
55.5k
        }
2723
2724
36.7k
        std::set<uint64_t> operationModuleIDs;
2725
70.5k
        for (const auto& op : operations) {
2726
70.5k
            operationModuleIDs.insert(op.first->ID);
2727
70.5k
        }
2728
2729
36.7k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
36.7k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
36.7k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
36.7k
        for (const auto& id : addModuleIDs) {
2734
26.7k
            operations.push_back({ modules.at(id), operations[0].second});
2735
26.7k
        }
2736
36.7k
    }
2737
36.7k
#endif
2738
2739
36.7k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
36.7k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
134k
    for (size_t i = 0; i < operations.size(); i++) {
2747
97.2k
        auto& operation = operations[i];
2748
2749
97.2k
        auto& module = operation.first;
2750
97.2k
        auto& op = operation.second;
2751
2752
97.2k
        if ( i > 0 ) {
2753
69.4k
            auto& prevModule = operations[i-1].first;
2754
69.4k
            auto& prevOp = operations[i].second;
2755
2756
69.4k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
40.7k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
40.7k
                if ( curModifier.size() == 0 ) {
2759
16.7M
                    for (size_t j = 0; j < 512; j++) {
2760
16.7M
                        curModifier.push_back(1);
2761
16.7M
                    }
2762
32.6k
                } else {
2763
135k
                    for (auto& c : curModifier) {
2764
135k
                        c++;
2765
135k
                    }
2766
8.12k
                }
2767
40.7k
            }
2768
69.4k
        }
2769
2770
97.2k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
97.2k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
97.2k
        const auto& result = results.back();
2777
2778
97.2k
        if ( result.second != std::nullopt ) {
2779
30.6k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
30.6k
        }
2786
2787
97.2k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
97.2k
        if ( options.disableTests == false ) {
2796
97.2k
            tests::test(op, result.second);
2797
97.2k
        }
2798
2799
97.2k
        postprocess(module, op, result);
2800
97.2k
    }
2801
2802
36.7k
    if ( options.noCompare == false ) {
2803
27.7k
        compare(operations, results, data, size);
2804
27.7k
    }
2805
36.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.81k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.81k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.81k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
5.33k
    do {
2691
5.33k
        auto op = getOp(&parentDs, data, size);
2692
5.33k
        auto module = getModule(parentDs);
2693
5.33k
        if ( module == nullptr ) {
2694
1.38k
            continue;
2695
1.38k
        }
2696
2697
3.95k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
3.95k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
5.33k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.81k
    if ( operations.empty() == true ) {
2706
14
        return;
2707
14
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.80k
#if 1
2711
1.80k
    {
2712
1.80k
        std::set<uint64_t> moduleIDs;
2713
3.34k
        for (const auto& m : modules ) {
2714
3.34k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
3.34k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
3.34k
            moduleIDs.insert(moduleID);
2722
3.34k
        }
2723
2724
1.80k
        std::set<uint64_t> operationModuleIDs;
2725
3.71k
        for (const auto& op : operations) {
2726
3.71k
            operationModuleIDs.insert(op.first->ID);
2727
3.71k
        }
2728
2729
1.80k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.80k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.80k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.80k
        for (const auto& id : addModuleIDs) {
2734
1.65k
            operations.push_back({ modules.at(id), operations[0].second});
2735
1.65k
        }
2736
1.80k
    }
2737
1.80k
#endif
2738
2739
1.80k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.80k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
7.17k
    for (size_t i = 0; i < operations.size(); i++) {
2747
5.36k
        auto& operation = operations[i];
2748
2749
5.36k
        auto& module = operation.first;
2750
5.36k
        auto& op = operation.second;
2751
2752
5.36k
        if ( i > 0 ) {
2753
3.69k
            auto& prevModule = operations[i-1].first;
2754
3.69k
            auto& prevOp = operations[i].second;
2755
2756
3.69k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.00k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.00k
                if ( curModifier.size() == 0 ) {
2759
916k
                    for (size_t j = 0; j < 512; j++) {
2760
914k
                        curModifier.push_back(1);
2761
914k
                    }
2762
1.78k
                } else {
2763
540
                    for (auto& c : curModifier) {
2764
540
                        c++;
2765
540
                    }
2766
213
                }
2767
2.00k
            }
2768
3.69k
        }
2769
2770
5.36k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
5.36k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
5.36k
        const auto& result = results.back();
2777
2778
5.36k
        if ( result.second != std::nullopt ) {
2779
2.83k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
2.83k
        }
2786
2787
5.36k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
5.36k
        if ( options.disableTests == false ) {
2796
5.36k
            tests::test(op, result.second);
2797
5.36k
        }
2798
2799
5.36k
        postprocess(module, op, result);
2800
5.36k
    }
2801
2802
1.80k
    if ( options.noCompare == false ) {
2803
1.67k
        compare(operations, results, data, size);
2804
1.67k
    }
2805
1.80k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.12k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.12k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.12k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
4.34k
    do {
2691
4.34k
        auto op = getOp(&parentDs, data, size);
2692
4.34k
        auto module = getModule(parentDs);
2693
4.34k
        if ( module == nullptr ) {
2694
1.77k
            continue;
2695
1.77k
        }
2696
2697
2.56k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
2.56k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
4.34k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.12k
    if ( operations.empty() == true ) {
2706
17
        return;
2707
17
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.11k
#if 1
2711
1.11k
    {
2712
1.11k
        std::set<uint64_t> moduleIDs;
2713
2.03k
        for (const auto& m : modules ) {
2714
2.03k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
2.03k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
2.03k
            moduleIDs.insert(moduleID);
2722
2.03k
        }
2723
2724
1.11k
        std::set<uint64_t> operationModuleIDs;
2725
2.31k
        for (const auto& op : operations) {
2726
2.31k
            operationModuleIDs.insert(op.first->ID);
2727
2.31k
        }
2728
2729
1.11k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.11k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.11k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.11k
        for (const auto& id : addModuleIDs) {
2734
994
            operations.push_back({ modules.at(id), operations[0].second});
2735
994
        }
2736
1.11k
    }
2737
1.11k
#endif
2738
2739
1.11k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.11k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
4.42k
    for (size_t i = 0; i < operations.size(); i++) {
2747
3.31k
        auto& operation = operations[i];
2748
2749
3.31k
        auto& module = operation.first;
2750
3.31k
        auto& op = operation.second;
2751
2752
3.31k
        if ( i > 0 ) {
2753
2.29k
            auto& prevModule = operations[i-1].first;
2754
2.29k
            auto& prevOp = operations[i].second;
2755
2756
2.29k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
1.22k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
1.22k
                if ( curModifier.size() == 0 ) {
2759
543k
                    for (size_t j = 0; j < 512; j++) {
2760
542k
                        curModifier.push_back(1);
2761
542k
                    }
2762
1.05k
                } else {
2763
423
                    for (auto& c : curModifier) {
2764
423
                        c++;
2765
423
                    }
2766
170
                }
2767
1.22k
            }
2768
2.29k
        }
2769
2770
3.31k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
3.31k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
3.31k
        const auto& result = results.back();
2777
2778
3.31k
        if ( result.second != std::nullopt ) {
2779
1.12k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.12k
        }
2786
2787
3.31k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
3.31k
        if ( options.disableTests == false ) {
2796
3.31k
            tests::test(op, result.second);
2797
3.31k
        }
2798
2799
3.31k
        postprocess(module, op, result);
2800
3.31k
    }
2801
2802
1.11k
    if ( options.noCompare == false ) {
2803
1.01k
        compare(operations, results, data, size);
2804
1.01k
    }
2805
1.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
627
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
627
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
627
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
4.67k
    do {
2691
4.67k
        auto op = getOp(&parentDs, data, size);
2692
4.67k
        auto module = getModule(parentDs);
2693
4.67k
        if ( module == nullptr ) {
2694
1.67k
            continue;
2695
1.67k
        }
2696
2697
3.00k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
3.00k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
4.67k
    } while ( parentDs.Get<bool>() == true );
2704
2705
627
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
622
#if 1
2711
622
    {
2712
622
        std::set<uint64_t> moduleIDs;
2713
1.05k
        for (const auto& m : modules ) {
2714
1.05k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.05k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.05k
            moduleIDs.insert(moduleID);
2722
1.05k
        }
2723
2724
622
        std::set<uint64_t> operationModuleIDs;
2725
2.66k
        for (const auto& op : operations) {
2726
2.66k
            operationModuleIDs.insert(op.first->ID);
2727
2.66k
        }
2728
2729
622
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
622
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
622
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
622
        for (const auto& id : addModuleIDs) {
2734
507
            operations.push_back({ modules.at(id), operations[0].second});
2735
507
        }
2736
622
    }
2737
622
#endif
2738
2739
622
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
622
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
3.79k
    for (size_t i = 0; i < operations.size(); i++) {
2747
3.17k
        auto& operation = operations[i];
2748
2749
3.17k
        auto& module = operation.first;
2750
3.17k
        auto& op = operation.second;
2751
2752
3.17k
        if ( i > 0 ) {
2753
2.64k
            auto& prevModule = operations[i-1].first;
2754
2.64k
            auto& prevOp = operations[i].second;
2755
2756
2.64k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.09k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.09k
                if ( curModifier.size() == 0 ) {
2759
984k
                    for (size_t j = 0; j < 512; j++) {
2760
983k
                        curModifier.push_back(1);
2761
983k
                    }
2762
1.92k
                } else {
2763
421
                    for (auto& c : curModifier) {
2764
421
                        c++;
2765
421
                    }
2766
173
                }
2767
2.09k
            }
2768
2.64k
        }
2769
2770
3.17k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
3.17k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
3.17k
        const auto& result = results.back();
2777
2778
3.17k
        if ( result.second != std::nullopt ) {
2779
1.60k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.60k
        }
2786
2787
3.17k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
3.17k
        if ( options.disableTests == false ) {
2796
3.17k
            tests::test(op, result.second);
2797
3.17k
        }
2798
2799
3.17k
        postprocess(module, op, result);
2800
3.17k
    }
2801
2802
622
    if ( options.noCompare == false ) {
2803
526
        compare(operations, results, data, size);
2804
526
    }
2805
622
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.06k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.06k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.06k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
5.33k
    do {
2691
5.33k
        auto op = getOp(&parentDs, data, size);
2692
5.33k
        auto module = getModule(parentDs);
2693
5.33k
        if ( module == nullptr ) {
2694
1.83k
            continue;
2695
1.83k
        }
2696
2697
3.50k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
3.50k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
5.33k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.06k
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.05k
#if 1
2711
1.05k
    {
2712
1.05k
        std::set<uint64_t> moduleIDs;
2713
1.97k
        for (const auto& m : modules ) {
2714
1.97k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.97k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.97k
            moduleIDs.insert(moduleID);
2722
1.97k
        }
2723
2724
1.05k
        std::set<uint64_t> operationModuleIDs;
2725
3.24k
        for (const auto& op : operations) {
2726
3.24k
            operationModuleIDs.insert(op.first->ID);
2727
3.24k
        }
2728
2729
1.05k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.05k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.05k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.05k
        for (const auto& id : addModuleIDs) {
2734
965
            operations.push_back({ modules.at(id), operations[0].second});
2735
965
        }
2736
1.05k
    }
2737
1.05k
#endif
2738
2739
1.05k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.05k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
5.26k
    for (size_t i = 0; i < operations.size(); i++) {
2747
4.20k
        auto& operation = operations[i];
2748
2749
4.20k
        auto& module = operation.first;
2750
4.20k
        auto& op = operation.second;
2751
2752
4.20k
        if ( i > 0 ) {
2753
3.22k
            auto& prevModule = operations[i-1].first;
2754
3.22k
            auto& prevOp = operations[i].second;
2755
2756
3.22k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.21k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.21k
                if ( curModifier.size() == 0 ) {
2759
956k
                    for (size_t j = 0; j < 512; j++) {
2760
954k
                        curModifier.push_back(1);
2761
954k
                    }
2762
1.86k
                } else {
2763
858
                    for (auto& c : curModifier) {
2764
858
                        c++;
2765
858
                    }
2766
345
                }
2767
2.21k
            }
2768
3.22k
        }
2769
2770
4.20k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
4.20k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
4.20k
        const auto& result = results.back();
2777
2778
4.20k
        if ( result.second != std::nullopt ) {
2779
1.83k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.83k
        }
2786
2787
4.20k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
4.20k
        if ( options.disableTests == false ) {
2796
4.20k
            tests::test(op, result.second);
2797
4.20k
        }
2798
2799
4.20k
        postprocess(module, op, result);
2800
4.20k
    }
2801
2802
1.05k
    if ( options.noCompare == false ) {
2803
985
        compare(operations, results, data, size);
2804
985
    }
2805
1.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
4.27k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
4.27k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
4.27k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
18.6k
    do {
2691
18.6k
        auto op = getOp(&parentDs, data, size);
2692
18.6k
        auto module = getModule(parentDs);
2693
18.6k
        if ( module == nullptr ) {
2694
3.24k
            continue;
2695
3.24k
        }
2696
2697
15.3k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
15.3k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
18.6k
    } while ( parentDs.Get<bool>() == true );
2704
2705
4.27k
    if ( operations.empty() == true ) {
2706
11
        return;
2707
11
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
4.26k
#if 1
2711
4.26k
    {
2712
4.26k
        std::set<uint64_t> moduleIDs;
2713
8.33k
        for (const auto& m : modules ) {
2714
8.33k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
8.33k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
8.33k
            moduleIDs.insert(moduleID);
2722
8.33k
        }
2723
2724
4.26k
        std::set<uint64_t> operationModuleIDs;
2725
14.9k
        for (const auto& op : operations) {
2726
14.9k
            operationModuleIDs.insert(op.first->ID);
2727
14.9k
        }
2728
2729
4.26k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
4.26k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
4.26k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
4.26k
        for (const auto& id : addModuleIDs) {
2734
4.14k
            operations.push_back({ modules.at(id), operations[0].second});
2735
4.14k
        }
2736
4.26k
    }
2737
4.26k
#endif
2738
2739
4.26k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
4.26k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
23.3k
    for (size_t i = 0; i < operations.size(); i++) {
2747
19.0k
        auto& operation = operations[i];
2748
2749
19.0k
        auto& module = operation.first;
2750
19.0k
        auto& op = operation.second;
2751
2752
19.0k
        if ( i > 0 ) {
2753
14.8k
            auto& prevModule = operations[i-1].first;
2754
14.8k
            auto& prevOp = operations[i].second;
2755
2756
14.8k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
10.6k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
10.6k
                if ( curModifier.size() == 0 ) {
2759
4.72M
                    for (size_t j = 0; j < 512; j++) {
2760
4.71M
                        curModifier.push_back(1);
2761
4.71M
                    }
2762
9.21k
                } else {
2763
12.6k
                    for (auto& c : curModifier) {
2764
12.6k
                        c++;
2765
12.6k
                    }
2766
1.46k
                }
2767
10.6k
            }
2768
14.8k
        }
2769
2770
19.0k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
19.0k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
19.0k
        const auto& result = results.back();
2777
2778
19.0k
        if ( result.second != std::nullopt ) {
2779
7.33k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
7.33k
        }
2786
2787
19.0k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
19.0k
        if ( options.disableTests == false ) {
2796
19.0k
            tests::test(op, result.second);
2797
19.0k
        }
2798
2799
19.0k
        postprocess(module, op, result);
2800
19.0k
    }
2801
2802
4.26k
    if ( options.noCompare == false ) {
2803
4.16k
        compare(operations, results, data, size);
2804
4.16k
    }
2805
4.26k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
2.01k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
2.01k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
2.01k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
11.3k
    do {
2691
11.3k
        auto op = getOp(&parentDs, data, size);
2692
11.3k
        auto module = getModule(parentDs);
2693
11.3k
        if ( module == nullptr ) {
2694
2.09k
            continue;
2695
2.09k
        }
2696
2697
9.24k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
9.24k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
11.3k
    } while ( parentDs.Get<bool>() == true );
2704
2705
2.01k
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
2.00k
#if 1
2711
2.00k
    {
2712
2.00k
        std::set<uint64_t> moduleIDs;
2713
3.81k
        for (const auto& m : modules ) {
2714
3.81k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
3.81k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
3.81k
            moduleIDs.insert(moduleID);
2722
3.81k
        }
2723
2724
2.00k
        std::set<uint64_t> operationModuleIDs;
2725
8.91k
        for (const auto& op : operations) {
2726
8.91k
            operationModuleIDs.insert(op.first->ID);
2727
8.91k
        }
2728
2729
2.00k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
2.00k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
2.00k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
2.00k
        for (const auto& id : addModuleIDs) {
2734
1.87k
            operations.push_back({ modules.at(id), operations[0].second});
2735
1.87k
        }
2736
2.00k
    }
2737
2.00k
#endif
2738
2739
2.00k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
2.00k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
12.7k
    for (size_t i = 0; i < operations.size(); i++) {
2747
10.7k
        auto& operation = operations[i];
2748
2749
10.7k
        auto& module = operation.first;
2750
10.7k
        auto& op = operation.second;
2751
2752
10.7k
        if ( i > 0 ) {
2753
8.88k
            auto& prevModule = operations[i-1].first;
2754
8.88k
            auto& prevOp = operations[i].second;
2755
2756
8.88k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
6.93k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
6.93k
                if ( curModifier.size() == 0 ) {
2759
2.83M
                    for (size_t j = 0; j < 512; j++) {
2760
2.82M
                        curModifier.push_back(1);
2761
2.82M
                    }
2762
5.52k
                } else {
2763
14.2k
                    for (auto& c : curModifier) {
2764
14.2k
                        c++;
2765
14.2k
                    }
2766
1.40k
                }
2767
6.93k
            }
2768
8.88k
        }
2769
2770
10.7k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
10.7k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
10.7k
        const auto& result = results.back();
2777
2778
10.7k
        if ( result.second != std::nullopt ) {
2779
1.47k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.47k
        }
2786
2787
10.7k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
10.7k
        if ( options.disableTests == false ) {
2796
10.7k
            tests::test(op, result.second);
2797
10.7k
        }
2798
2799
10.7k
        postprocess(module, op, result);
2800
10.7k
    }
2801
2802
2.00k
    if ( options.noCompare == false ) {
2803
1.90k
        compare(operations, results, data, size);
2804
1.90k
    }
2805
2.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
229
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
229
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
229
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.71k
    do {
2691
2.71k
        auto op = getOp(&parentDs, data, size);
2692
2.71k
        auto module = getModule(parentDs);
2693
2.71k
        if ( module == nullptr ) {
2694
1.67k
            continue;
2695
1.67k
        }
2696
2697
1.04k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.04k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
2.71k
    } while ( parentDs.Get<bool>() == true );
2704
2705
229
    if ( operations.empty() == true ) {
2706
17
        return;
2707
17
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
212
#if 1
2711
212
    {
2712
212
        std::set<uint64_t> moduleIDs;
2713
248
        for (const auto& m : modules ) {
2714
248
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
248
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
248
            moduleIDs.insert(moduleID);
2722
248
        }
2723
2724
212
        std::set<uint64_t> operationModuleIDs;
2725
771
        for (const auto& op : operations) {
2726
771
            operationModuleIDs.insert(op.first->ID);
2727
771
        }
2728
2729
212
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
212
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
212
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
212
        for (const auto& id : addModuleIDs) {
2734
104
            operations.push_back({ modules.at(id), operations[0].second});
2735
104
        }
2736
212
    }
2737
212
#endif
2738
2739
212
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
212
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.08k
    for (size_t i = 0; i < operations.size(); i++) {
2747
875
        auto& operation = operations[i];
2748
2749
875
        auto& module = operation.first;
2750
875
        auto& op = operation.second;
2751
2752
875
        if ( i > 0 ) {
2753
751
            auto& prevModule = operations[i-1].first;
2754
751
            auto& prevOp = operations[i].second;
2755
2756
751
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
598
                auto& curModifier = op.modifier.GetVectorPtr();
2758
598
                if ( curModifier.size() == 0 ) {
2759
251k
                    for (size_t j = 0; j < 512; j++) {
2760
251k
                        curModifier.push_back(1);
2761
251k
                    }
2762
491
                } else {
2763
338
                    for (auto& c : curModifier) {
2764
338
                        c++;
2765
338
                    }
2766
107
                }
2767
598
            }
2768
751
        }
2769
2770
875
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
875
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
875
        const auto& result = results.back();
2777
2778
875
        if ( result.second != std::nullopt ) {
2779
254
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
254
        }
2786
2787
875
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
875
        if ( options.disableTests == false ) {
2796
875
            tests::test(op, result.second);
2797
875
        }
2798
2799
875
        postprocess(module, op, result);
2800
875
    }
2801
2802
212
    if ( options.noCompare == false ) {
2803
124
        compare(operations, results, data, size);
2804
124
    }
2805
212
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
1.21k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
1.21k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
1.21k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
6.31k
    do {
2691
6.31k
        auto op = getOp(&parentDs, data, size);
2692
6.31k
        auto module = getModule(parentDs);
2693
6.31k
        if ( module == nullptr ) {
2694
2.45k
            continue;
2695
2.45k
        }
2696
2697
3.85k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
3.85k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
3
            break;
2702
3
        }
2703
6.31k
    } while ( parentDs.Get<bool>() == true );
2704
2705
1.21k
    if ( operations.empty() == true ) {
2706
12
        return;
2707
12
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
1.20k
#if 1
2711
1.20k
    {
2712
1.20k
        std::set<uint64_t> moduleIDs;
2713
2.18k
        for (const auto& m : modules ) {
2714
2.18k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
2.18k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
2.18k
            moduleIDs.insert(moduleID);
2722
2.18k
        }
2723
2724
1.20k
        std::set<uint64_t> operationModuleIDs;
2725
3.49k
        for (const auto& op : operations) {
2726
3.49k
            operationModuleIDs.insert(op.first->ID);
2727
3.49k
        }
2728
2729
1.20k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
1.20k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
1.20k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
1.20k
        for (const auto& id : addModuleIDs) {
2734
1.07k
            operations.push_back({ modules.at(id), operations[0].second});
2735
1.07k
        }
2736
1.20k
    }
2737
1.20k
#endif
2738
2739
1.20k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
1.20k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
5.76k
    for (size_t i = 0; i < operations.size(); i++) {
2747
4.56k
        auto& operation = operations[i];
2748
2749
4.56k
        auto& module = operation.first;
2750
4.56k
        auto& op = operation.second;
2751
2752
4.56k
        if ( i > 0 ) {
2753
3.47k
            auto& prevModule = operations[i-1].first;
2754
3.47k
            auto& prevOp = operations[i].second;
2755
2756
3.47k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.34k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.34k
                if ( curModifier.size() == 0 ) {
2759
1.08M
                    for (size_t j = 0; j < 512; j++) {
2760
1.08M
                        curModifier.push_back(1);
2761
1.08M
                    }
2762
2.11k
                } else {
2763
466
                    for (auto& c : curModifier) {
2764
466
                        c++;
2765
466
                    }
2766
237
                }
2767
2.34k
            }
2768
3.47k
        }
2769
2770
4.56k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
4.56k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
4.56k
        const auto& result = results.back();
2777
2778
4.56k
        if ( result.second != std::nullopt ) {
2779
2.64k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
2.64k
        }
2786
2787
4.56k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
4.56k
        if ( options.disableTests == false ) {
2796
4.56k
            tests::test(op, result.second);
2797
4.56k
        }
2798
2799
4.56k
        postprocess(module, op, result);
2800
4.56k
    }
2801
2802
1.20k
    if ( options.noCompare == false ) {
2803
1.09k
        compare(operations, results, data, size);
2804
1.09k
    }
2805
1.20k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
206
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
206
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
206
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.30k
    do {
2691
2.30k
        auto op = getOp(&parentDs, data, size);
2692
2.30k
        auto module = getModule(parentDs);
2693
2.30k
        if ( module == nullptr ) {
2694
1.56k
            continue;
2695
1.56k
        }
2696
2697
746
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
746
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
2.30k
    } while ( parentDs.Get<bool>() == true );
2704
2705
206
    if ( operations.empty() == true ) {
2706
16
        return;
2707
16
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
190
#if 1
2711
190
    {
2712
190
        std::set<uint64_t> moduleIDs;
2713
208
        for (const auto& m : modules ) {
2714
208
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
208
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
208
            moduleIDs.insert(moduleID);
2722
208
        }
2723
2724
190
        std::set<uint64_t> operationModuleIDs;
2725
504
        for (const auto& op : operations) {
2726
504
            operationModuleIDs.insert(op.first->ID);
2727
504
        }
2728
2729
190
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
190
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
190
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
190
        for (const auto& id : addModuleIDs) {
2734
85
            operations.push_back({ modules.at(id), operations[0].second});
2735
85
        }
2736
190
    }
2737
190
#endif
2738
2739
190
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
190
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
779
    for (size_t i = 0; i < operations.size(); i++) {
2747
589
        auto& operation = operations[i];
2748
2749
589
        auto& module = operation.first;
2750
589
        auto& op = operation.second;
2751
2752
589
        if ( i > 0 ) {
2753
485
            auto& prevModule = operations[i-1].first;
2754
485
            auto& prevOp = operations[i].second;
2755
2756
485
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
353
                auto& curModifier = op.modifier.GetVectorPtr();
2758
353
                if ( curModifier.size() == 0 ) {
2759
142k
                    for (size_t j = 0; j < 512; j++) {
2760
142k
                        curModifier.push_back(1);
2761
142k
                    }
2762
278
                } else {
2763
305
                    for (auto& c : curModifier) {
2764
305
                        c++;
2765
305
                    }
2766
75
                }
2767
353
            }
2768
485
        }
2769
2770
589
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
589
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
589
        const auto& result = results.back();
2777
2778
589
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
589
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
589
        if ( options.disableTests == false ) {
2796
589
            tests::test(op, result.second);
2797
589
        }
2798
2799
589
        postprocess(module, op, result);
2800
589
    }
2801
2802
190
    if ( options.noCompare == false ) {
2803
104
        compare(operations, results, data, size);
2804
104
    }
2805
190
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.88k
    do {
2691
2.88k
        auto op = getOp(&parentDs, data, size);
2692
2.88k
        auto module = getModule(parentDs);
2693
2.88k
        if ( module == nullptr ) {
2694
2.21k
            continue;
2695
2.21k
        }
2696
2697
676
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
676
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
2.88k
    } while ( parentDs.Get<bool>() == true );
2704
2705
149
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
142
#if 1
2711
142
    {
2712
142
        std::set<uint64_t> moduleIDs;
2713
142
        for (const auto& m : modules ) {
2714
128
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
128
            moduleIDs.insert(moduleID);
2722
128
        }
2723
2724
142
        std::set<uint64_t> operationModuleIDs;
2725
418
        for (const auto& op : operations) {
2726
418
            operationModuleIDs.insert(op.first->ID);
2727
418
        }
2728
2729
142
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
142
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
142
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
142
        for (const auto& id : addModuleIDs) {
2734
45
            operations.push_back({ modules.at(id), operations[0].second});
2735
45
        }
2736
142
    }
2737
142
#endif
2738
2739
142
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
142
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
605
    for (size_t i = 0; i < operations.size(); i++) {
2747
463
        auto& operation = operations[i];
2748
2749
463
        auto& module = operation.first;
2750
463
        auto& op = operation.second;
2751
2752
463
        if ( i > 0 ) {
2753
399
            auto& prevModule = operations[i-1].first;
2754
399
            auto& prevOp = operations[i].second;
2755
2756
399
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
307
                auto& curModifier = op.modifier.GetVectorPtr();
2758
307
                if ( curModifier.size() == 0 ) {
2759
119k
                    for (size_t j = 0; j < 512; j++) {
2760
119k
                        curModifier.push_back(1);
2761
119k
                    }
2762
233
                } else {
2763
295
                    for (auto& c : curModifier) {
2764
295
                        c++;
2765
295
                    }
2766
74
                }
2767
307
            }
2768
399
        }
2769
2770
463
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
463
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
463
        const auto& result = results.back();
2777
2778
463
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
463
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
463
        if ( options.disableTests == false ) {
2796
463
            tests::test(op, result.second);
2797
463
        }
2798
2799
463
        postprocess(module, op, result);
2800
463
    }
2801
2802
142
    if ( options.noCompare == false ) {
2803
64
        compare(operations, results, data, size);
2804
64
    }
2805
142
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
216
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
216
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
216
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.72k
    do {
2691
2.72k
        auto op = getOp(&parentDs, data, size);
2692
2.72k
        auto module = getModule(parentDs);
2693
2.72k
        if ( module == nullptr ) {
2694
2.12k
            continue;
2695
2.12k
        }
2696
2697
600
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
600
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
2.72k
    } while ( parentDs.Get<bool>() == true );
2704
2705
216
    if ( operations.empty() == true ) {
2706
24
        return;
2707
24
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
192
#if 1
2711
192
    {
2712
192
        std::set<uint64_t> moduleIDs;
2713
192
        for (const auto& m : modules ) {
2714
122
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
122
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
122
            moduleIDs.insert(moduleID);
2722
122
        }
2723
2724
192
        std::set<uint64_t> operationModuleIDs;
2725
395
        for (const auto& op : operations) {
2726
395
            operationModuleIDs.insert(op.first->ID);
2727
395
        }
2728
2729
192
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
192
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
192
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
192
        for (const auto& id : addModuleIDs) {
2734
40
            operations.push_back({ modules.at(id), operations[0].second});
2735
40
        }
2736
192
    }
2737
192
#endif
2738
2739
192
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
192
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
627
    for (size_t i = 0; i < operations.size(); i++) {
2747
435
        auto& operation = operations[i];
2748
2749
435
        auto& module = operation.first;
2750
435
        auto& op = operation.second;
2751
2752
435
        if ( i > 0 ) {
2753
374
            auto& prevModule = operations[i-1].first;
2754
374
            auto& prevOp = operations[i].second;
2755
2756
374
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
285
                auto& curModifier = op.modifier.GetVectorPtr();
2758
285
                if ( curModifier.size() == 0 ) {
2759
116k
                    for (size_t j = 0; j < 512; j++) {
2760
116k
                        curModifier.push_back(1);
2761
116k
                    }
2762
227
                } else {
2763
320
                    for (auto& c : curModifier) {
2764
320
                        c++;
2765
320
                    }
2766
58
                }
2767
285
            }
2768
374
        }
2769
2770
435
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
435
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
435
        const auto& result = results.back();
2777
2778
435
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
435
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
435
        if ( options.disableTests == false ) {
2796
435
            tests::test(op, result.second);
2797
435
        }
2798
2799
435
        postprocess(module, op, result);
2800
435
    }
2801
2802
192
    if ( options.noCompare == false ) {
2803
61
        compare(operations, results, data, size);
2804
61
    }
2805
192
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
667
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
667
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
667
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.52k
    do {
2691
3.52k
        auto op = getOp(&parentDs, data, size);
2692
3.52k
        auto module = getModule(parentDs);
2693
3.52k
        if ( module == nullptr ) {
2694
1.74k
            continue;
2695
1.74k
        }
2696
2697
1.77k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.77k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
3.52k
    } while ( parentDs.Get<bool>() == true );
2704
2705
667
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
665
#if 1
2711
665
    {
2712
665
        std::set<uint64_t> moduleIDs;
2713
1.17k
        for (const auto& m : modules ) {
2714
1.17k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.17k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.17k
            moduleIDs.insert(moduleID);
2722
1.17k
        }
2723
2724
665
        std::set<uint64_t> operationModuleIDs;
2725
1.56k
        for (const auto& op : operations) {
2726
1.56k
            operationModuleIDs.insert(op.first->ID);
2727
1.56k
        }
2728
2729
665
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
665
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
665
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
665
        for (const auto& id : addModuleIDs) {
2734
566
            operations.push_back({ modules.at(id), operations[0].second});
2735
566
        }
2736
665
    }
2737
665
#endif
2738
2739
665
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
665
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.79k
    for (size_t i = 0; i < operations.size(); i++) {
2747
2.13k
        auto& operation = operations[i];
2748
2749
2.13k
        auto& module = operation.first;
2750
2.13k
        auto& op = operation.second;
2751
2752
2.13k
        if ( i > 0 ) {
2753
1.54k
            auto& prevModule = operations[i-1].first;
2754
1.54k
            auto& prevOp = operations[i].second;
2755
2756
1.54k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
926
                auto& curModifier = op.modifier.GetVectorPtr();
2758
926
                if ( curModifier.size() == 0 ) {
2759
387k
                    for (size_t j = 0; j < 512; j++) {
2760
387k
                        curModifier.push_back(1);
2761
387k
                    }
2762
756
                } else {
2763
404
                    for (auto& c : curModifier) {
2764
404
                        c++;
2765
404
                    }
2766
170
                }
2767
926
            }
2768
1.54k
        }
2769
2770
2.13k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
2.13k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
2.13k
        const auto& result = results.back();
2777
2778
2.13k
        if ( result.second != std::nullopt ) {
2779
708
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
708
        }
2786
2787
2.13k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
2.13k
        if ( options.disableTests == false ) {
2796
2.13k
            tests::test(op, result.second);
2797
2.13k
        }
2798
2799
2.13k
        postprocess(module, op, result);
2800
2.13k
    }
2801
2802
665
    if ( options.noCompare == false ) {
2803
587
        compare(operations, results, data, size);
2804
587
    }
2805
665
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
328
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
328
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
328
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.68k
    do {
2691
2.68k
        auto op = getOp(&parentDs, data, size);
2692
2.68k
        auto module = getModule(parentDs);
2693
2.68k
        if ( module == nullptr ) {
2694
2.25k
            continue;
2695
2.25k
        }
2696
2697
433
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
433
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
45
            break;
2702
45
        }
2703
2.64k
    } while ( parentDs.Get<bool>() == true );
2704
2705
328
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
321
#if 1
2711
321
    {
2712
321
        std::set<uint64_t> moduleIDs;
2713
474
        for (const auto& m : modules ) {
2714
474
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
474
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
474
            moduleIDs.insert(moduleID);
2722
474
        }
2723
2724
321
        std::set<uint64_t> operationModuleIDs;
2725
356
        for (const auto& op : operations) {
2726
356
            operationModuleIDs.insert(op.first->ID);
2727
356
        }
2728
2729
321
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
321
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
321
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
321
        for (const auto& id : addModuleIDs) {
2734
231
            operations.push_back({ modules.at(id), operations[0].second});
2735
231
        }
2736
321
    }
2737
321
#endif
2738
2739
321
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
321
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
908
    for (size_t i = 0; i < operations.size(); i++) {
2747
587
        auto& operation = operations[i];
2748
2749
587
        auto& module = operation.first;
2750
587
        auto& op = operation.second;
2751
2752
587
        if ( i > 0 ) {
2753
350
            auto& prevModule = operations[i-1].first;
2754
350
            auto& prevOp = operations[i].second;
2755
2756
350
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
112
                auto& curModifier = op.modifier.GetVectorPtr();
2758
112
                if ( curModifier.size() == 0 ) {
2759
49.2k
                    for (size_t j = 0; j < 512; j++) {
2760
49.1k
                        curModifier.push_back(1);
2761
49.1k
                    }
2762
96
                } else {
2763
284
                    for (auto& c : curModifier) {
2764
284
                        c++;
2765
284
                    }
2766
16
                }
2767
112
            }
2768
350
        }
2769
2770
587
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
587
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
587
        const auto& result = results.back();
2777
2778
587
        if ( result.second != std::nullopt ) {
2779
263
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
263
        }
2786
2787
587
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
587
        if ( options.disableTests == false ) {
2796
587
            tests::test(op, result.second);
2797
587
        }
2798
2799
587
        postprocess(module, op, result);
2800
587
    }
2801
2802
321
    if ( options.noCompare == false ) {
2803
237
        compare(operations, results, data, size);
2804
237
    }
2805
321
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
162
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
162
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
162
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.98k
    do {
2691
2.98k
        auto op = getOp(&parentDs, data, size);
2692
2.98k
        auto module = getModule(parentDs);
2693
2.98k
        if ( module == nullptr ) {
2694
2.17k
            continue;
2695
2.17k
        }
2696
2697
810
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
810
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
2.98k
    } while ( parentDs.Get<bool>() == true );
2704
2705
162
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
159
#if 1
2711
159
    {
2712
159
        std::set<uint64_t> moduleIDs;
2713
159
        for (const auto& m : modules ) {
2714
130
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
130
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
130
            moduleIDs.insert(moduleID);
2722
130
        }
2723
2724
159
        std::set<uint64_t> operationModuleIDs;
2725
490
        for (const auto& op : operations) {
2726
490
            operationModuleIDs.insert(op.first->ID);
2727
490
        }
2728
2729
159
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
159
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
159
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
159
        for (const auto& id : addModuleIDs) {
2734
43
            operations.push_back({ modules.at(id), operations[0].second});
2735
43
        }
2736
159
    }
2737
159
#endif
2738
2739
159
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
159
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
692
    for (size_t i = 0; i < operations.size(); i++) {
2747
533
        auto& operation = operations[i];
2748
2749
533
        auto& module = operation.first;
2750
533
        auto& op = operation.second;
2751
2752
533
        if ( i > 0 ) {
2753
468
            auto& prevModule = operations[i-1].first;
2754
468
            auto& prevOp = operations[i].second;
2755
2756
468
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
354
                auto& curModifier = op.modifier.GetVectorPtr();
2758
354
                if ( curModifier.size() == 0 ) {
2759
139k
                    for (size_t j = 0; j < 512; j++) {
2760
139k
                        curModifier.push_back(1);
2761
139k
                    }
2762
272
                } else {
2763
293
                    for (auto& c : curModifier) {
2764
293
                        c++;
2765
293
                    }
2766
82
                }
2767
354
            }
2768
468
        }
2769
2770
533
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
533
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
533
        const auto& result = results.back();
2777
2778
533
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
533
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
533
        if ( options.disableTests == false ) {
2796
533
            tests::test(op, result.second);
2797
533
        }
2798
2799
533
        postprocess(module, op, result);
2800
533
    }
2801
2802
159
    if ( options.noCompare == false ) {
2803
65
        compare(operations, results, data, size);
2804
65
    }
2805
159
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
147
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
147
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
147
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.60k
    do {
2691
2.60k
        auto op = getOp(&parentDs, data, size);
2692
2.60k
        auto module = getModule(parentDs);
2693
2.60k
        if ( module == nullptr ) {
2694
1.82k
            continue;
2695
1.82k
        }
2696
2697
783
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
783
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
1
            break;
2702
1
        }
2703
2.60k
    } while ( parentDs.Get<bool>() == true );
2704
2705
147
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
141
#if 1
2711
141
    {
2712
141
        std::set<uint64_t> moduleIDs;
2713
141
        for (const auto& m : modules ) {
2714
114
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
114
            moduleIDs.insert(moduleID);
2722
114
        }
2723
2724
141
        std::set<uint64_t> operationModuleIDs;
2725
403
        for (const auto& op : operations) {
2726
403
            operationModuleIDs.insert(op.first->ID);
2727
403
        }
2728
2729
141
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
141
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
141
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
141
        for (const auto& id : addModuleIDs) {
2734
38
            operations.push_back({ modules.at(id), operations[0].second});
2735
38
        }
2736
141
    }
2737
141
#endif
2738
2739
141
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
141
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
582
    for (size_t i = 0; i < operations.size(); i++) {
2747
441
        auto& operation = operations[i];
2748
2749
441
        auto& module = operation.first;
2750
441
        auto& op = operation.second;
2751
2752
441
        if ( i > 0 ) {
2753
384
            auto& prevModule = operations[i-1].first;
2754
384
            auto& prevOp = operations[i].second;
2755
2756
384
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
299
                auto& curModifier = op.modifier.GetVectorPtr();
2758
299
                if ( curModifier.size() == 0 ) {
2759
123k
                    for (size_t j = 0; j < 512; j++) {
2760
123k
                        curModifier.push_back(1);
2761
123k
                    }
2762
241
                } else {
2763
283
                    for (auto& c : curModifier) {
2764
283
                        c++;
2765
283
                    }
2766
58
                }
2767
299
            }
2768
384
        }
2769
2770
441
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
441
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
441
        const auto& result = results.back();
2777
2778
441
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
441
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
441
        if ( options.disableTests == false ) {
2796
441
            tests::test(op, result.second);
2797
441
        }
2798
2799
441
        postprocess(module, op, result);
2800
441
    }
2801
2802
141
    if ( options.noCompare == false ) {
2803
57
        compare(operations, results, data, size);
2804
57
    }
2805
141
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
137
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
137
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
137
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.47k
    do {
2691
2.47k
        auto op = getOp(&parentDs, data, size);
2692
2.47k
        auto module = getModule(parentDs);
2693
2.47k
        if ( module == nullptr ) {
2694
2.33k
            continue;
2695
2.33k
        }
2696
2697
138
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
138
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
21
            break;
2702
21
        }
2703
2.44k
    } while ( parentDs.Get<bool>() == true );
2704
2705
137
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
130
#if 1
2711
130
    {
2712
130
        std::set<uint64_t> moduleIDs;
2713
130
        for (const auto& m : modules ) {
2714
114
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
114
            moduleIDs.insert(moduleID);
2722
114
        }
2723
2724
130
        std::set<uint64_t> operationModuleIDs;
2725
130
        for (const auto& op : operations) {
2726
78
            operationModuleIDs.insert(op.first->ID);
2727
78
        }
2728
2729
130
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
130
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
130
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
130
        for (const auto& id : addModuleIDs) {
2734
55
            operations.push_back({ modules.at(id), operations[0].second});
2735
55
        }
2736
130
    }
2737
130
#endif
2738
2739
130
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
130
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
263
    for (size_t i = 0; i < operations.size(); i++) {
2747
133
        auto& operation = operations[i];
2748
2749
133
        auto& module = operation.first;
2750
133
        auto& op = operation.second;
2751
2752
133
        if ( i > 0 ) {
2753
76
            auto& prevModule = operations[i-1].first;
2754
76
            auto& prevOp = operations[i].second;
2755
2756
76
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
19
                auto& curModifier = op.modifier.GetVectorPtr();
2758
19
                if ( curModifier.size() == 0 ) {
2759
4.61k
                    for (size_t j = 0; j < 512; j++) {
2760
4.60k
                        curModifier.push_back(1);
2761
4.60k
                    }
2762
10
                } else {
2763
228
                    for (auto& c : curModifier) {
2764
228
                        c++;
2765
228
                    }
2766
10
                }
2767
19
            }
2768
76
        }
2769
2770
133
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
133
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
133
        const auto& result = results.back();
2777
2778
133
        if ( result.second != std::nullopt ) {
2779
32
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
32
        }
2786
2787
133
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
133
        if ( options.disableTests == false ) {
2796
133
            tests::test(op, result.second);
2797
133
        }
2798
2799
133
        postprocess(module, op, result);
2800
133
    }
2801
2802
130
    if ( options.noCompare == false ) {
2803
57
        compare(operations, results, data, size);
2804
57
    }
2805
130
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
423
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
423
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
423
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.73k
    do {
2691
3.73k
        auto op = getOp(&parentDs, data, size);
2692
3.73k
        auto module = getModule(parentDs);
2693
3.73k
        if ( module == nullptr ) {
2694
1.99k
            continue;
2695
1.99k
        }
2696
2697
1.73k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.73k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
2
            break;
2702
2
        }
2703
3.73k
    } while ( parentDs.Get<bool>() == true );
2704
2705
423
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
417
#if 1
2711
417
    {
2712
417
        std::set<uint64_t> moduleIDs;
2713
638
        for (const auto& m : modules ) {
2714
638
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
638
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
638
            moduleIDs.insert(moduleID);
2722
638
        }
2723
2724
417
        std::set<uint64_t> operationModuleIDs;
2725
1.45k
        for (const auto& op : operations) {
2726
1.45k
            operationModuleIDs.insert(op.first->ID);
2727
1.45k
        }
2728
2729
417
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
417
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
417
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
417
        for (const auto& id : addModuleIDs) {
2734
300
            operations.push_back({ modules.at(id), operations[0].second});
2735
300
        }
2736
417
    }
2737
417
#endif
2738
2739
417
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
417
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.17k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.75k
        auto& operation = operations[i];
2748
2749
1.75k
        auto& module = operation.first;
2750
1.75k
        auto& op = operation.second;
2751
2752
1.75k
        if ( i > 0 ) {
2753
1.43k
            auto& prevModule = operations[i-1].first;
2754
1.43k
            auto& prevOp = operations[i].second;
2755
2756
1.43k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
1.08k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
1.08k
                if ( curModifier.size() == 0 ) {
2759
438k
                    for (size_t j = 0; j < 512; j++) {
2760
437k
                        curModifier.push_back(1);
2761
437k
                    }
2762
855
                } else {
2763
456
                    for (auto& c : curModifier) {
2764
456
                        c++;
2765
456
                    }
2766
232
                }
2767
1.08k
            }
2768
1.43k
        }
2769
2770
1.75k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.75k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.75k
        const auto& result = results.back();
2777
2778
1.75k
        if ( result.second != std::nullopt ) {
2779
834
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
834
        }
2786
2787
1.75k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.75k
        if ( options.disableTests == false ) {
2796
1.75k
            tests::test(op, result.second);
2797
1.75k
        }
2798
2799
1.75k
        postprocess(module, op, result);
2800
1.75k
    }
2801
2802
417
    if ( options.noCompare == false ) {
2803
319
        compare(operations, results, data, size);
2804
319
    }
2805
417
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
798
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
798
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
798
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.19k
    do {
2691
2.19k
        auto op = getOp(&parentDs, data, size);
2692
2.19k
        auto module = getModule(parentDs);
2693
2.19k
        if ( module == nullptr ) {
2694
1.09k
            continue;
2695
1.09k
        }
2696
2697
1.10k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.10k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
16
            break;
2702
16
        }
2703
2.18k
    } while ( parentDs.Get<bool>() == true );
2704
2705
798
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
794
#if 1
2711
794
    {
2712
794
        std::set<uint64_t> moduleIDs;
2713
1.45k
        for (const auto& m : modules ) {
2714
1.45k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.45k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.45k
            moduleIDs.insert(moduleID);
2722
1.45k
        }
2723
2724
794
        std::set<uint64_t> operationModuleIDs;
2725
1.02k
        for (const auto& op : operations) {
2726
1.02k
            operationModuleIDs.insert(op.first->ID);
2727
1.02k
        }
2728
2729
794
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
794
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
794
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
794
        for (const auto& id : addModuleIDs) {
2734
717
            operations.push_back({ modules.at(id), operations[0].second});
2735
717
        }
2736
794
    }
2737
794
#endif
2738
2739
794
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
794
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.53k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.74k
        auto& operation = operations[i];
2748
2749
1.74k
        auto& module = operation.first;
2750
1.74k
        auto& op = operation.second;
2751
2752
1.74k
        if ( i > 0 ) {
2753
1.01k
            auto& prevModule = operations[i-1].first;
2754
1.01k
            auto& prevOp = operations[i].second;
2755
2756
1.01k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
280
                auto& curModifier = op.modifier.GetVectorPtr();
2758
280
                if ( curModifier.size() == 0 ) {
2759
106k
                    for (size_t j = 0; j < 512; j++) {
2760
106k
                        curModifier.push_back(1);
2761
106k
                    }
2762
208
                } else {
2763
984
                    for (auto& c : curModifier) {
2764
984
                        c++;
2765
984
                    }
2766
72
                }
2767
280
            }
2768
1.01k
        }
2769
2770
1.74k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.74k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.74k
        const auto& result = results.back();
2777
2778
1.74k
        if ( result.second != std::nullopt ) {
2779
804
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
804
        }
2786
2787
1.74k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.74k
        if ( options.disableTests == false ) {
2796
1.74k
            tests::test(op, result.second);
2797
1.74k
        }
2798
2799
1.74k
        postprocess(module, op, result);
2800
1.74k
    }
2801
2802
794
    if ( options.noCompare == false ) {
2803
728
        compare(operations, results, data, size);
2804
728
    }
2805
794
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
946
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
946
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
946
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.55k
    do {
2691
2.55k
        auto op = getOp(&parentDs, data, size);
2692
2.55k
        auto module = getModule(parentDs);
2693
2.55k
        if ( module == nullptr ) {
2694
1.42k
            continue;
2695
1.42k
        }
2696
2697
1.12k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.12k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.54k
    } while ( parentDs.Get<bool>() == true );
2704
2705
946
    if ( operations.empty() == true ) {
2706
24
        return;
2707
24
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
922
#if 1
2711
922
    {
2712
922
        std::set<uint64_t> moduleIDs;
2713
1.66k
        for (const auto& m : modules ) {
2714
1.66k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.66k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.66k
            moduleIDs.insert(moduleID);
2722
1.66k
        }
2723
2724
922
        std::set<uint64_t> operationModuleIDs;
2725
1.03k
        for (const auto& op : operations) {
2726
1.03k
            operationModuleIDs.insert(op.first->ID);
2727
1.03k
        }
2728
2729
922
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
922
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
922
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
922
        for (const auto& id : addModuleIDs) {
2734
822
            operations.push_back({ modules.at(id), operations[0].second});
2735
822
        }
2736
922
    }
2737
922
#endif
2738
2739
922
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
922
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.78k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.85k
        auto& operation = operations[i];
2748
2749
1.85k
        auto& module = operation.first;
2750
1.85k
        auto& op = operation.second;
2751
2752
1.85k
        if ( i > 0 ) {
2753
1.02k
            auto& prevModule = operations[i-1].first;
2754
1.02k
            auto& prevOp = operations[i].second;
2755
2756
1.02k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
186
                auto& curModifier = op.modifier.GetVectorPtr();
2758
186
                if ( curModifier.size() == 0 ) {
2759
82.5k
                    for (size_t j = 0; j < 512; j++) {
2760
82.4k
                        curModifier.push_back(1);
2761
82.4k
                    }
2762
161
                } else {
2763
237
                    for (auto& c : curModifier) {
2764
237
                        c++;
2765
237
                    }
2766
25
                }
2767
186
            }
2768
1.02k
        }
2769
2770
1.85k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.85k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.85k
        const auto& result = results.back();
2777
2778
1.85k
        if ( result.second != std::nullopt ) {
2779
1.66k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
1.66k
        }
2786
2787
1.85k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.85k
        if ( options.disableTests == false ) {
2796
1.85k
            tests::test(op, result.second);
2797
1.85k
        }
2798
2799
1.85k
        postprocess(module, op, result);
2800
1.85k
    }
2801
2802
922
    if ( options.noCompare == false ) {
2803
833
        compare(operations, results, data, size);
2804
833
    }
2805
922
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
853
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
853
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
853
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.06k
    do {
2691
2.06k
        auto op = getOp(&parentDs, data, size);
2692
2.06k
        auto module = getModule(parentDs);
2693
2.06k
        if ( module == nullptr ) {
2694
1.13k
            continue;
2695
1.13k
        }
2696
2697
930
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
930
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
13
            break;
2702
13
        }
2703
2.05k
    } while ( parentDs.Get<bool>() == true );
2704
2705
853
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
847
#if 1
2711
847
    {
2712
847
        std::set<uint64_t> moduleIDs;
2713
1.41k
        for (const auto& m : modules ) {
2714
1.41k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.41k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.41k
            moduleIDs.insert(moduleID);
2722
1.41k
        }
2723
2724
847
        std::set<uint64_t> operationModuleIDs;
2725
869
        for (const auto& op : operations) {
2726
869
            operationModuleIDs.insert(op.first->ID);
2727
869
        }
2728
2729
847
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
847
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
847
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
847
        for (const auto& id : addModuleIDs) {
2734
694
            operations.push_back({ modules.at(id), operations[0].second});
2735
694
        }
2736
847
    }
2737
847
#endif
2738
2739
847
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
847
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.41k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.56k
        auto& operation = operations[i];
2748
2749
1.56k
        auto& module = operation.first;
2750
1.56k
        auto& op = operation.second;
2751
2752
1.56k
        if ( i > 0 ) {
2753
858
            auto& prevModule = operations[i-1].first;
2754
858
            auto& prevOp = operations[i].second;
2755
2756
858
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
147
                auto& curModifier = op.modifier.GetVectorPtr();
2758
147
                if ( curModifier.size() == 0 ) {
2759
63.0k
                    for (size_t j = 0; j < 512; j++) {
2760
62.9k
                        curModifier.push_back(1);
2761
62.9k
                    }
2762
123
                } else {
2763
232
                    for (auto& c : curModifier) {
2764
232
                        c++;
2765
232
                    }
2766
24
                }
2767
147
            }
2768
858
        }
2769
2770
1.56k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.56k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.56k
        const auto& result = results.back();
2777
2778
1.56k
        if ( result.second != std::nullopt ) {
2779
378
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
378
        }
2786
2787
1.56k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.56k
        if ( options.disableTests == false ) {
2796
1.56k
            tests::test(op, result.second);
2797
1.56k
        }
2798
2799
1.56k
        postprocess(module, op, result);
2800
1.56k
    }
2801
2802
847
    if ( options.noCompare == false ) {
2803
705
        compare(operations, results, data, size);
2804
705
    }
2805
847
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
120
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
120
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
120
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.28k
    do {
2691
2.28k
        auto op = getOp(&parentDs, data, size);
2692
2.28k
        auto module = getModule(parentDs);
2693
2.28k
        if ( module == nullptr ) {
2694
2.06k
            continue;
2695
2.06k
        }
2696
2697
214
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
214
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.27k
    } while ( parentDs.Get<bool>() == true );
2704
2705
120
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
113
#if 1
2711
113
    {
2712
113
        std::set<uint64_t> moduleIDs;
2713
113
        for (const auto& m : modules ) {
2714
84
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
84
            moduleIDs.insert(moduleID);
2722
84
        }
2723
2724
113
        std::set<uint64_t> operationModuleIDs;
2725
121
        for (const auto& op : operations) {
2726
121
            operationModuleIDs.insert(op.first->ID);
2727
121
        }
2728
2729
113
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
113
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
113
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
113
        for (const auto& id : addModuleIDs) {
2734
31
            operations.push_back({ modules.at(id), operations[0].second});
2735
31
        }
2736
113
    }
2737
113
#endif
2738
2739
113
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
113
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
265
    for (size_t i = 0; i < operations.size(); i++) {
2747
152
        auto& operation = operations[i];
2748
2749
152
        auto& module = operation.first;
2750
152
        auto& op = operation.second;
2751
2752
152
        if ( i > 0 ) {
2753
110
            auto& prevModule = operations[i-1].first;
2754
110
            auto& prevOp = operations[i].second;
2755
2756
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
62
                auto& curModifier = op.modifier.GetVectorPtr();
2758
62
                if ( curModifier.size() == 0 ) {
2759
15.9k
                    for (size_t j = 0; j < 512; j++) {
2760
15.8k
                        curModifier.push_back(1);
2761
15.8k
                    }
2762
31
                } else {
2763
249
                    for (auto& c : curModifier) {
2764
249
                        c++;
2765
249
                    }
2766
31
                }
2767
62
            }
2768
110
        }
2769
2770
152
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
152
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
152
        const auto& result = results.back();
2777
2778
152
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
152
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
152
        if ( options.disableTests == false ) {
2796
152
            tests::test(op, result.second);
2797
152
        }
2798
2799
152
        postprocess(module, op, result);
2800
152
    }
2801
2802
113
    if ( options.noCompare == false ) {
2803
42
        compare(operations, results, data, size);
2804
42
    }
2805
113
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
724
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
724
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
724
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.18k
    do {
2691
3.18k
        auto op = getOp(&parentDs, data, size);
2692
3.18k
        auto module = getModule(parentDs);
2693
3.18k
        if ( module == nullptr ) {
2694
1.87k
            continue;
2695
1.87k
        }
2696
2697
1.31k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
1.31k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
44
            break;
2702
44
        }
2703
3.14k
    } while ( parentDs.Get<bool>() == true );
2704
2705
724
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
719
#if 1
2711
719
    {
2712
719
        std::set<uint64_t> moduleIDs;
2713
1.29k
        for (const auto& m : modules ) {
2714
1.29k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.29k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.29k
            moduleIDs.insert(moduleID);
2722
1.29k
        }
2723
2724
719
        std::set<uint64_t> operationModuleIDs;
2725
1.21k
        for (const auto& op : operations) {
2726
1.21k
            operationModuleIDs.insert(op.first->ID);
2727
1.21k
        }
2728
2729
719
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
719
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
719
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
719
        for (const auto& id : addModuleIDs) {
2734
634
            operations.push_back({ modules.at(id), operations[0].second});
2735
634
        }
2736
719
    }
2737
719
#endif
2738
2739
719
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
719
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.56k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.84k
        auto& operation = operations[i];
2748
2749
1.84k
        auto& module = operation.first;
2750
1.84k
        auto& op = operation.second;
2751
2752
1.84k
        if ( i > 0 ) {
2753
1.19k
            auto& prevModule = operations[i-1].first;
2754
1.19k
            auto& prevOp = operations[i].second;
2755
2756
1.19k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
544
                auto& curModifier = op.modifier.GetVectorPtr();
2758
544
                if ( curModifier.size() == 0 ) {
2759
211k
                    for (size_t j = 0; j < 512; j++) {
2760
210k
                        curModifier.push_back(1);
2761
210k
                    }
2762
412
                } else {
2763
13.5k
                    for (auto& c : curModifier) {
2764
13.5k
                        c++;
2765
13.5k
                    }
2766
132
                }
2767
544
            }
2768
1.19k
        }
2769
2770
1.84k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.84k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.84k
        const auto& result = results.back();
2777
2778
1.84k
        if ( result.second != std::nullopt ) {
2779
889
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
889
        }
2786
2787
1.84k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.84k
        if ( options.disableTests == false ) {
2796
1.84k
            tests::test(op, result.second);
2797
1.84k
        }
2798
2799
1.84k
        postprocess(module, op, result);
2800
1.84k
    }
2801
2802
719
    if ( options.noCompare == false ) {
2803
648
        compare(operations, results, data, size);
2804
648
    }
2805
719
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
215
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
215
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
215
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.41k
    do {
2691
2.41k
        auto op = getOp(&parentDs, data, size);
2692
2.41k
        auto module = getModule(parentDs);
2693
2.41k
        if ( module == nullptr ) {
2694
1.99k
            continue;
2695
1.99k
        }
2696
2697
425
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
425
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.41k
    } while ( parentDs.Get<bool>() == true );
2704
2705
215
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
211
#if 1
2711
211
    {
2712
211
        std::set<uint64_t> moduleIDs;
2713
280
        for (const auto& m : modules ) {
2714
280
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
280
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
280
            moduleIDs.insert(moduleID);
2722
280
        }
2723
2724
211
        std::set<uint64_t> operationModuleIDs;
2725
328
        for (const auto& op : operations) {
2726
328
            operationModuleIDs.insert(op.first->ID);
2727
328
        }
2728
2729
211
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
211
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
211
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
211
        for (const auto& id : addModuleIDs) {
2734
129
            operations.push_back({ modules.at(id), operations[0].second});
2735
129
        }
2736
211
    }
2737
211
#endif
2738
2739
211
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
211
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
668
    for (size_t i = 0; i < operations.size(); i++) {
2747
457
        auto& operation = operations[i];
2748
2749
457
        auto& module = operation.first;
2750
457
        auto& op = operation.second;
2751
2752
457
        if ( i > 0 ) {
2753
317
            auto& prevModule = operations[i-1].first;
2754
317
            auto& prevOp = operations[i].second;
2755
2756
317
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
171
                auto& curModifier = op.modifier.GetVectorPtr();
2758
171
                if ( curModifier.size() == 0 ) {
2759
33.8k
                    for (size_t j = 0; j < 512; j++) {
2760
33.7k
                        curModifier.push_back(1);
2761
33.7k
                    }
2762
105
                } else {
2763
15.2k
                    for (auto& c : curModifier) {
2764
15.2k
                        c++;
2765
15.2k
                    }
2766
105
                }
2767
171
            }
2768
317
        }
2769
2770
457
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
457
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
457
        const auto& result = results.back();
2777
2778
457
        if ( result.second != std::nullopt ) {
2779
73
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
73
        }
2786
2787
457
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
457
        if ( options.disableTests == false ) {
2796
457
            tests::test(op, result.second);
2797
457
        }
2798
2799
457
        postprocess(module, op, result);
2800
457
    }
2801
2802
211
    if ( options.noCompare == false ) {
2803
140
        compare(operations, results, data, size);
2804
140
    }
2805
211
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
117
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
117
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
117
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.28k
    do {
2691
2.28k
        auto op = getOp(&parentDs, data, size);
2692
2.28k
        auto module = getModule(parentDs);
2693
2.28k
        if ( module == nullptr ) {
2694
2.08k
            continue;
2695
2.08k
        }
2696
2697
195
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
195
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.27k
    } while ( parentDs.Get<bool>() == true );
2704
2705
117
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
112
#if 1
2711
112
    {
2712
112
        std::set<uint64_t> moduleIDs;
2713
112
        for (const auto& m : modules ) {
2714
82
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
82
            moduleIDs.insert(moduleID);
2722
82
        }
2723
2724
112
        std::set<uint64_t> operationModuleIDs;
2725
119
        for (const auto& op : operations) {
2726
119
            operationModuleIDs.insert(op.first->ID);
2727
119
        }
2728
2729
112
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
112
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
112
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
112
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
112
    }
2737
112
#endif
2738
2739
112
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
112
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
260
    for (size_t i = 0; i < operations.size(); i++) {
2747
148
        auto& operation = operations[i];
2748
2749
148
        auto& module = operation.first;
2750
148
        auto& op = operation.second;
2751
2752
148
        if ( i > 0 ) {
2753
107
            auto& prevModule = operations[i-1].first;
2754
107
            auto& prevOp = operations[i].second;
2755
2756
107
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
58
                auto& curModifier = op.modifier.GetVectorPtr();
2758
58
                if ( curModifier.size() == 0 ) {
2759
12.8k
                    for (size_t j = 0; j < 512; j++) {
2760
12.8k
                        curModifier.push_back(1);
2761
12.8k
                    }
2762
33
                } else {
2763
385
                    for (auto& c : curModifier) {
2764
385
                        c++;
2765
385
                    }
2766
33
                }
2767
58
            }
2768
107
        }
2769
2770
148
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
148
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
148
        const auto& result = results.back();
2777
2778
148
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
148
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
148
        if ( options.disableTests == false ) {
2796
148
            tests::test(op, result.second);
2797
148
        }
2798
2799
148
        postprocess(module, op, result);
2800
148
    }
2801
2802
112
    if ( options.noCompare == false ) {
2803
41
        compare(operations, results, data, size);
2804
41
    }
2805
112
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
118
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
118
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
118
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.48k
    do {
2691
2.48k
        auto op = getOp(&parentDs, data, size);
2692
2.48k
        auto module = getModule(parentDs);
2693
2.48k
        if ( module == nullptr ) {
2694
2.27k
            continue;
2695
2.27k
        }
2696
2697
206
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
206
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.47k
    } while ( parentDs.Get<bool>() == true );
2704
2705
118
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
114
#if 1
2711
114
    {
2712
114
        std::set<uint64_t> moduleIDs;
2713
114
        for (const auto& m : modules ) {
2714
92
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
92
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
92
            moduleIDs.insert(moduleID);
2722
92
        }
2723
2724
114
        std::set<uint64_t> operationModuleIDs;
2725
137
        for (const auto& op : operations) {
2726
137
            operationModuleIDs.insert(op.first->ID);
2727
137
        }
2728
2729
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
114
        for (const auto& id : addModuleIDs) {
2734
35
            operations.push_back({ modules.at(id), operations[0].second});
2735
35
        }
2736
114
    }
2737
114
#endif
2738
2739
114
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
114
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
286
    for (size_t i = 0; i < operations.size(); i++) {
2747
172
        auto& operation = operations[i];
2748
2749
172
        auto& module = operation.first;
2750
172
        auto& op = operation.second;
2751
2752
172
        if ( i > 0 ) {
2753
126
            auto& prevModule = operations[i-1].first;
2754
126
            auto& prevOp = operations[i].second;
2755
2756
126
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
72
                auto& curModifier = op.modifier.GetVectorPtr();
2758
72
                if ( curModifier.size() == 0 ) {
2759
20.0k
                    for (size_t j = 0; j < 512; j++) {
2760
19.9k
                        curModifier.push_back(1);
2761
19.9k
                    }
2762
39
                } else {
2763
261
                    for (auto& c : curModifier) {
2764
261
                        c++;
2765
261
                    }
2766
33
                }
2767
72
            }
2768
126
        }
2769
2770
172
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
172
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
172
        const auto& result = results.back();
2777
2778
172
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
172
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
172
        if ( options.disableTests == false ) {
2796
172
            tests::test(op, result.second);
2797
172
        }
2798
2799
172
        postprocess(module, op, result);
2800
172
    }
2801
2802
114
    if ( options.noCompare == false ) {
2803
46
        compare(operations, results, data, size);
2804
46
    }
2805
114
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
123
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
123
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
123
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.92k
    do {
2691
2.92k
        auto op = getOp(&parentDs, data, size);
2692
2.92k
        auto module = getModule(parentDs);
2693
2.92k
        if ( module == nullptr ) {
2694
2.71k
            continue;
2695
2.71k
        }
2696
2697
207
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
207
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.91k
    } while ( parentDs.Get<bool>() == true );
2704
2705
123
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
120
#if 1
2711
120
    {
2712
120
        std::set<uint64_t> moduleIDs;
2713
120
        for (const auto& m : modules ) {
2714
82
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
82
            moduleIDs.insert(moduleID);
2722
82
        }
2723
2724
120
        std::set<uint64_t> operationModuleIDs;
2725
121
        for (const auto& op : operations) {
2726
121
            operationModuleIDs.insert(op.first->ID);
2727
121
        }
2728
2729
120
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
120
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
120
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
120
        for (const auto& id : addModuleIDs) {
2734
30
            operations.push_back({ modules.at(id), operations[0].second});
2735
30
        }
2736
120
    }
2737
120
#endif
2738
2739
120
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
120
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
271
    for (size_t i = 0; i < operations.size(); i++) {
2747
151
        auto& operation = operations[i];
2748
2749
151
        auto& module = operation.first;
2750
151
        auto& op = operation.second;
2751
2752
151
        if ( i > 0 ) {
2753
110
            auto& prevModule = operations[i-1].first;
2754
110
            auto& prevOp = operations[i].second;
2755
2756
110
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
63
                auto& curModifier = op.modifier.GetVectorPtr();
2758
63
                if ( curModifier.size() == 0 ) {
2759
21.0k
                    for (size_t j = 0; j < 512; j++) {
2760
20.9k
                        curModifier.push_back(1);
2761
20.9k
                    }
2762
41
                } else {
2763
269
                    for (auto& c : curModifier) {
2764
269
                        c++;
2765
269
                    }
2766
22
                }
2767
63
            }
2768
110
        }
2769
2770
151
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
151
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
151
        const auto& result = results.back();
2777
2778
151
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
151
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
151
        if ( options.disableTests == false ) {
2796
151
            tests::test(op, result.second);
2797
151
        }
2798
2799
151
        postprocess(module, op, result);
2800
151
    }
2801
2802
120
    if ( options.noCompare == false ) {
2803
41
        compare(operations, results, data, size);
2804
41
    }
2805
120
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
358
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
358
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
358
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.42k
    do {
2691
2.42k
        auto op = getOp(&parentDs, data, size);
2692
2.42k
        auto module = getModule(parentDs);
2693
2.42k
        if ( module == nullptr ) {
2694
1.75k
            continue;
2695
1.75k
        }
2696
2697
671
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
671
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
2.41k
    } while ( parentDs.Get<bool>() == true );
2704
2705
358
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
355
#if 1
2711
355
    {
2712
355
        std::set<uint64_t> moduleIDs;
2713
588
        for (const auto& m : modules ) {
2714
588
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
588
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
588
            moduleIDs.insert(moduleID);
2722
588
        }
2723
2724
355
        std::set<uint64_t> operationModuleIDs;
2725
613
        for (const auto& op : operations) {
2726
613
            operationModuleIDs.insert(op.first->ID);
2727
613
        }
2728
2729
355
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
355
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
355
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
355
        for (const auto& id : addModuleIDs) {
2734
282
            operations.push_back({ modules.at(id), operations[0].second});
2735
282
        }
2736
355
    }
2737
355
#endif
2738
2739
355
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
355
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.25k
    for (size_t i = 0; i < operations.size(); i++) {
2747
895
        auto& operation = operations[i];
2748
2749
895
        auto& module = operation.first;
2750
895
        auto& op = operation.second;
2751
2752
895
        if ( i > 0 ) {
2753
601
            auto& prevModule = operations[i-1].first;
2754
601
            auto& prevOp = operations[i].second;
2755
2756
601
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
300
                auto& curModifier = op.modifier.GetVectorPtr();
2758
300
                if ( curModifier.size() == 0 ) {
2759
116k
                    for (size_t j = 0; j < 512; j++) {
2760
116k
                        curModifier.push_back(1);
2761
116k
                    }
2762
227
                } else {
2763
331
                    for (auto& c : curModifier) {
2764
331
                        c++;
2765
331
                    }
2766
73
                }
2767
300
            }
2768
601
        }
2769
2770
895
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
895
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
895
        const auto& result = results.back();
2777
2778
895
        if ( result.second != std::nullopt ) {
2779
465
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
465
        }
2786
2787
895
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
895
        if ( options.disableTests == false ) {
2796
895
            tests::test(op, result.second);
2797
895
        }
2798
2799
895
        postprocess(module, op, result);
2800
895
    }
2801
2802
355
    if ( options.noCompare == false ) {
2803
294
        compare(operations, results, data, size);
2804
294
    }
2805
355
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
255
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
255
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
255
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.65k
    do {
2691
2.65k
        auto op = getOp(&parentDs, data, size);
2692
2.65k
        auto module = getModule(parentDs);
2693
2.65k
        if ( module == nullptr ) {
2694
2.21k
            continue;
2695
2.21k
        }
2696
2697
440
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
440
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
11
            break;
2702
11
        }
2703
2.63k
    } while ( parentDs.Get<bool>() == true );
2704
2705
255
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
249
#if 1
2711
249
    {
2712
249
        std::set<uint64_t> moduleIDs;
2713
364
        for (const auto& m : modules ) {
2714
364
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
364
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
364
            moduleIDs.insert(moduleID);
2722
364
        }
2723
2724
249
        std::set<uint64_t> operationModuleIDs;
2725
360
        for (const auto& op : operations) {
2726
360
            operationModuleIDs.insert(op.first->ID);
2727
360
        }
2728
2729
249
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
249
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
249
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
249
        for (const auto& id : addModuleIDs) {
2734
171
            operations.push_back({ modules.at(id), operations[0].second});
2735
171
        }
2736
249
    }
2737
249
#endif
2738
2739
249
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
249
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
780
    for (size_t i = 0; i < operations.size(); i++) {
2747
531
        auto& operation = operations[i];
2748
2749
531
        auto& module = operation.first;
2750
531
        auto& op = operation.second;
2751
2752
531
        if ( i > 0 ) {
2753
349
            auto& prevModule = operations[i-1].first;
2754
349
            auto& prevOp = operations[i].second;
2755
2756
349
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
158
                auto& curModifier = op.modifier.GetVectorPtr();
2758
158
                if ( curModifier.size() == 0 ) {
2759
57.4k
                    for (size_t j = 0; j < 512; j++) {
2760
57.3k
                        curModifier.push_back(1);
2761
57.3k
                    }
2762
112
                } else {
2763
283
                    for (auto& c : curModifier) {
2764
283
                        c++;
2765
283
                    }
2766
46
                }
2767
158
            }
2768
349
        }
2769
2770
531
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
531
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
531
        const auto& result = results.back();
2777
2778
531
        if ( result.second != std::nullopt ) {
2779
155
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
155
        }
2786
2787
531
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
531
        if ( options.disableTests == false ) {
2796
531
            tests::test(op, result.second);
2797
531
        }
2798
2799
531
        postprocess(module, op, result);
2800
531
    }
2801
2802
249
    if ( options.noCompare == false ) {
2803
182
        compare(operations, results, data, size);
2804
182
    }
2805
249
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
111
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
111
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
111
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.29k
    do {
2691
2.29k
        auto op = getOp(&parentDs, data, size);
2692
2.29k
        auto module = getModule(parentDs);
2693
2.29k
        if ( module == nullptr ) {
2694
2.10k
            continue;
2695
2.10k
        }
2696
2697
188
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
188
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.28k
    } while ( parentDs.Get<bool>() == true );
2704
2705
111
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
105
#if 1
2711
105
    {
2712
105
        std::set<uint64_t> moduleIDs;
2713
105
        for (const auto& m : modules ) {
2714
70
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
70
            moduleIDs.insert(moduleID);
2722
70
        }
2723
2724
105
        std::set<uint64_t> operationModuleIDs;
2725
105
        for (const auto& op : operations) {
2726
104
            operationModuleIDs.insert(op.first->ID);
2727
104
        }
2728
2729
105
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
105
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
105
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
105
        for (const auto& id : addModuleIDs) {
2734
24
            operations.push_back({ modules.at(id), operations[0].second});
2735
24
        }
2736
105
    }
2737
105
#endif
2738
2739
105
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
105
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
233
    for (size_t i = 0; i < operations.size(); i++) {
2747
128
        auto& operation = operations[i];
2748
2749
128
        auto& module = operation.first;
2750
128
        auto& op = operation.second;
2751
2752
128
        if ( i > 0 ) {
2753
93
            auto& prevModule = operations[i-1].first;
2754
93
            auto& prevOp = operations[i].second;
2755
2756
93
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
52
                auto& curModifier = op.modifier.GetVectorPtr();
2758
52
                if ( curModifier.size() == 0 ) {
2759
12.8k
                    for (size_t j = 0; j < 512; j++) {
2760
12.8k
                        curModifier.push_back(1);
2761
12.8k
                    }
2762
27
                } else {
2763
348
                    for (auto& c : curModifier) {
2764
348
                        c++;
2765
348
                    }
2766
27
                }
2767
52
            }
2768
93
        }
2769
2770
128
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
128
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
128
        const auto& result = results.back();
2777
2778
128
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
128
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
128
        if ( options.disableTests == false ) {
2796
128
            tests::test(op, result.second);
2797
128
        }
2798
2799
128
        postprocess(module, op, result);
2800
128
    }
2801
2802
105
    if ( options.noCompare == false ) {
2803
35
        compare(operations, results, data, size);
2804
35
    }
2805
105
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
105
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
105
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
105
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.52k
    do {
2691
2.52k
        auto op = getOp(&parentDs, data, size);
2692
2.52k
        auto module = getModule(parentDs);
2693
2.52k
        if ( module == nullptr ) {
2694
2.34k
            continue;
2695
2.34k
        }
2696
2697
182
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
182
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.51k
    } while ( parentDs.Get<bool>() == true );
2704
2705
105
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
101
#if 1
2711
101
    {
2712
101
        std::set<uint64_t> moduleIDs;
2713
101
        for (const auto& m : modules ) {
2714
74
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
74
            moduleIDs.insert(moduleID);
2722
74
        }
2723
2724
101
        std::set<uint64_t> operationModuleIDs;
2725
108
        for (const auto& op : operations) {
2726
108
            operationModuleIDs.insert(op.first->ID);
2727
108
        }
2728
2729
101
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
101
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
101
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
101
        for (const auto& id : addModuleIDs) {
2734
26
            operations.push_back({ modules.at(id), operations[0].second});
2735
26
        }
2736
101
    }
2737
101
#endif
2738
2739
101
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
101
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
235
    for (size_t i = 0; i < operations.size(); i++) {
2747
134
        auto& operation = operations[i];
2748
2749
134
        auto& module = operation.first;
2750
134
        auto& op = operation.second;
2751
2752
134
        if ( i > 0 ) {
2753
97
            auto& prevModule = operations[i-1].first;
2754
97
            auto& prevOp = operations[i].second;
2755
2756
97
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
54
                auto& curModifier = op.modifier.GetVectorPtr();
2758
54
                if ( curModifier.size() == 0 ) {
2759
15.9k
                    for (size_t j = 0; j < 512; j++) {
2760
15.8k
                        curModifier.push_back(1);
2761
15.8k
                    }
2762
31
                } else {
2763
245
                    for (auto& c : curModifier) {
2764
245
                        c++;
2765
245
                    }
2766
23
                }
2767
54
            }
2768
97
        }
2769
2770
134
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
134
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
134
        const auto& result = results.back();
2777
2778
134
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
134
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
134
        if ( options.disableTests == false ) {
2796
134
            tests::test(op, result.second);
2797
134
        }
2798
2799
134
        postprocess(module, op, result);
2800
134
    }
2801
2802
101
    if ( options.noCompare == false ) {
2803
37
        compare(operations, results, data, size);
2804
37
    }
2805
101
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
642
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
642
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
642
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.11k
    do {
2691
3.11k
        auto op = getOp(&parentDs, data, size);
2692
3.11k
        auto module = getModule(parentDs);
2693
3.11k
        if ( module == nullptr ) {
2694
2.14k
            continue;
2695
2.14k
        }
2696
2697
971
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
971
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
17
            break;
2702
17
        }
2703
3.10k
    } while ( parentDs.Get<bool>() == true );
2704
2705
642
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
637
#if 1
2711
637
    {
2712
637
        std::set<uint64_t> moduleIDs;
2713
1.13k
        for (const auto& m : modules ) {
2714
1.13k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
1.13k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
1.13k
            moduleIDs.insert(moduleID);
2722
1.13k
        }
2723
2724
637
        std::set<uint64_t> operationModuleIDs;
2725
897
        for (const auto& op : operations) {
2726
897
            operationModuleIDs.insert(op.first->ID);
2727
897
        }
2728
2729
637
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
637
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
637
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
637
        for (const auto& id : addModuleIDs) {
2734
558
            operations.push_back({ modules.at(id), operations[0].second});
2735
558
        }
2736
637
    }
2737
637
#endif
2738
2739
637
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
637
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
2.09k
    for (size_t i = 0; i < operations.size(); i++) {
2747
1.45k
        auto& operation = operations[i];
2748
2749
1.45k
        auto& module = operation.first;
2750
1.45k
        auto& op = operation.second;
2751
2752
1.45k
        if ( i > 0 ) {
2753
886
            auto& prevModule = operations[i-1].first;
2754
886
            auto& prevOp = operations[i].second;
2755
2756
886
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
311
                auto& curModifier = op.modifier.GetVectorPtr();
2758
311
                if ( curModifier.size() == 0 ) {
2759
137k
                    for (size_t j = 0; j < 512; j++) {
2760
137k
                        curModifier.push_back(1);
2761
137k
                    }
2762
269
                } else {
2763
311
                    for (auto& c : curModifier) {
2764
311
                        c++;
2765
311
                    }
2766
42
                }
2767
311
            }
2768
886
        }
2769
2770
1.45k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
1.45k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
1.45k
        const auto& result = results.back();
2777
2778
1.45k
        if ( result.second != std::nullopt ) {
2779
605
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
605
        }
2786
2787
1.45k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
1.45k
        if ( options.disableTests == false ) {
2796
1.45k
            tests::test(op, result.second);
2797
1.45k
        }
2798
2799
1.45k
        postprocess(module, op, result);
2800
1.45k
    }
2801
2802
637
    if ( options.noCompare == false ) {
2803
569
        compare(operations, results, data, size);
2804
569
    }
2805
637
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
340
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
340
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
340
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.84k
    do {
2691
2.84k
        auto op = getOp(&parentDs, data, size);
2692
2.84k
        auto module = getModule(parentDs);
2693
2.84k
        if ( module == nullptr ) {
2694
2.26k
            continue;
2695
2.26k
        }
2696
2697
588
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
588
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.84k
    } while ( parentDs.Get<bool>() == true );
2704
2705
340
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
335
#if 1
2711
335
    {
2712
335
        std::set<uint64_t> moduleIDs;
2713
524
        for (const auto& m : modules ) {
2714
524
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
524
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
524
            moduleIDs.insert(moduleID);
2722
524
        }
2723
2724
335
        std::set<uint64_t> operationModuleIDs;
2725
500
        for (const auto& op : operations) {
2726
500
            operationModuleIDs.insert(op.first->ID);
2727
500
        }
2728
2729
335
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
335
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
335
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
335
        for (const auto& id : addModuleIDs) {
2734
250
            operations.push_back({ modules.at(id), operations[0].second});
2735
250
        }
2736
335
    }
2737
335
#endif
2738
2739
335
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
335
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.08k
    for (size_t i = 0; i < operations.size(); i++) {
2747
750
        auto& operation = operations[i];
2748
2749
750
        auto& module = operation.first;
2750
750
        auto& op = operation.second;
2751
2752
750
        if ( i > 0 ) {
2753
488
            auto& prevModule = operations[i-1].first;
2754
488
            auto& prevOp = operations[i].second;
2755
2756
488
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
218
                auto& curModifier = op.modifier.GetVectorPtr();
2758
218
                if ( curModifier.size() == 0 ) {
2759
86.6k
                    for (size_t j = 0; j < 512; j++) {
2760
86.5k
                        curModifier.push_back(1);
2761
86.5k
                    }
2762
169
                } else {
2763
446
                    for (auto& c : curModifier) {
2764
446
                        c++;
2765
446
                    }
2766
49
                }
2767
218
            }
2768
488
        }
2769
2770
750
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
750
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
750
        const auto& result = results.back();
2777
2778
750
        if ( result.second != std::nullopt ) {
2779
290
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
290
        }
2786
2787
750
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
750
        if ( options.disableTests == false ) {
2796
750
            tests::test(op, result.second);
2797
750
        }
2798
2799
750
        postprocess(module, op, result);
2800
750
    }
2801
2802
335
    if ( options.noCompare == false ) {
2803
262
        compare(operations, results, data, size);
2804
262
    }
2805
335
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
190
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
190
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
190
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.76k
    do {
2691
2.76k
        auto op = getOp(&parentDs, data, size);
2692
2.76k
        auto module = getModule(parentDs);
2693
2.76k
        if ( module == nullptr ) {
2694
2.49k
            continue;
2695
2.49k
        }
2696
2697
270
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
270
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.75k
    } while ( parentDs.Get<bool>() == true );
2704
2705
190
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
182
#if 1
2711
182
    {
2712
182
        std::set<uint64_t> moduleIDs;
2713
182
        for (const auto& m : modules ) {
2714
148
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
148
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
148
            moduleIDs.insert(moduleID);
2722
148
        }
2723
2724
182
        std::set<uint64_t> operationModuleIDs;
2725
182
        for (const auto& op : operations) {
2726
167
            operationModuleIDs.insert(op.first->ID);
2727
167
        }
2728
2729
182
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
182
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
182
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
182
        for (const auto& id : addModuleIDs) {
2734
63
            operations.push_back({ modules.at(id), operations[0].second});
2735
63
        }
2736
182
    }
2737
182
#endif
2738
2739
182
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
182
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
412
    for (size_t i = 0; i < operations.size(); i++) {
2747
230
        auto& operation = operations[i];
2748
2749
230
        auto& module = operation.first;
2750
230
        auto& op = operation.second;
2751
2752
230
        if ( i > 0 ) {
2753
156
            auto& prevModule = operations[i-1].first;
2754
156
            auto& prevOp = operations[i].second;
2755
2756
156
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
76
                auto& curModifier = op.modifier.GetVectorPtr();
2758
76
                if ( curModifier.size() == 0 ) {
2759
25.6k
                    for (size_t j = 0; j < 512; j++) {
2760
25.6k
                        curModifier.push_back(1);
2761
25.6k
                    }
2762
50
                } else {
2763
253
                    for (auto& c : curModifier) {
2764
253
                        c++;
2765
253
                    }
2766
26
                }
2767
76
            }
2768
156
        }
2769
2770
230
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
230
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
230
        const auto& result = results.back();
2777
2778
230
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
230
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
230
        if ( options.disableTests == false ) {
2796
230
            tests::test(op, result.second);
2797
230
        }
2798
2799
230
        postprocess(module, op, result);
2800
230
    }
2801
2802
182
    if ( options.noCompare == false ) {
2803
74
        compare(operations, results, data, size);
2804
74
    }
2805
182
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
191
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
191
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
191
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.63k
    do {
2691
1.63k
        auto op = getOp(&parentDs, data, size);
2692
1.63k
        auto module = getModule(parentDs);
2693
1.63k
        if ( module == nullptr ) {
2694
1.47k
            continue;
2695
1.47k
        }
2696
2697
167
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
167
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
1.63k
    } while ( parentDs.Get<bool>() == true );
2704
2705
191
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
187
#if 1
2711
187
    {
2712
187
        std::set<uint64_t> moduleIDs;
2713
187
        for (const auto& m : modules ) {
2714
68
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
68
            moduleIDs.insert(moduleID);
2722
68
        }
2723
2724
187
        std::set<uint64_t> operationModuleIDs;
2725
187
        for (const auto& op : operations) {
2726
101
            operationModuleIDs.insert(op.first->ID);
2727
101
        }
2728
2729
187
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
187
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
187
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
187
        for (const auto& id : addModuleIDs) {
2734
23
            operations.push_back({ modules.at(id), operations[0].second});
2735
23
        }
2736
187
    }
2737
187
#endif
2738
2739
187
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
187
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
311
    for (size_t i = 0; i < operations.size(); i++) {
2747
124
        auto& operation = operations[i];
2748
2749
124
        auto& module = operation.first;
2750
124
        auto& op = operation.second;
2751
2752
124
        if ( i > 0 ) {
2753
90
            auto& prevModule = operations[i-1].first;
2754
90
            auto& prevOp = operations[i].second;
2755
2756
90
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
50
                auto& curModifier = op.modifier.GetVectorPtr();
2758
50
                if ( curModifier.size() == 0 ) {
2759
16.4k
                    for (size_t j = 0; j < 512; j++) {
2760
16.3k
                        curModifier.push_back(1);
2761
16.3k
                    }
2762
32
                } else {
2763
237
                    for (auto& c : curModifier) {
2764
237
                        c++;
2765
237
                    }
2766
18
                }
2767
50
            }
2768
90
        }
2769
2770
124
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
124
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
124
        const auto& result = results.back();
2777
2778
124
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
124
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
124
        if ( options.disableTests == false ) {
2796
124
            tests::test(op, result.second);
2797
124
        }
2798
2799
124
        postprocess(module, op, result);
2800
124
    }
2801
2802
187
    if ( options.noCompare == false ) {
2803
34
        compare(operations, results, data, size);
2804
34
    }
2805
187
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
199
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
199
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
199
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.86k
    do {
2691
2.86k
        auto op = getOp(&parentDs, data, size);
2692
2.86k
        auto module = getModule(parentDs);
2693
2.86k
        if ( module == nullptr ) {
2694
2.66k
            continue;
2695
2.66k
        }
2696
2697
204
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
204
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.86k
    } while ( parentDs.Get<bool>() == true );
2704
2705
199
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
193
#if 1
2711
193
    {
2712
193
        std::set<uint64_t> moduleIDs;
2713
193
        for (const auto& m : modules ) {
2714
74
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
74
            moduleIDs.insert(moduleID);
2722
74
        }
2723
2724
193
        std::set<uint64_t> operationModuleIDs;
2725
193
        for (const auto& op : operations) {
2726
104
            operationModuleIDs.insert(op.first->ID);
2727
104
        }
2728
2729
193
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
193
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
193
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
193
        for (const auto& id : addModuleIDs) {
2734
25
            operations.push_back({ modules.at(id), operations[0].second});
2735
25
        }
2736
193
    }
2737
193
#endif
2738
2739
193
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
193
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
322
    for (size_t i = 0; i < operations.size(); i++) {
2747
129
        auto& operation = operations[i];
2748
2749
129
        auto& module = operation.first;
2750
129
        auto& op = operation.second;
2751
2752
129
        if ( i > 0 ) {
2753
92
            auto& prevModule = operations[i-1].first;
2754
92
            auto& prevOp = operations[i].second;
2755
2756
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
49
                auto& curModifier = op.modifier.GetVectorPtr();
2758
49
                if ( curModifier.size() == 0 ) {
2759
13.8k
                    for (size_t j = 0; j < 512; j++) {
2760
13.8k
                        curModifier.push_back(1);
2761
13.8k
                    }
2762
27
                } else {
2763
312
                    for (auto& c : curModifier) {
2764
312
                        c++;
2765
312
                    }
2766
22
                }
2767
49
            }
2768
92
        }
2769
2770
129
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
129
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
129
        const auto& result = results.back();
2777
2778
129
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
129
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
129
        if ( options.disableTests == false ) {
2796
129
            tests::test(op, result.second);
2797
129
        }
2798
2799
129
        postprocess(module, op, result);
2800
129
    }
2801
2802
193
    if ( options.noCompare == false ) {
2803
37
        compare(operations, results, data, size);
2804
37
    }
2805
193
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
251
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
251
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
251
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.54k
    do {
2691
2.54k
        auto op = getOp(&parentDs, data, size);
2692
2.54k
        auto module = getModule(parentDs);
2693
2.54k
        if ( module == nullptr ) {
2694
2.25k
            continue;
2695
2.25k
        }
2696
2697
287
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
287
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.53k
    } while ( parentDs.Get<bool>() == true );
2704
2705
251
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
247
#if 1
2711
247
    {
2712
247
        std::set<uint64_t> moduleIDs;
2713
247
        for (const auto& m : modules ) {
2714
132
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
132
            moduleIDs.insert(moduleID);
2722
132
        }
2723
2724
247
        std::set<uint64_t> operationModuleIDs;
2725
247
        for (const auto& op : operations) {
2726
170
            operationModuleIDs.insert(op.first->ID);
2727
170
        }
2728
2729
247
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
247
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
247
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
247
        for (const auto& id : addModuleIDs) {
2734
54
            operations.push_back({ modules.at(id), operations[0].second});
2735
54
        }
2736
247
    }
2737
247
#endif
2738
2739
247
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
247
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
471
    for (size_t i = 0; i < operations.size(); i++) {
2747
224
        auto& operation = operations[i];
2748
2749
224
        auto& module = operation.first;
2750
224
        auto& op = operation.second;
2751
2752
224
        if ( i > 0 ) {
2753
158
            auto& prevModule = operations[i-1].first;
2754
158
            auto& prevOp = operations[i].second;
2755
2756
158
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
86
                auto& curModifier = op.modifier.GetVectorPtr();
2758
86
                if ( curModifier.size() == 0 ) {
2759
27.7k
                    for (size_t j = 0; j < 512; j++) {
2760
27.6k
                        curModifier.push_back(1);
2761
27.6k
                    }
2762
54
                } else {
2763
240
                    for (auto& c : curModifier) {
2764
240
                        c++;
2765
240
                    }
2766
32
                }
2767
86
            }
2768
158
        }
2769
2770
224
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
224
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
224
        const auto& result = results.back();
2777
2778
224
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
224
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
224
        if ( options.disableTests == false ) {
2796
224
            tests::test(op, result.second);
2797
224
        }
2798
2799
224
        postprocess(module, op, result);
2800
224
    }
2801
2802
247
    if ( options.noCompare == false ) {
2803
66
        compare(operations, results, data, size);
2804
66
    }
2805
247
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
213
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
213
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
213
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.32k
    do {
2691
2.32k
        auto op = getOp(&parentDs, data, size);
2692
2.32k
        auto module = getModule(parentDs);
2693
2.32k
        if ( module == nullptr ) {
2694
2.11k
            continue;
2695
2.11k
        }
2696
2697
209
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
209
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.32k
    } while ( parentDs.Get<bool>() == true );
2704
2705
213
    if ( operations.empty() == true ) {
2706
18
        return;
2707
18
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
195
#if 1
2711
195
    {
2712
195
        std::set<uint64_t> moduleIDs;
2713
195
        for (const auto& m : modules ) {
2714
78
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
78
            moduleIDs.insert(moduleID);
2722
78
        }
2723
2724
195
        std::set<uint64_t> operationModuleIDs;
2725
195
        for (const auto& op : operations) {
2726
107
            operationModuleIDs.insert(op.first->ID);
2727
107
        }
2728
2729
195
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
195
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
195
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
195
        for (const auto& id : addModuleIDs) {
2734
27
            operations.push_back({ modules.at(id), operations[0].second});
2735
27
        }
2736
195
    }
2737
195
#endif
2738
2739
195
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
195
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
329
    for (size_t i = 0; i < operations.size(); i++) {
2747
134
        auto& operation = operations[i];
2748
2749
134
        auto& module = operation.first;
2750
134
        auto& op = operation.second;
2751
2752
134
        if ( i > 0 ) {
2753
95
            auto& prevModule = operations[i-1].first;
2754
95
            auto& prevOp = operations[i].second;
2755
2756
95
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
50
                auto& curModifier = op.modifier.GetVectorPtr();
2758
50
                if ( curModifier.size() == 0 ) {
2759
12.8k
                    for (size_t j = 0; j < 512; j++) {
2760
12.8k
                        curModifier.push_back(1);
2761
12.8k
                    }
2762
25
                } else {
2763
240
                    for (auto& c : curModifier) {
2764
240
                        c++;
2765
240
                    }
2766
25
                }
2767
50
            }
2768
95
        }
2769
2770
134
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
134
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
134
        const auto& result = results.back();
2777
2778
134
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
134
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
134
        if ( options.disableTests == false ) {
2796
134
            tests::test(op, result.second);
2797
134
        }
2798
2799
134
        postprocess(module, op, result);
2800
134
    }
2801
2802
195
    if ( options.noCompare == false ) {
2803
39
        compare(operations, results, data, size);
2804
39
    }
2805
195
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
132
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
132
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
132
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.73k
    do {
2691
2.73k
        auto op = getOp(&parentDs, data, size);
2692
2.73k
        auto module = getModule(parentDs);
2693
2.73k
        if ( module == nullptr ) {
2694
2.49k
            continue;
2695
2.49k
        }
2696
2697
242
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
242
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.72k
    } while ( parentDs.Get<bool>() == true );
2704
2705
132
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
127
#if 1
2711
127
    {
2712
127
        std::set<uint64_t> moduleIDs;
2713
127
        for (const auto& m : modules ) {
2714
96
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
96
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
96
            moduleIDs.insert(moduleID);
2722
96
        }
2723
2724
127
        std::set<uint64_t> operationModuleIDs;
2725
131
        for (const auto& op : operations) {
2726
131
            operationModuleIDs.insert(op.first->ID);
2727
131
        }
2728
2729
127
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
127
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
127
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
127
        for (const auto& id : addModuleIDs) {
2734
37
            operations.push_back({ modules.at(id), operations[0].second});
2735
37
        }
2736
127
    }
2737
127
#endif
2738
2739
127
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
127
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
295
    for (size_t i = 0; i < operations.size(); i++) {
2747
168
        auto& operation = operations[i];
2748
2749
168
        auto& module = operation.first;
2750
168
        auto& op = operation.second;
2751
2752
168
        if ( i > 0 ) {
2753
120
            auto& prevModule = operations[i-1].first;
2754
120
            auto& prevOp = operations[i].second;
2755
2756
120
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
66
                auto& curModifier = op.modifier.GetVectorPtr();
2758
66
                if ( curModifier.size() == 0 ) {
2759
18.4k
                    for (size_t j = 0; j < 512; j++) {
2760
18.4k
                        curModifier.push_back(1);
2761
18.4k
                    }
2762
36
                } else {
2763
287
                    for (auto& c : curModifier) {
2764
287
                        c++;
2765
287
                    }
2766
30
                }
2767
66
            }
2768
120
        }
2769
2770
168
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
168
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
168
        const auto& result = results.back();
2777
2778
168
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
168
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
168
        if ( options.disableTests == false ) {
2796
168
            tests::test(op, result.second);
2797
168
        }
2798
2799
168
        postprocess(module, op, result);
2800
168
    }
2801
2802
127
    if ( options.noCompare == false ) {
2803
48
        compare(operations, results, data, size);
2804
48
    }
2805
127
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
133
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
133
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
133
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.11k
    do {
2691
3.11k
        auto op = getOp(&parentDs, data, size);
2692
3.11k
        auto module = getModule(parentDs);
2693
3.11k
        if ( module == nullptr ) {
2694
2.88k
            continue;
2695
2.88k
        }
2696
2697
225
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
225
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
3.10k
    } while ( parentDs.Get<bool>() == true );
2704
2705
133
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
128
#if 1
2711
128
    {
2712
128
        std::set<uint64_t> moduleIDs;
2713
128
        for (const auto& m : modules ) {
2714
78
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
78
            moduleIDs.insert(moduleID);
2722
78
        }
2723
2724
128
        std::set<uint64_t> operationModuleIDs;
2725
128
        for (const auto& op : operations) {
2726
115
            operationModuleIDs.insert(op.first->ID);
2727
115
        }
2728
2729
128
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
128
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
128
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
128
        for (const auto& id : addModuleIDs) {
2734
28
            operations.push_back({ modules.at(id), operations[0].second});
2735
28
        }
2736
128
    }
2737
128
#endif
2738
2739
128
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
128
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
271
    for (size_t i = 0; i < operations.size(); i++) {
2747
143
        auto& operation = operations[i];
2748
2749
143
        auto& module = operation.first;
2750
143
        auto& op = operation.second;
2751
2752
143
        if ( i > 0 ) {
2753
104
            auto& prevModule = operations[i-1].first;
2754
104
            auto& prevOp = operations[i].second;
2755
2756
104
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
59
                auto& curModifier = op.modifier.GetVectorPtr();
2758
59
                if ( curModifier.size() == 0 ) {
2759
17.4k
                    for (size_t j = 0; j < 512; j++) {
2760
17.4k
                        curModifier.push_back(1);
2761
17.4k
                    }
2762
34
                } else {
2763
370
                    for (auto& c : curModifier) {
2764
370
                        c++;
2765
370
                    }
2766
25
                }
2767
59
            }
2768
104
        }
2769
2770
143
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
143
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
143
        const auto& result = results.back();
2777
2778
143
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
143
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
143
        if ( options.disableTests == false ) {
2796
143
            tests::test(op, result.second);
2797
143
        }
2798
2799
143
        postprocess(module, op, result);
2800
143
    }
2801
2802
128
    if ( options.noCompare == false ) {
2803
39
        compare(operations, results, data, size);
2804
39
    }
2805
128
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
187
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
187
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
187
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.10k
    do {
2691
2.10k
        auto op = getOp(&parentDs, data, size);
2692
2.10k
        auto module = getModule(parentDs);
2693
2.10k
        if ( module == nullptr ) {
2694
1.79k
            continue;
2695
1.79k
        }
2696
2697
311
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
311
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.09k
    } while ( parentDs.Get<bool>() == true );
2704
2705
187
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
184
#if 1
2711
184
    {
2712
184
        std::set<uint64_t> moduleIDs;
2713
184
        for (const auto& m : modules ) {
2714
156
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
156
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
156
            moduleIDs.insert(moduleID);
2722
156
        }
2723
2724
184
        std::set<uint64_t> operationModuleIDs;
2725
209
        for (const auto& op : operations) {
2726
209
            operationModuleIDs.insert(op.first->ID);
2727
209
        }
2728
2729
184
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
184
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
184
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
184
        for (const auto& id : addModuleIDs) {
2734
67
            operations.push_back({ modules.at(id), operations[0].second});
2735
67
        }
2736
184
    }
2737
184
#endif
2738
2739
184
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
184
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
460
    for (size_t i = 0; i < operations.size(); i++) {
2747
276
        auto& operation = operations[i];
2748
2749
276
        auto& module = operation.first;
2750
276
        auto& op = operation.second;
2751
2752
276
        if ( i > 0 ) {
2753
198
            auto& prevModule = operations[i-1].first;
2754
198
            auto& prevOp = operations[i].second;
2755
2756
198
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
114
                auto& curModifier = op.modifier.GetVectorPtr();
2758
114
                if ( curModifier.size() == 0 ) {
2759
39.5k
                    for (size_t j = 0; j < 512; j++) {
2760
39.4k
                        curModifier.push_back(1);
2761
39.4k
                    }
2762
77
                } else {
2763
262
                    for (auto& c : curModifier) {
2764
262
                        c++;
2765
262
                    }
2766
37
                }
2767
114
            }
2768
198
        }
2769
2770
276
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
276
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
276
        const auto& result = results.back();
2777
2778
276
        if ( result.second != std::nullopt ) {
2779
26
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
26
        }
2786
2787
276
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
276
        if ( options.disableTests == false ) {
2796
276
            tests::test(op, result.second);
2797
276
        }
2798
2799
276
        postprocess(module, op, result);
2800
276
    }
2801
2802
184
    if ( options.noCompare == false ) {
2803
78
        compare(operations, results, data, size);
2804
78
    }
2805
184
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
194
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
194
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
194
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.37k
    do {
2691
2.37k
        auto op = getOp(&parentDs, data, size);
2692
2.37k
        auto module = getModule(parentDs);
2693
2.37k
        if ( module == nullptr ) {
2694
2.02k
            continue;
2695
2.02k
        }
2696
2697
352
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
352
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
2.36k
    } while ( parentDs.Get<bool>() == true );
2704
2705
194
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
187
#if 1
2711
187
    {
2712
187
        std::set<uint64_t> moduleIDs;
2713
187
        for (const auto& m : modules ) {
2714
172
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
172
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
172
            moduleIDs.insert(moduleID);
2722
172
        }
2723
2724
187
        std::set<uint64_t> operationModuleIDs;
2725
237
        for (const auto& op : operations) {
2726
237
            operationModuleIDs.insert(op.first->ID);
2727
237
        }
2728
2729
187
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
187
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
187
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
187
        for (const auto& id : addModuleIDs) {
2734
75
            operations.push_back({ modules.at(id), operations[0].second});
2735
75
        }
2736
187
    }
2737
187
#endif
2738
2739
187
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
187
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
499
    for (size_t i = 0; i < operations.size(); i++) {
2747
312
        auto& operation = operations[i];
2748
2749
312
        auto& module = operation.first;
2750
312
        auto& op = operation.second;
2751
2752
312
        if ( i > 0 ) {
2753
226
            auto& prevModule = operations[i-1].first;
2754
226
            auto& prevOp = operations[i].second;
2755
2756
226
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
134
                auto& curModifier = op.modifier.GetVectorPtr();
2758
134
                if ( curModifier.size() == 0 ) {
2759
50.7k
                    for (size_t j = 0; j < 512; j++) {
2760
50.6k
                        curModifier.push_back(1);
2761
50.6k
                    }
2762
99
                } else {
2763
549
                    for (auto& c : curModifier) {
2764
549
                        c++;
2765
549
                    }
2766
35
                }
2767
134
            }
2768
226
        }
2769
2770
312
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
312
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
312
        const auto& result = results.back();
2777
2778
312
        if ( result.second != std::nullopt ) {
2779
48
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
48
        }
2786
2787
312
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
312
        if ( options.disableTests == false ) {
2796
312
            tests::test(op, result.second);
2797
312
        }
2798
2799
312
        postprocess(module, op, result);
2800
312
    }
2801
2802
187
    if ( options.noCompare == false ) {
2803
86
        compare(operations, results, data, size);
2804
86
    }
2805
187
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
247
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
247
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
247
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.62k
    do {
2691
2.62k
        auto op = getOp(&parentDs, data, size);
2692
2.62k
        auto module = getModule(parentDs);
2693
2.62k
        if ( module == nullptr ) {
2694
2.19k
            continue;
2695
2.19k
        }
2696
2697
431
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
431
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
10
            break;
2702
10
        }
2703
2.61k
    } while ( parentDs.Get<bool>() == true );
2704
2705
247
    if ( operations.empty() == true ) {
2706
14
        return;
2707
14
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
233
#if 1
2711
233
    {
2712
233
        std::set<uint64_t> moduleIDs;
2713
268
        for (const auto& m : modules ) {
2714
268
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
268
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
268
            moduleIDs.insert(moduleID);
2722
268
        }
2723
2724
233
        std::set<uint64_t> operationModuleIDs;
2725
335
        for (const auto& op : operations) {
2726
335
            operationModuleIDs.insert(op.first->ID);
2727
335
        }
2728
2729
233
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
233
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
233
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
233
        for (const auto& id : addModuleIDs) {
2734
122
            operations.push_back({ modules.at(id), operations[0].second});
2735
122
        }
2736
233
    }
2737
233
#endif
2738
2739
233
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
233
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
690
    for (size_t i = 0; i < operations.size(); i++) {
2747
457
        auto& operation = operations[i];
2748
2749
457
        auto& module = operation.first;
2750
457
        auto& op = operation.second;
2751
2752
457
        if ( i > 0 ) {
2753
323
            auto& prevModule = operations[i-1].first;
2754
323
            auto& prevOp = operations[i].second;
2755
2756
323
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
183
                auto& curModifier = op.modifier.GetVectorPtr();
2758
183
                if ( curModifier.size() == 0 ) {
2759
75.9k
                    for (size_t j = 0; j < 512; j++) {
2760
75.7k
                        curModifier.push_back(1);
2761
75.7k
                    }
2762
148
                } else {
2763
393
                    for (auto& c : curModifier) {
2764
393
                        c++;
2765
393
                    }
2766
35
                }
2767
183
            }
2768
323
        }
2769
2770
457
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
457
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
457
        const auto& result = results.back();
2777
2778
457
        if ( result.second != std::nullopt ) {
2779
148
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
148
        }
2786
2787
457
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
457
        if ( options.disableTests == false ) {
2796
457
            tests::test(op, result.second);
2797
457
        }
2798
2799
457
        postprocess(module, op, result);
2800
457
    }
2801
2802
233
    if ( options.noCompare == false ) {
2803
134
        compare(operations, results, data, size);
2804
134
    }
2805
233
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
181
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
181
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
181
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.85k
    do {
2691
1.85k
        auto op = getOp(&parentDs, data, size);
2692
1.85k
        auto module = getModule(parentDs);
2693
1.85k
        if ( module == nullptr ) {
2694
1.58k
            continue;
2695
1.58k
        }
2696
2697
266
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
266
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
1.84k
    } while ( parentDs.Get<bool>() == true );
2704
2705
181
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
177
#if 1
2711
177
    {
2712
177
        std::set<uint64_t> moduleIDs;
2713
177
        for (const auto& m : modules ) {
2714
138
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
138
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
138
            moduleIDs.insert(moduleID);
2722
138
        }
2723
2724
177
        std::set<uint64_t> operationModuleIDs;
2725
188
        for (const auto& op : operations) {
2726
188
            operationModuleIDs.insert(op.first->ID);
2727
188
        }
2728
2729
177
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
177
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
177
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
177
        for (const auto& id : addModuleIDs) {
2734
58
            operations.push_back({ modules.at(id), operations[0].second});
2735
58
        }
2736
177
    }
2737
177
#endif
2738
2739
177
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
177
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
423
    for (size_t i = 0; i < operations.size(); i++) {
2747
246
        auto& operation = operations[i];
2748
2749
246
        auto& module = operation.first;
2750
246
        auto& op = operation.second;
2751
2752
246
        if ( i > 0 ) {
2753
177
            auto& prevModule = operations[i-1].first;
2754
177
            auto& prevOp = operations[i].second;
2755
2756
177
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
102
                auto& curModifier = op.modifier.GetVectorPtr();
2758
102
                if ( curModifier.size() == 0 ) {
2759
37.4k
                    for (size_t j = 0; j < 512; j++) {
2760
37.3k
                        curModifier.push_back(1);
2761
37.3k
                    }
2762
73
                } else {
2763
239
                    for (auto& c : curModifier) {
2764
239
                        c++;
2765
239
                    }
2766
29
                }
2767
102
            }
2768
177
        }
2769
2770
246
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
246
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
246
        const auto& result = results.back();
2777
2778
246
        if ( result.second != std::nullopt ) {
2779
44
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
44
        }
2786
2787
246
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
246
        if ( options.disableTests == false ) {
2796
246
            tests::test(op, result.second);
2797
246
        }
2798
2799
246
        postprocess(module, op, result);
2800
246
    }
2801
2802
177
    if ( options.noCompare == false ) {
2803
69
        compare(operations, results, data, size);
2804
69
    }
2805
177
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
249
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
249
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
249
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.03k
    do {
2691
2.03k
        auto op = getOp(&parentDs, data, size);
2692
2.03k
        auto module = getModule(parentDs);
2693
2.03k
        if ( module == nullptr ) {
2694
1.74k
            continue;
2695
1.74k
        }
2696
2697
289
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
289
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.02k
    } while ( parentDs.Get<bool>() == true );
2704
2705
249
    if ( operations.empty() == true ) {
2706
33
        return;
2707
33
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
216
#if 1
2711
216
    {
2712
216
        std::set<uint64_t> moduleIDs;
2713
216
        for (const auto& m : modules ) {
2714
132
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
132
            moduleIDs.insert(moduleID);
2722
132
        }
2723
2724
216
        std::set<uint64_t> operationModuleIDs;
2725
216
        for (const auto& op : operations) {
2726
174
            operationModuleIDs.insert(op.first->ID);
2727
174
        }
2728
2729
216
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
216
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
216
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
216
        for (const auto& id : addModuleIDs) {
2734
55
            operations.push_back({ modules.at(id), operations[0].second});
2735
55
        }
2736
216
    }
2737
216
#endif
2738
2739
216
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
216
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
445
    for (size_t i = 0; i < operations.size(); i++) {
2747
229
        auto& operation = operations[i];
2748
2749
229
        auto& module = operation.first;
2750
229
        auto& op = operation.second;
2751
2752
229
        if ( i > 0 ) {
2753
163
            auto& prevModule = operations[i-1].first;
2754
163
            auto& prevOp = operations[i].second;
2755
2756
163
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
91
                auto& curModifier = op.modifier.GetVectorPtr();
2758
91
                if ( curModifier.size() == 0 ) {
2759
32.8k
                    for (size_t j = 0; j < 512; j++) {
2760
32.7k
                        curModifier.push_back(1);
2761
32.7k
                    }
2762
64
                } else {
2763
303
                    for (auto& c : curModifier) {
2764
303
                        c++;
2765
303
                    }
2766
27
                }
2767
91
            }
2768
163
        }
2769
2770
229
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
229
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
229
        const auto& result = results.back();
2777
2778
229
        if ( result.second != std::nullopt ) {
2779
32
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
32
        }
2786
2787
229
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
229
        if ( options.disableTests == false ) {
2796
229
            tests::test(op, result.second);
2797
229
        }
2798
2799
229
        postprocess(module, op, result);
2800
229
    }
2801
2802
216
    if ( options.noCompare == false ) {
2803
66
        compare(operations, results, data, size);
2804
66
    }
2805
216
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
166
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
166
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
166
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.06k
    do {
2691
2.06k
        auto op = getOp(&parentDs, data, size);
2692
2.06k
        auto module = getModule(parentDs);
2693
2.06k
        if ( module == nullptr ) {
2694
1.77k
            continue;
2695
1.77k
        }
2696
2697
287
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
287
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.05k
    } while ( parentDs.Get<bool>() == true );
2704
2705
166
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
163
#if 1
2711
163
    {
2712
163
        std::set<uint64_t> moduleIDs;
2713
163
        for (const auto& m : modules ) {
2714
132
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
132
            moduleIDs.insert(moduleID);
2722
132
        }
2723
2724
163
        std::set<uint64_t> operationModuleIDs;
2725
183
        for (const auto& op : operations) {
2726
183
            operationModuleIDs.insert(op.first->ID);
2727
183
        }
2728
2729
163
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
163
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
163
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
163
        for (const auto& id : addModuleIDs) {
2734
55
            operations.push_back({ modules.at(id), operations[0].second});
2735
55
        }
2736
163
    }
2737
163
#endif
2738
2739
163
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
163
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
401
    for (size_t i = 0; i < operations.size(); i++) {
2747
238
        auto& operation = operations[i];
2748
2749
238
        auto& module = operation.first;
2750
238
        auto& op = operation.second;
2751
2752
238
        if ( i > 0 ) {
2753
172
            auto& prevModule = operations[i-1].first;
2754
172
            auto& prevOp = operations[i].second;
2755
2756
172
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
100
                auto& curModifier = op.modifier.GetVectorPtr();
2758
100
                if ( curModifier.size() == 0 ) {
2759
36.9k
                    for (size_t j = 0; j < 512; j++) {
2760
36.8k
                        curModifier.push_back(1);
2761
36.8k
                    }
2762
72
                } else {
2763
287
                    for (auto& c : curModifier) {
2764
287
                        c++;
2765
287
                    }
2766
28
                }
2767
100
            }
2768
172
        }
2769
2770
238
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
238
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
238
        const auto& result = results.back();
2777
2778
238
        if ( result.second != std::nullopt ) {
2779
17
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
17
        }
2786
2787
238
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
238
        if ( options.disableTests == false ) {
2796
238
            tests::test(op, result.second);
2797
238
        }
2798
2799
238
        postprocess(module, op, result);
2800
238
    }
2801
2802
163
    if ( options.noCompare == false ) {
2803
66
        compare(operations, results, data, size);
2804
66
    }
2805
163
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
246
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
246
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
246
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.50k
    do {
2691
2.50k
        auto op = getOp(&parentDs, data, size);
2692
2.50k
        auto module = getModule(parentDs);
2693
2.50k
        if ( module == nullptr ) {
2694
2.25k
            continue;
2695
2.25k
        }
2696
2697
252
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
252
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.50k
    } while ( parentDs.Get<bool>() == true );
2704
2705
246
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
244
#if 1
2711
244
    {
2712
244
        std::set<uint64_t> moduleIDs;
2713
244
        for (const auto& m : modules ) {
2714
112
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
112
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
112
            moduleIDs.insert(moduleID);
2722
112
        }
2723
2724
244
        std::set<uint64_t> operationModuleIDs;
2725
244
        for (const auto& op : operations) {
2726
150
            operationModuleIDs.insert(op.first->ID);
2727
150
        }
2728
2729
244
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
244
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
244
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
244
        for (const auto& id : addModuleIDs) {
2734
45
            operations.push_back({ modules.at(id), operations[0].second});
2735
45
        }
2736
244
    }
2737
244
#endif
2738
2739
244
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
244
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
439
    for (size_t i = 0; i < operations.size(); i++) {
2747
195
        auto& operation = operations[i];
2748
2749
195
        auto& module = operation.first;
2750
195
        auto& op = operation.second;
2751
2752
195
        if ( i > 0 ) {
2753
139
            auto& prevModule = operations[i-1].first;
2754
139
            auto& prevOp = operations[i].second;
2755
2756
139
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
77
                auto& curModifier = op.modifier.GetVectorPtr();
2758
77
                if ( curModifier.size() == 0 ) {
2759
21.0k
                    for (size_t j = 0; j < 512; j++) {
2760
20.9k
                        curModifier.push_back(1);
2761
20.9k
                    }
2762
41
                } else {
2763
396
                    for (auto& c : curModifier) {
2764
396
                        c++;
2765
396
                    }
2766
36
                }
2767
77
            }
2768
139
        }
2769
2770
195
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
195
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
195
        const auto& result = results.back();
2777
2778
195
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
195
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
195
        if ( options.disableTests == false ) {
2796
195
            tests::test(op, result.second);
2797
195
        }
2798
2799
195
        postprocess(module, op, result);
2800
195
    }
2801
2802
244
    if ( options.noCompare == false ) {
2803
56
        compare(operations, results, data, size);
2804
56
    }
2805
244
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
400
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
400
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
400
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
3.45k
    do {
2691
3.45k
        auto op = getOp(&parentDs, data, size);
2692
3.45k
        auto module = getModule(parentDs);
2693
3.45k
        if ( module == nullptr ) {
2694
2.87k
            continue;
2695
2.87k
        }
2696
2697
576
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
576
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
3.44k
    } while ( parentDs.Get<bool>() == true );
2704
2705
400
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
394
#if 1
2711
394
    {
2712
394
        std::set<uint64_t> moduleIDs;
2713
434
        for (const auto& m : modules ) {
2714
434
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
434
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
434
            moduleIDs.insert(moduleID);
2722
434
        }
2723
2724
394
        std::set<uint64_t> operationModuleIDs;
2725
472
        for (const auto& op : operations) {
2726
472
            operationModuleIDs.insert(op.first->ID);
2727
472
        }
2728
2729
394
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
394
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
394
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
394
        for (const auto& id : addModuleIDs) {
2734
205
            operations.push_back({ modules.at(id), operations[0].second});
2735
205
        }
2736
394
    }
2737
394
#endif
2738
2739
394
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
394
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.07k
    for (size_t i = 0; i < operations.size(); i++) {
2747
677
        auto& operation = operations[i];
2748
2749
677
        auto& module = operation.first;
2750
677
        auto& op = operation.second;
2751
2752
677
        if ( i > 0 ) {
2753
460
            auto& prevModule = operations[i-1].first;
2754
460
            auto& prevOp = operations[i].second;
2755
2756
460
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
235
                auto& curModifier = op.modifier.GetVectorPtr();
2758
235
                if ( curModifier.size() == 0 ) {
2759
78.4k
                    for (size_t j = 0; j < 512; j++) {
2760
78.3k
                        curModifier.push_back(1);
2761
78.3k
                    }
2762
153
                } else {
2763
2.34k
                    for (auto& c : curModifier) {
2764
2.34k
                        c++;
2765
2.34k
                    }
2766
82
                }
2767
235
            }
2768
460
        }
2769
2770
677
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
677
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
677
        const auto& result = results.back();
2777
2778
677
        if ( result.second != std::nullopt ) {
2779
40
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
40
        }
2786
2787
677
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
677
        if ( options.disableTests == false ) {
2796
677
            tests::test(op, result.second);
2797
677
        }
2798
2799
677
        postprocess(module, op, result);
2800
677
    }
2801
2802
394
    if ( options.noCompare == false ) {
2803
217
        compare(operations, results, data, size);
2804
217
    }
2805
394
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
7.51k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
7.51k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
7.51k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
16.9k
    do {
2691
16.9k
        auto op = getOp(&parentDs, data, size);
2692
16.9k
        auto module = getModule(parentDs);
2693
16.9k
        if ( module == nullptr ) {
2694
6.76k
            continue;
2695
6.76k
        }
2696
2697
10.2k
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
10.2k
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
94
            break;
2702
94
        }
2703
16.8k
    } while ( parentDs.Get<bool>() == true );
2704
2705
7.51k
    if ( operations.empty() == true ) {
2706
13
        return;
2707
13
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
7.50k
#if 1
2711
7.50k
    {
2712
7.50k
        std::set<uint64_t> moduleIDs;
2713
14.4k
        for (const auto& m : modules ) {
2714
14.4k
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
14.4k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
14.4k
            moduleIDs.insert(moduleID);
2722
14.4k
        }
2723
2724
7.50k
        std::set<uint64_t> operationModuleIDs;
2725
9.87k
        for (const auto& op : operations) {
2726
9.87k
            operationModuleIDs.insert(op.first->ID);
2727
9.87k
        }
2728
2729
7.50k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
7.50k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
7.50k
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
7.50k
        for (const auto& id : addModuleIDs) {
2734
7.21k
            operations.push_back({ modules.at(id), operations[0].second});
2735
7.21k
        }
2736
7.50k
    }
2737
7.50k
#endif
2738
2739
7.50k
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
7.50k
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
24.5k
    for (size_t i = 0; i < operations.size(); i++) {
2747
17.0k
        auto& operation = operations[i];
2748
2749
17.0k
        auto& module = operation.first;
2750
17.0k
        auto& op = operation.second;
2751
2752
17.0k
        if ( i > 0 ) {
2753
9.85k
            auto& prevModule = operations[i-1].first;
2754
9.85k
            auto& prevOp = operations[i].second;
2755
2756
9.85k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
2.60k
                auto& curModifier = op.modifier.GetVectorPtr();
2758
2.60k
                if ( curModifier.size() == 0 ) {
2759
813k
                    for (size_t j = 0; j < 512; j++) {
2760
812k
                        curModifier.push_back(1);
2761
812k
                    }
2762
1.58k
                } else {
2763
52.5k
                    for (auto& c : curModifier) {
2764
52.5k
                        c++;
2765
52.5k
                    }
2766
1.01k
                }
2767
2.60k
            }
2768
9.85k
        }
2769
2770
17.0k
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
17.0k
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
17.0k
        const auto& result = results.back();
2777
2778
17.0k
        if ( result.second != std::nullopt ) {
2779
4.04k
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
4.04k
        }
2786
2787
17.0k
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
17.0k
        if ( options.disableTests == false ) {
2796
17.0k
            tests::test(op, result.second);
2797
17.0k
        }
2798
2799
17.0k
        postprocess(module, op, result);
2800
17.0k
    }
2801
2802
7.50k
    if ( options.noCompare == false ) {
2803
7.23k
        compare(operations, results, data, size);
2804
7.23k
    }
2805
7.50k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
130
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
130
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
130
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.86k
    do {
2691
1.86k
        auto op = getOp(&parentDs, data, size);
2692
1.86k
        auto module = getModule(parentDs);
2693
1.86k
        if ( module == nullptr ) {
2694
1.63k
            continue;
2695
1.63k
        }
2696
2697
230
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
230
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
1.85k
    } while ( parentDs.Get<bool>() == true );
2704
2705
130
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
126
#if 1
2711
126
    {
2712
126
        std::set<uint64_t> moduleIDs;
2713
132
        for (const auto& m : modules ) {
2714
132
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
132
            moduleIDs.insert(moduleID);
2722
132
        }
2723
2724
126
        std::set<uint64_t> operationModuleIDs;
2725
160
        for (const auto& op : operations) {
2726
160
            operationModuleIDs.insert(op.first->ID);
2727
160
        }
2728
2729
126
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
126
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
126
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
126
        for (const auto& id : addModuleIDs) {
2734
55
            operations.push_back({ modules.at(id), operations[0].second});
2735
55
        }
2736
126
    }
2737
126
#endif
2738
2739
126
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
126
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
341
    for (size_t i = 0; i < operations.size(); i++) {
2747
215
        auto& operation = operations[i];
2748
2749
215
        auto& module = operation.first;
2750
215
        auto& op = operation.second;
2751
2752
215
        if ( i > 0 ) {
2753
149
            auto& prevModule = operations[i-1].first;
2754
149
            auto& prevOp = operations[i].second;
2755
2756
149
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
77
                auto& curModifier = op.modifier.GetVectorPtr();
2758
77
                if ( curModifier.size() == 0 ) {
2759
24.6k
                    for (size_t j = 0; j < 512; j++) {
2760
24.5k
                        curModifier.push_back(1);
2761
24.5k
                    }
2762
48
                } else {
2763
361
                    for (auto& c : curModifier) {
2764
361
                        c++;
2765
361
                    }
2766
29
                }
2767
77
            }
2768
149
        }
2769
2770
215
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
215
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
215
        const auto& result = results.back();
2777
2778
215
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
215
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
215
        if ( options.disableTests == false ) {
2796
215
            tests::test(op, result.second);
2797
215
        }
2798
2799
215
        postprocess(module, op, result);
2800
215
    }
2801
2802
126
    if ( options.noCompare == false ) {
2803
66
        compare(operations, results, data, size);
2804
66
    }
2805
126
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
338
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
338
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
338
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.65k
    do {
2691
2.65k
        auto op = getOp(&parentDs, data, size);
2692
2.65k
        auto module = getModule(parentDs);
2693
2.65k
        if ( module == nullptr ) {
2694
2.09k
            continue;
2695
2.09k
        }
2696
2697
561
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
561
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.64k
    } while ( parentDs.Get<bool>() == true );
2704
2705
338
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
333
#if 1
2711
333
    {
2712
333
        std::set<uint64_t> moduleIDs;
2713
462
        for (const auto& m : modules ) {
2714
462
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
462
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
462
            moduleIDs.insert(moduleID);
2722
462
        }
2723
2724
333
        std::set<uint64_t> operationModuleIDs;
2725
455
        for (const auto& op : operations) {
2726
455
            operationModuleIDs.insert(op.first->ID);
2727
455
        }
2728
2729
333
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
333
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
333
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
333
        for (const auto& id : addModuleIDs) {
2734
220
            operations.push_back({ modules.at(id), operations[0].second});
2735
220
        }
2736
333
    }
2737
333
#endif
2738
2739
333
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
333
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
1.00k
    for (size_t i = 0; i < operations.size(); i++) {
2747
675
        auto& operation = operations[i];
2748
2749
675
        auto& module = operation.first;
2750
675
        auto& op = operation.second;
2751
2752
675
        if ( i > 0 ) {
2753
444
            auto& prevModule = operations[i-1].first;
2754
444
            auto& prevOp = operations[i].second;
2755
2756
444
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
207
                auto& curModifier = op.modifier.GetVectorPtr();
2758
207
                if ( curModifier.size() == 0 ) {
2759
17.4k
                    for (size_t j = 0; j < 512; j++) {
2760
17.4k
                        curModifier.push_back(1);
2761
17.4k
                    }
2762
173
                } else {
2763
758
                    for (auto& c : curModifier) {
2764
758
                        c++;
2765
758
                    }
2766
173
                }
2767
207
            }
2768
444
        }
2769
2770
675
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
675
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
675
        const auto& result = results.back();
2777
2778
675
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
675
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
675
        if ( options.disableTests == false ) {
2796
675
            tests::test(op, result.second);
2797
675
        }
2798
2799
675
        postprocess(module, op, result);
2800
675
    }
2801
2802
333
    if ( options.noCompare == false ) {
2803
231
        compare(operations, results, data, size);
2804
231
    }
2805
333
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
129
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
129
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
129
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.81k
    do {
2691
1.81k
        auto op = getOp(&parentDs, data, size);
2692
1.81k
        auto module = getModule(parentDs);
2693
1.81k
        if ( module == nullptr ) {
2694
1.61k
            continue;
2695
1.61k
        }
2696
2697
199
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
199
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
1.80k
    } while ( parentDs.Get<bool>() == true );
2704
2705
129
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
122
#if 1
2711
122
    {
2712
122
        std::set<uint64_t> moduleIDs;
2713
122
        for (const auto& m : modules ) {
2714
90
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
90
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
90
            moduleIDs.insert(moduleID);
2722
90
        }
2723
2724
122
        std::set<uint64_t> operationModuleIDs;
2725
122
        for (const auto& op : operations) {
2726
114
            operationModuleIDs.insert(op.first->ID);
2727
114
        }
2728
2729
122
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
122
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
122
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
122
        for (const auto& id : addModuleIDs) {
2734
34
            operations.push_back({ modules.at(id), operations[0].second});
2735
34
        }
2736
122
    }
2737
122
#endif
2738
2739
122
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
122
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
270
    for (size_t i = 0; i < operations.size(); i++) {
2747
148
        auto& operation = operations[i];
2748
2749
148
        auto& module = operation.first;
2750
148
        auto& op = operation.second;
2751
2752
148
        if ( i > 0 ) {
2753
103
            auto& prevModule = operations[i-1].first;
2754
103
            auto& prevOp = operations[i].second;
2755
2756
103
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
52
                auto& curModifier = op.modifier.GetVectorPtr();
2758
52
                if ( curModifier.size() == 0 ) {
2759
17.9k
                    for (size_t j = 0; j < 512; j++) {
2760
17.9k
                        curModifier.push_back(1);
2761
17.9k
                    }
2762
35
                } else {
2763
248
                    for (auto& c : curModifier) {
2764
248
                        c++;
2765
248
                    }
2766
17
                }
2767
52
            }
2768
103
        }
2769
2770
148
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
148
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
148
        const auto& result = results.back();
2777
2778
148
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
148
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
148
        if ( options.disableTests == false ) {
2796
148
            tests::test(op, result.second);
2797
148
        }
2798
2799
148
        postprocess(module, op, result);
2800
148
    }
2801
2802
122
    if ( options.noCompare == false ) {
2803
45
        compare(operations, results, data, size);
2804
45
    }
2805
122
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
179
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
179
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
179
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.70k
    do {
2691
1.70k
        auto op = getOp(&parentDs, data, size);
2692
1.70k
        auto module = getModule(parentDs);
2693
1.70k
        if ( module == nullptr ) {
2694
1.51k
            continue;
2695
1.51k
        }
2696
2697
189
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
189
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
1.69k
    } while ( parentDs.Get<bool>() == true );
2704
2705
179
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
172
#if 1
2711
172
    {
2712
172
        std::set<uint64_t> moduleIDs;
2713
172
        for (const auto& m : modules ) {
2714
86
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
86
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
86
            moduleIDs.insert(moduleID);
2722
86
        }
2723
2724
172
        std::set<uint64_t> operationModuleIDs;
2725
172
        for (const auto& op : operations) {
2726
110
            operationModuleIDs.insert(op.first->ID);
2727
110
        }
2728
2729
172
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
172
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
172
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
172
        for (const auto& id : addModuleIDs) {
2734
32
            operations.push_back({ modules.at(id), operations[0].second});
2735
32
        }
2736
172
    }
2737
172
#endif
2738
2739
172
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
172
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
314
    for (size_t i = 0; i < operations.size(); i++) {
2747
142
        auto& operation = operations[i];
2748
2749
142
        auto& module = operation.first;
2750
142
        auto& op = operation.second;
2751
2752
142
        if ( i > 0 ) {
2753
99
            auto& prevModule = operations[i-1].first;
2754
99
            auto& prevOp = operations[i].second;
2755
2756
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
50
                auto& curModifier = op.modifier.GetVectorPtr();
2758
50
                if ( curModifier.size() == 0 ) {
2759
13.3k
                    for (size_t j = 0; j < 512; j++) {
2760
13.3k
                        curModifier.push_back(1);
2761
13.3k
                    }
2762
26
                } else {
2763
235
                    for (auto& c : curModifier) {
2764
235
                        c++;
2765
235
                    }
2766
24
                }
2767
50
            }
2768
99
        }
2769
2770
142
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
142
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
142
        const auto& result = results.back();
2777
2778
142
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
142
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
142
        if ( options.disableTests == false ) {
2796
142
            tests::test(op, result.second);
2797
142
        }
2798
2799
142
        postprocess(module, op, result);
2800
142
    }
2801
2802
172
    if ( options.noCompare == false ) {
2803
43
        compare(operations, results, data, size);
2804
43
    }
2805
172
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
117
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
117
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
117
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.37k
    do {
2691
2.37k
        auto op = getOp(&parentDs, data, size);
2692
2.37k
        auto module = getModule(parentDs);
2693
2.37k
        if ( module == nullptr ) {
2694
2.18k
            continue;
2695
2.18k
        }
2696
2697
188
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
188
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.37k
    } while ( parentDs.Get<bool>() == true );
2704
2705
117
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
114
#if 1
2711
114
    {
2712
114
        std::set<uint64_t> moduleIDs;
2713
114
        for (const auto& m : modules ) {
2714
88
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
88
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
88
            moduleIDs.insert(moduleID);
2722
88
        }
2723
2724
114
        std::set<uint64_t> operationModuleIDs;
2725
116
        for (const auto& op : operations) {
2726
116
            operationModuleIDs.insert(op.first->ID);
2727
116
        }
2728
2729
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
114
        for (const auto& id : addModuleIDs) {
2734
33
            operations.push_back({ modules.at(id), operations[0].second});
2735
33
        }
2736
114
    }
2737
114
#endif
2738
2739
114
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
114
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
263
    for (size_t i = 0; i < operations.size(); i++) {
2747
149
        auto& operation = operations[i];
2748
2749
149
        auto& module = operation.first;
2750
149
        auto& op = operation.second;
2751
2752
149
        if ( i > 0 ) {
2753
105
            auto& prevModule = operations[i-1].first;
2754
105
            auto& prevOp = operations[i].second;
2755
2756
105
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
55
                auto& curModifier = op.modifier.GetVectorPtr();
2758
55
                if ( curModifier.size() == 0 ) {
2759
15.3k
                    for (size_t j = 0; j < 512; j++) {
2760
15.3k
                        curModifier.push_back(1);
2761
15.3k
                    }
2762
30
                } else {
2763
353
                    for (auto& c : curModifier) {
2764
353
                        c++;
2765
353
                    }
2766
25
                }
2767
55
            }
2768
105
        }
2769
2770
149
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
149
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
149
        const auto& result = results.back();
2777
2778
149
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
149
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
149
        if ( options.disableTests == false ) {
2796
149
            tests::test(op, result.second);
2797
149
        }
2798
2799
149
        postprocess(module, op, result);
2800
149
    }
2801
2802
114
    if ( options.noCompare == false ) {
2803
44
        compare(operations, results, data, size);
2804
44
    }
2805
114
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
164
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
164
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
164
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.56k
    do {
2691
2.56k
        auto op = getOp(&parentDs, data, size);
2692
2.56k
        auto module = getModule(parentDs);
2693
2.56k
        if ( module == nullptr ) {
2694
2.37k
            continue;
2695
2.37k
        }
2696
2697
191
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
191
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.55k
    } while ( parentDs.Get<bool>() == true );
2704
2705
164
    if ( operations.empty() == true ) {
2706
22
        return;
2707
22
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
142
#if 1
2711
142
    {
2712
142
        std::set<uint64_t> moduleIDs;
2713
142
        for (const auto& m : modules ) {
2714
82
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
82
            moduleIDs.insert(moduleID);
2722
82
        }
2723
2724
142
        std::set<uint64_t> operationModuleIDs;
2725
142
        for (const auto& op : operations) {
2726
106
            operationModuleIDs.insert(op.first->ID);
2727
106
        }
2728
2729
142
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
142
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
142
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
142
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
142
    }
2737
142
#endif
2738
2739
142
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
142
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
277
    for (size_t i = 0; i < operations.size(); i++) {
2747
135
        auto& operation = operations[i];
2748
2749
135
        auto& module = operation.first;
2750
135
        auto& op = operation.second;
2751
2752
135
        if ( i > 0 ) {
2753
94
            auto& prevModule = operations[i-1].first;
2754
94
            auto& prevOp = operations[i].second;
2755
2756
94
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
47
                auto& curModifier = op.modifier.GetVectorPtr();
2758
47
                if ( curModifier.size() == 0 ) {
2759
12.8k
                    for (size_t j = 0; j < 512; j++) {
2760
12.8k
                        curModifier.push_back(1);
2761
12.8k
                    }
2762
25
                } else {
2763
376
                    for (auto& c : curModifier) {
2764
376
                        c++;
2765
376
                    }
2766
22
                }
2767
47
            }
2768
94
        }
2769
2770
135
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
135
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
135
        const auto& result = results.back();
2777
2778
135
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
135
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
135
        if ( options.disableTests == false ) {
2796
135
            tests::test(op, result.second);
2797
135
        }
2798
2799
135
        postprocess(module, op, result);
2800
135
    }
2801
2802
142
    if ( options.noCompare == false ) {
2803
41
        compare(operations, results, data, size);
2804
41
    }
2805
142
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
311
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
311
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
311
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.37k
    do {
2691
2.37k
        auto op = getOp(&parentDs, data, size);
2692
2.37k
        auto module = getModule(parentDs);
2693
2.37k
        if ( module == nullptr ) {
2694
2.03k
            continue;
2695
2.03k
        }
2696
2697
335
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
335
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
2.36k
    } while ( parentDs.Get<bool>() == true );
2704
2705
311
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
307
#if 1
2711
307
    {
2712
307
        std::set<uint64_t> moduleIDs;
2713
307
        for (const auto& m : modules ) {
2714
100
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
100
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
100
            moduleIDs.insert(moduleID);
2722
100
        }
2723
2724
307
        std::set<uint64_t> operationModuleIDs;
2725
307
        for (const auto& op : operations) {
2726
132
            operationModuleIDs.insert(op.first->ID);
2727
132
        }
2728
2729
307
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
307
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
307
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
307
        for (const auto& id : addModuleIDs) {
2734
40
            operations.push_back({ modules.at(id), operations[0].second});
2735
40
        }
2736
307
    }
2737
307
#endif
2738
2739
307
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
307
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
479
    for (size_t i = 0; i < operations.size(); i++) {
2747
172
        auto& operation = operations[i];
2748
2749
172
        auto& module = operation.first;
2750
172
        auto& op = operation.second;
2751
2752
172
        if ( i > 0 ) {
2753
122
            auto& prevModule = operations[i-1].first;
2754
122
            auto& prevOp = operations[i].second;
2755
2756
122
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
64
                auto& curModifier = op.modifier.GetVectorPtr();
2758
64
                if ( curModifier.size() == 0 ) {
2759
21.0k
                    for (size_t j = 0; j < 512; j++) {
2760
20.9k
                        curModifier.push_back(1);
2761
20.9k
                    }
2762
41
                } else {
2763
259
                    for (auto& c : curModifier) {
2764
259
                        c++;
2765
259
                    }
2766
23
                }
2767
64
            }
2768
122
        }
2769
2770
172
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
172
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
172
        const auto& result = results.back();
2777
2778
172
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
172
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
172
        if ( options.disableTests == false ) {
2796
172
            tests::test(op, result.second);
2797
172
        }
2798
2799
172
        postprocess(module, op, result);
2800
172
    }
2801
2802
307
    if ( options.noCompare == false ) {
2803
50
        compare(operations, results, data, size);
2804
50
    }
2805
307
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
254
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
254
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
254
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.00k
    do {
2691
2.00k
        auto op = getOp(&parentDs, data, size);
2692
2.00k
        auto module = getModule(parentDs);
2693
2.00k
        if ( module == nullptr ) {
2694
1.73k
            continue;
2695
1.73k
        }
2696
2697
267
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
267
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
8
            break;
2702
8
        }
2703
1.99k
    } while ( parentDs.Get<bool>() == true );
2704
2705
254
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
251
#if 1
2711
251
    {
2712
251
        std::set<uint64_t> moduleIDs;
2713
251
        for (const auto& m : modules ) {
2714
84
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
84
            moduleIDs.insert(moduleID);
2722
84
        }
2723
2724
251
        std::set<uint64_t> operationModuleIDs;
2725
251
        for (const auto& op : operations) {
2726
122
            operationModuleIDs.insert(op.first->ID);
2727
122
        }
2728
2729
251
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
251
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
251
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
251
        for (const auto& id : addModuleIDs) {
2734
31
            operations.push_back({ modules.at(id), operations[0].second});
2735
31
        }
2736
251
    }
2737
251
#endif
2738
2739
251
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
251
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
404
    for (size_t i = 0; i < operations.size(); i++) {
2747
153
        auto& operation = operations[i];
2748
2749
153
        auto& module = operation.first;
2750
153
        auto& op = operation.second;
2751
2752
153
        if ( i > 0 ) {
2753
111
            auto& prevModule = operations[i-1].first;
2754
111
            auto& prevOp = operations[i].second;
2755
2756
111
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
63
                auto& curModifier = op.modifier.GetVectorPtr();
2758
63
                if ( curModifier.size() == 0 ) {
2759
21.0k
                    for (size_t j = 0; j < 512; j++) {
2760
20.9k
                        curModifier.push_back(1);
2761
20.9k
                    }
2762
41
                } else {
2763
297
                    for (auto& c : curModifier) {
2764
297
                        c++;
2765
297
                    }
2766
22
                }
2767
63
            }
2768
111
        }
2769
2770
153
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
153
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
153
        const auto& result = results.back();
2777
2778
153
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
153
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
153
        if ( options.disableTests == false ) {
2796
153
            tests::test(op, result.second);
2797
153
        }
2798
2799
153
        postprocess(module, op, result);
2800
153
    }
2801
2802
251
    if ( options.noCompare == false ) {
2803
42
        compare(operations, results, data, size);
2804
42
    }
2805
251
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
203
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
203
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
203
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.47k
    do {
2691
2.47k
        auto op = getOp(&parentDs, data, size);
2692
2.47k
        auto module = getModule(parentDs);
2693
2.47k
        if ( module == nullptr ) {
2694
2.19k
            continue;
2695
2.19k
        }
2696
2697
283
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
283
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.47k
    } while ( parentDs.Get<bool>() == true );
2704
2705
203
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
200
#if 1
2711
200
    {
2712
200
        std::set<uint64_t> moduleIDs;
2713
200
        for (const auto& m : modules ) {
2714
82
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
82
            moduleIDs.insert(moduleID);
2722
82
        }
2723
2724
200
        std::set<uint64_t> operationModuleIDs;
2725
200
        for (const auto& op : operations) {
2726
111
            operationModuleIDs.insert(op.first->ID);
2727
111
        }
2728
2729
200
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
200
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
200
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
200
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
200
    }
2737
200
#endif
2738
2739
200
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
200
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
340
    for (size_t i = 0; i < operations.size(); i++) {
2747
140
        auto& operation = operations[i];
2748
2749
140
        auto& module = operation.first;
2750
140
        auto& op = operation.second;
2751
2752
140
        if ( i > 0 ) {
2753
99
            auto& prevModule = operations[i-1].first;
2754
99
            auto& prevOp = operations[i].second;
2755
2756
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
52
                auto& curModifier = op.modifier.GetVectorPtr();
2758
52
                if ( curModifier.size() == 0 ) {
2759
13.8k
                    for (size_t j = 0; j < 512; j++) {
2760
13.8k
                        curModifier.push_back(1);
2761
13.8k
                    }
2762
27
                } else {
2763
263
                    for (auto& c : curModifier) {
2764
263
                        c++;
2765
263
                    }
2766
25
                }
2767
52
            }
2768
99
        }
2769
2770
140
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
140
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
140
        const auto& result = results.back();
2777
2778
140
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
140
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
140
        if ( options.disableTests == false ) {
2796
140
            tests::test(op, result.second);
2797
140
        }
2798
2799
140
        postprocess(module, op, result);
2800
140
    }
2801
2802
200
    if ( options.noCompare == false ) {
2803
41
        compare(operations, results, data, size);
2804
41
    }
2805
200
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
171
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
171
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
171
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.92k
    do {
2691
1.92k
        auto op = getOp(&parentDs, data, size);
2692
1.92k
        auto module = getModule(parentDs);
2693
1.92k
        if ( module == nullptr ) {
2694
1.70k
            continue;
2695
1.70k
        }
2696
2697
216
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
216
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
1.91k
    } while ( parentDs.Get<bool>() == true );
2704
2705
171
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
168
#if 1
2711
168
    {
2712
168
        std::set<uint64_t> moduleIDs;
2713
168
        for (const auto& m : modules ) {
2714
84
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
84
            moduleIDs.insert(moduleID);
2722
84
        }
2723
2724
168
        std::set<uint64_t> operationModuleIDs;
2725
168
        for (const auto& op : operations) {
2726
118
            operationModuleIDs.insert(op.first->ID);
2727
118
        }
2728
2729
168
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
168
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
168
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
168
        for (const auto& id : addModuleIDs) {
2734
31
            operations.push_back({ modules.at(id), operations[0].second});
2735
31
        }
2736
168
    }
2737
168
#endif
2738
2739
168
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
168
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
317
    for (size_t i = 0; i < operations.size(); i++) {
2747
149
        auto& operation = operations[i];
2748
2749
149
        auto& module = operation.first;
2750
149
        auto& op = operation.second;
2751
2752
149
        if ( i > 0 ) {
2753
107
            auto& prevModule = operations[i-1].first;
2754
107
            auto& prevOp = operations[i].second;
2755
2756
107
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
59
                auto& curModifier = op.modifier.GetVectorPtr();
2758
59
                if ( curModifier.size() == 0 ) {
2759
16.4k
                    for (size_t j = 0; j < 512; j++) {
2760
16.3k
                        curModifier.push_back(1);
2761
16.3k
                    }
2762
32
                } else {
2763
286
                    for (auto& c : curModifier) {
2764
286
                        c++;
2765
286
                    }
2766
27
                }
2767
59
            }
2768
107
        }
2769
2770
149
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
149
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
149
        const auto& result = results.back();
2777
2778
149
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
149
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
149
        if ( options.disableTests == false ) {
2796
149
            tests::test(op, result.second);
2797
149
        }
2798
2799
149
        postprocess(module, op, result);
2800
149
    }
2801
2802
168
    if ( options.noCompare == false ) {
2803
42
        compare(operations, results, data, size);
2804
42
    }
2805
168
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
203
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
203
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
203
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.61k
    do {
2691
2.61k
        auto op = getOp(&parentDs, data, size);
2692
2.61k
        auto module = getModule(parentDs);
2693
2.61k
        if ( module == nullptr ) {
2694
2.38k
            continue;
2695
2.38k
        }
2696
2697
223
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
223
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.60k
    } while ( parentDs.Get<bool>() == true );
2704
2705
203
    if ( operations.empty() == true ) {
2706
15
        return;
2707
15
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
188
#if 1
2711
188
    {
2712
188
        std::set<uint64_t> moduleIDs;
2713
188
        for (const auto& m : modules ) {
2714
68
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
68
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
68
            moduleIDs.insert(moduleID);
2722
68
        }
2723
2724
188
        std::set<uint64_t> operationModuleIDs;
2725
188
        for (const auto& op : operations) {
2726
100
            operationModuleIDs.insert(op.first->ID);
2727
100
        }
2728
2729
188
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
188
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
188
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
188
        for (const auto& id : addModuleIDs) {
2734
23
            operations.push_back({ modules.at(id), operations[0].second});
2735
23
        }
2736
188
    }
2737
188
#endif
2738
2739
188
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
188
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
311
    for (size_t i = 0; i < operations.size(); i++) {
2747
123
        auto& operation = operations[i];
2748
2749
123
        auto& module = operation.first;
2750
123
        auto& op = operation.second;
2751
2752
123
        if ( i > 0 ) {
2753
89
            auto& prevModule = operations[i-1].first;
2754
89
            auto& prevOp = operations[i].second;
2755
2756
89
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
49
                auto& curModifier = op.modifier.GetVectorPtr();
2758
49
                if ( curModifier.size() == 0 ) {
2759
12.8k
                    for (size_t j = 0; j < 512; j++) {
2760
12.8k
                        curModifier.push_back(1);
2761
12.8k
                    }
2762
25
                } else {
2763
357
                    for (auto& c : curModifier) {
2764
357
                        c++;
2765
357
                    }
2766
24
                }
2767
49
            }
2768
89
        }
2769
2770
123
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
123
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
123
        const auto& result = results.back();
2777
2778
123
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
123
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
123
        if ( options.disableTests == false ) {
2796
123
            tests::test(op, result.second);
2797
123
        }
2798
2799
123
        postprocess(module, op, result);
2800
123
    }
2801
2802
188
    if ( options.noCompare == false ) {
2803
34
        compare(operations, results, data, size);
2804
34
    }
2805
188
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.66k
    do {
2691
2.66k
        auto op = getOp(&parentDs, data, size);
2692
2.66k
        auto module = getModule(parentDs);
2693
2.66k
        if ( module == nullptr ) {
2694
2.45k
            continue;
2695
2.45k
        }
2696
2697
212
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
212
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.66k
    } while ( parentDs.Get<bool>() == true );
2704
2705
149
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
143
#if 1
2711
143
    {
2712
143
        std::set<uint64_t> moduleIDs;
2713
143
        for (const auto& m : modules ) {
2714
70
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
70
            moduleIDs.insert(moduleID);
2722
70
        }
2723
2724
143
        std::set<uint64_t> operationModuleIDs;
2725
143
        for (const auto& op : operations) {
2726
110
            operationModuleIDs.insert(op.first->ID);
2727
110
        }
2728
2729
143
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
143
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
143
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
143
        for (const auto& id : addModuleIDs) {
2734
24
            operations.push_back({ modules.at(id), operations[0].second});
2735
24
        }
2736
143
    }
2737
143
#endif
2738
2739
143
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
143
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
277
    for (size_t i = 0; i < operations.size(); i++) {
2747
134
        auto& operation = operations[i];
2748
2749
134
        auto& module = operation.first;
2750
134
        auto& op = operation.second;
2751
2752
134
        if ( i > 0 ) {
2753
99
            auto& prevModule = operations[i-1].first;
2754
99
            auto& prevOp = operations[i].second;
2755
2756
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
56
                auto& curModifier = op.modifier.GetVectorPtr();
2758
56
                if ( curModifier.size() == 0 ) {
2759
15.9k
                    for (size_t j = 0; j < 512; j++) {
2760
15.8k
                        curModifier.push_back(1);
2761
15.8k
                    }
2762
31
                } else {
2763
239
                    for (auto& c : curModifier) {
2764
239
                        c++;
2765
239
                    }
2766
25
                }
2767
56
            }
2768
99
        }
2769
2770
134
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
134
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
134
        const auto& result = results.back();
2777
2778
134
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
134
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
134
        if ( options.disableTests == false ) {
2796
134
            tests::test(op, result.second);
2797
134
        }
2798
2799
134
        postprocess(module, op, result);
2800
134
    }
2801
2802
143
    if ( options.noCompare == false ) {
2803
35
        compare(operations, results, data, size);
2804
35
    }
2805
143
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
163
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
163
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
163
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.22k
    do {
2691
2.22k
        auto op = getOp(&parentDs, data, size);
2692
2.22k
        auto module = getModule(parentDs);
2693
2.22k
        if ( module == nullptr ) {
2694
1.94k
            continue;
2695
1.94k
        }
2696
2697
285
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
285
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
9
            break;
2702
9
        }
2703
2.22k
    } while ( parentDs.Get<bool>() == true );
2704
2705
163
    if ( operations.empty() == true ) {
2706
3
        return;
2707
3
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
160
#if 1
2711
160
    {
2712
160
        std::set<uint64_t> moduleIDs;
2713
160
        for (const auto& m : modules ) {
2714
120
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
120
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
120
            moduleIDs.insert(moduleID);
2722
120
        }
2723
2724
160
        std::set<uint64_t> operationModuleIDs;
2725
160
        for (const auto& op : operations) {
2726
157
            operationModuleIDs.insert(op.first->ID);
2727
157
        }
2728
2729
160
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
160
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
160
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
160
        for (const auto& id : addModuleIDs) {
2734
49
            operations.push_back({ modules.at(id), operations[0].second});
2735
49
        }
2736
160
    }
2737
160
#endif
2738
2739
160
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
160
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
366
    for (size_t i = 0; i < operations.size(); i++) {
2747
206
        auto& operation = operations[i];
2748
2749
206
        auto& module = operation.first;
2750
206
        auto& op = operation.second;
2751
2752
206
        if ( i > 0 ) {
2753
146
            auto& prevModule = operations[i-1].first;
2754
146
            auto& prevOp = operations[i].second;
2755
2756
146
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
80
                auto& curModifier = op.modifier.GetVectorPtr();
2758
80
                if ( curModifier.size() == 0 ) {
2759
26.1k
                    for (size_t j = 0; j < 512; j++) {
2760
26.1k
                        curModifier.push_back(1);
2761
26.1k
                    }
2762
51
                } else {
2763
268
                    for (auto& c : curModifier) {
2764
268
                        c++;
2765
268
                    }
2766
29
                }
2767
80
            }
2768
146
        }
2769
2770
206
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
206
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
206
        const auto& result = results.back();
2777
2778
206
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
206
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
206
        if ( options.disableTests == false ) {
2796
206
            tests::test(op, result.second);
2797
206
        }
2798
2799
206
        postprocess(module, op, result);
2800
206
    }
2801
2802
160
    if ( options.noCompare == false ) {
2803
60
        compare(operations, results, data, size);
2804
60
    }
2805
160
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
133
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
133
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
133
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.89k
    do {
2691
2.89k
        auto op = getOp(&parentDs, data, size);
2692
2.89k
        auto module = getModule(parentDs);
2693
2.89k
        if ( module == nullptr ) {
2694
2.65k
            continue;
2695
2.65k
        }
2696
2697
237
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
237
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.89k
    } while ( parentDs.Get<bool>() == true );
2704
2705
133
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
129
#if 1
2711
129
    {
2712
129
        std::set<uint64_t> moduleIDs;
2713
129
        for (const auto& m : modules ) {
2714
84
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
84
            moduleIDs.insert(moduleID);
2722
84
        }
2723
2724
129
        std::set<uint64_t> operationModuleIDs;
2725
129
        for (const auto& op : operations) {
2726
117
            operationModuleIDs.insert(op.first->ID);
2727
117
        }
2728
2729
129
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
129
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
129
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
129
        for (const auto& id : addModuleIDs) {
2734
31
            operations.push_back({ modules.at(id), operations[0].second});
2735
31
        }
2736
129
    }
2737
129
#endif
2738
2739
129
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
129
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
277
    for (size_t i = 0; i < operations.size(); i++) {
2747
148
        auto& operation = operations[i];
2748
2749
148
        auto& module = operation.first;
2750
148
        auto& op = operation.second;
2751
2752
148
        if ( i > 0 ) {
2753
106
            auto& prevModule = operations[i-1].first;
2754
106
            auto& prevOp = operations[i].second;
2755
2756
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
58
                auto& curModifier = op.modifier.GetVectorPtr();
2758
58
                if ( curModifier.size() == 0 ) {
2759
17.9k
                    for (size_t j = 0; j < 512; j++) {
2760
17.9k
                        curModifier.push_back(1);
2761
17.9k
                    }
2762
35
                } else {
2763
257
                    for (auto& c : curModifier) {
2764
257
                        c++;
2765
257
                    }
2766
23
                }
2767
58
            }
2768
106
        }
2769
2770
148
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
148
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
148
        const auto& result = results.back();
2777
2778
148
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
148
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
148
        if ( options.disableTests == false ) {
2796
148
            tests::test(op, result.second);
2797
148
        }
2798
2799
148
        postprocess(module, op, result);
2800
148
    }
2801
2802
129
    if ( options.noCompare == false ) {
2803
42
        compare(operations, results, data, size);
2804
42
    }
2805
129
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
139
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
139
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
139
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.70k
    do {
2691
2.70k
        auto op = getOp(&parentDs, data, size);
2692
2.70k
        auto module = getModule(parentDs);
2693
2.70k
        if ( module == nullptr ) {
2694
2.51k
            continue;
2695
2.51k
        }
2696
2697
185
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
185
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.69k
    } while ( parentDs.Get<bool>() == true );
2704
2705
139
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
131
#if 1
2711
131
    {
2712
131
        std::set<uint64_t> moduleIDs;
2713
131
        for (const auto& m : modules ) {
2714
62
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
62
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
62
            moduleIDs.insert(moduleID);
2722
62
        }
2723
2724
131
        std::set<uint64_t> operationModuleIDs;
2725
131
        for (const auto& op : operations) {
2726
95
            operationModuleIDs.insert(op.first->ID);
2727
95
        }
2728
2729
131
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
131
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
131
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
131
        for (const auto& id : addModuleIDs) {
2734
21
            operations.push_back({ modules.at(id), operations[0].second});
2735
21
        }
2736
131
    }
2737
131
#endif
2738
2739
131
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
131
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
247
    for (size_t i = 0; i < operations.size(); i++) {
2747
116
        auto& operation = operations[i];
2748
2749
116
        auto& module = operation.first;
2750
116
        auto& op = operation.second;
2751
2752
116
        if ( i > 0 ) {
2753
85
            auto& prevModule = operations[i-1].first;
2754
85
            auto& prevOp = operations[i].second;
2755
2756
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
46
                auto& curModifier = op.modifier.GetVectorPtr();
2758
46
                if ( curModifier.size() == 0 ) {
2759
9.74k
                    for (size_t j = 0; j < 512; j++) {
2760
9.72k
                        curModifier.push_back(1);
2761
9.72k
                    }
2762
27
                } else {
2763
251
                    for (auto& c : curModifier) {
2764
251
                        c++;
2765
251
                    }
2766
27
                }
2767
46
            }
2768
85
        }
2769
2770
116
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
116
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
116
        const auto& result = results.back();
2777
2778
116
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
116
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
116
        if ( options.disableTests == false ) {
2796
116
            tests::test(op, result.second);
2797
116
        }
2798
2799
116
        postprocess(module, op, result);
2800
116
    }
2801
2802
131
    if ( options.noCompare == false ) {
2803
31
        compare(operations, results, data, size);
2804
31
    }
2805
131
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
122
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
122
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
122
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.30k
    do {
2691
2.30k
        auto op = getOp(&parentDs, data, size);
2692
2.30k
        auto module = getModule(parentDs);
2693
2.30k
        if ( module == nullptr ) {
2694
2.10k
            continue;
2695
2.10k
        }
2696
2697
199
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
199
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.29k
    } while ( parentDs.Get<bool>() == true );
2704
2705
122
    if ( operations.empty() == true ) {
2706
8
        return;
2707
8
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
114
#if 1
2711
114
    {
2712
114
        std::set<uint64_t> moduleIDs;
2713
114
        for (const auto& m : modules ) {
2714
82
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
82
            moduleIDs.insert(moduleID);
2722
82
        }
2723
2724
114
        std::set<uint64_t> operationModuleIDs;
2725
114
        for (const auto& op : operations) {
2726
111
            operationModuleIDs.insert(op.first->ID);
2727
111
        }
2728
2729
114
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
114
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
114
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
114
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
114
    }
2737
114
#endif
2738
2739
114
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
114
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
254
    for (size_t i = 0; i < operations.size(); i++) {
2747
140
        auto& operation = operations[i];
2748
2749
140
        auto& module = operation.first;
2750
140
        auto& op = operation.second;
2751
2752
140
        if ( i > 0 ) {
2753
99
            auto& prevModule = operations[i-1].first;
2754
99
            auto& prevOp = operations[i].second;
2755
2756
99
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
49
                auto& curModifier = op.modifier.GetVectorPtr();
2758
49
                if ( curModifier.size() == 0 ) {
2759
11.7k
                    for (size_t j = 0; j < 512; j++) {
2760
11.7k
                        curModifier.push_back(1);
2761
11.7k
                    }
2762
26
                } else {
2763
259
                    for (auto& c : curModifier) {
2764
259
                        c++;
2765
259
                    }
2766
26
                }
2767
49
            }
2768
99
        }
2769
2770
140
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
140
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
140
        const auto& result = results.back();
2777
2778
140
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
140
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
140
        if ( options.disableTests == false ) {
2796
140
            tests::test(op, result.second);
2797
140
        }
2798
2799
140
        postprocess(module, op, result);
2800
140
    }
2801
2802
114
    if ( options.noCompare == false ) {
2803
41
        compare(operations, results, data, size);
2804
41
    }
2805
114
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
140
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
140
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
140
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.15k
    do {
2691
2.15k
        auto op = getOp(&parentDs, data, size);
2692
2.15k
        auto module = getModule(parentDs);
2693
2.15k
        if ( module == nullptr ) {
2694
1.96k
            continue;
2695
1.96k
        }
2696
2697
188
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
188
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.15k
    } while ( parentDs.Get<bool>() == true );
2704
2705
140
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
134
#if 1
2711
134
    {
2712
134
        std::set<uint64_t> moduleIDs;
2713
134
        for (const auto& m : modules ) {
2714
66
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
66
            moduleIDs.insert(moduleID);
2722
66
        }
2723
2724
134
        std::set<uint64_t> operationModuleIDs;
2725
134
        for (const auto& op : operations) {
2726
100
            operationModuleIDs.insert(op.first->ID);
2727
100
        }
2728
2729
134
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
134
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
134
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
134
        for (const auto& id : addModuleIDs) {
2734
22
            operations.push_back({ modules.at(id), operations[0].second});
2735
22
        }
2736
134
    }
2737
134
#endif
2738
2739
134
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
134
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
256
    for (size_t i = 0; i < operations.size(); i++) {
2747
122
        auto& operation = operations[i];
2748
2749
122
        auto& module = operation.first;
2750
122
        auto& op = operation.second;
2751
2752
122
        if ( i > 0 ) {
2753
89
            auto& prevModule = operations[i-1].first;
2754
89
            auto& prevOp = operations[i].second;
2755
2756
89
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
50
                auto& curModifier = op.modifier.GetVectorPtr();
2758
50
                if ( curModifier.size() == 0 ) {
2759
11.7k
                    for (size_t j = 0; j < 512; j++) {
2760
11.7k
                        curModifier.push_back(1);
2761
11.7k
                    }
2762
27
                } else {
2763
281
                    for (auto& c : curModifier) {
2764
281
                        c++;
2765
281
                    }
2766
27
                }
2767
50
            }
2768
89
        }
2769
2770
122
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
122
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
122
        const auto& result = results.back();
2777
2778
122
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
122
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
122
        if ( options.disableTests == false ) {
2796
122
            tests::test(op, result.second);
2797
122
        }
2798
2799
122
        postprocess(module, op, result);
2800
122
    }
2801
2802
134
    if ( options.noCompare == false ) {
2803
33
        compare(operations, results, data, size);
2804
33
    }
2805
134
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
219
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
219
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
219
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.01k
    do {
2691
2.01k
        auto op = getOp(&parentDs, data, size);
2692
2.01k
        auto module = getModule(parentDs);
2693
2.01k
        if ( module == nullptr ) {
2694
1.81k
            continue;
2695
1.81k
        }
2696
2697
195
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
195
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.00k
    } while ( parentDs.Get<bool>() == true );
2704
2705
219
    if ( operations.empty() == true ) {
2706
13
        return;
2707
13
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
206
#if 1
2711
206
    {
2712
206
        std::set<uint64_t> moduleIDs;
2713
206
        for (const auto& m : modules ) {
2714
72
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
72
            moduleIDs.insert(moduleID);
2722
72
        }
2723
2724
206
        std::set<uint64_t> operationModuleIDs;
2725
206
        for (const auto& op : operations) {
2726
103
            operationModuleIDs.insert(op.first->ID);
2727
103
        }
2728
2729
206
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
206
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
206
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
206
        for (const auto& id : addModuleIDs) {
2734
25
            operations.push_back({ modules.at(id), operations[0].second});
2735
25
        }
2736
206
    }
2737
206
#endif
2738
2739
206
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
206
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
334
    for (size_t i = 0; i < operations.size(); i++) {
2747
128
        auto& operation = operations[i];
2748
2749
128
        auto& module = operation.first;
2750
128
        auto& op = operation.second;
2751
2752
128
        if ( i > 0 ) {
2753
92
            auto& prevModule = operations[i-1].first;
2754
92
            auto& prevOp = operations[i].second;
2755
2756
92
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
50
                auto& curModifier = op.modifier.GetVectorPtr();
2758
50
                if ( curModifier.size() == 0 ) {
2759
11.7k
                    for (size_t j = 0; j < 512; j++) {
2760
11.7k
                        curModifier.push_back(1);
2761
11.7k
                    }
2762
27
                } else {
2763
246
                    for (auto& c : curModifier) {
2764
246
                        c++;
2765
246
                    }
2766
27
                }
2767
50
            }
2768
92
        }
2769
2770
128
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
128
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
128
        const auto& result = results.back();
2777
2778
128
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
128
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
128
        if ( options.disableTests == false ) {
2796
128
            tests::test(op, result.second);
2797
128
        }
2798
2799
128
        postprocess(module, op, result);
2800
128
    }
2801
2802
206
    if ( options.noCompare == false ) {
2803
36
        compare(operations, results, data, size);
2804
36
    }
2805
206
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
211
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
211
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
211
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.88k
    do {
2691
1.88k
        auto op = getOp(&parentDs, data, size);
2692
1.88k
        auto module = getModule(parentDs);
2693
1.88k
        if ( module == nullptr ) {
2694
1.64k
            continue;
2695
1.64k
        }
2696
2697
240
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
240
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
1.88k
    } while ( parentDs.Get<bool>() == true );
2704
2705
211
    if ( operations.empty() == true ) {
2706
21
        return;
2707
21
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
190
#if 1
2711
190
    {
2712
190
        std::set<uint64_t> moduleIDs;
2713
190
        for (const auto& m : modules ) {
2714
114
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
114
            moduleIDs.insert(moduleID);
2722
114
        }
2723
2724
190
        std::set<uint64_t> operationModuleIDs;
2725
190
        for (const auto& op : operations) {
2726
133
            operationModuleIDs.insert(op.first->ID);
2727
133
        }
2728
2729
190
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
190
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
190
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
190
        for (const auto& id : addModuleIDs) {
2734
46
            operations.push_back({ modules.at(id), operations[0].second});
2735
46
        }
2736
190
    }
2737
190
#endif
2738
2739
190
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
190
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
369
    for (size_t i = 0; i < operations.size(); i++) {
2747
179
        auto& operation = operations[i];
2748
2749
179
        auto& module = operation.first;
2750
179
        auto& op = operation.second;
2751
2752
179
        if ( i > 0 ) {
2753
122
            auto& prevModule = operations[i-1].first;
2754
122
            auto& prevOp = operations[i].second;
2755
2756
122
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
59
                auto& curModifier = op.modifier.GetVectorPtr();
2758
59
                if ( curModifier.size() == 0 ) {
2759
19.4k
                    for (size_t j = 0; j < 512; j++) {
2760
19.4k
                        curModifier.push_back(1);
2761
19.4k
                    }
2762
38
                } else {
2763
308
                    for (auto& c : curModifier) {
2764
308
                        c++;
2765
308
                    }
2766
21
                }
2767
59
            }
2768
122
        }
2769
2770
179
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
179
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
179
        const auto& result = results.back();
2777
2778
179
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
179
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
179
        if ( options.disableTests == false ) {
2796
179
            tests::test(op, result.second);
2797
179
        }
2798
2799
179
        postprocess(module, op, result);
2800
179
    }
2801
2802
190
    if ( options.noCompare == false ) {
2803
57
        compare(operations, results, data, size);
2804
57
    }
2805
190
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
122
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
122
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
122
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.26k
    do {
2691
2.26k
        auto op = getOp(&parentDs, data, size);
2692
2.26k
        auto module = getModule(parentDs);
2693
2.26k
        if ( module == nullptr ) {
2694
2.07k
            continue;
2695
2.07k
        }
2696
2697
191
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
191
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.25k
    } while ( parentDs.Get<bool>() == true );
2704
2705
122
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
120
#if 1
2711
120
    {
2712
120
        std::set<uint64_t> moduleIDs;
2713
120
        for (const auto& m : modules ) {
2714
74
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
74
            moduleIDs.insert(moduleID);
2722
74
        }
2723
2724
120
        std::set<uint64_t> operationModuleIDs;
2725
120
        for (const auto& op : operations) {
2726
108
            operationModuleIDs.insert(op.first->ID);
2727
108
        }
2728
2729
120
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
120
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
120
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
120
        for (const auto& id : addModuleIDs) {
2734
25
            operations.push_back({ modules.at(id), operations[0].second});
2735
25
        }
2736
120
    }
2737
120
#endif
2738
2739
120
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
120
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
253
    for (size_t i = 0; i < operations.size(); i++) {
2747
133
        auto& operation = operations[i];
2748
2749
133
        auto& module = operation.first;
2750
133
        auto& op = operation.second;
2751
2752
133
        if ( i > 0 ) {
2753
96
            auto& prevModule = operations[i-1].first;
2754
96
            auto& prevOp = operations[i].second;
2755
2756
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
50
                auto& curModifier = op.modifier.GetVectorPtr();
2758
50
                if ( curModifier.size() == 0 ) {
2759
11.2k
                    for (size_t j = 0; j < 512; j++) {
2760
11.2k
                        curModifier.push_back(1);
2761
11.2k
                    }
2762
28
                } else {
2763
257
                    for (auto& c : curModifier) {
2764
257
                        c++;
2765
257
                    }
2766
28
                }
2767
50
            }
2768
96
        }
2769
2770
133
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
133
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
133
        const auto& result = results.back();
2777
2778
133
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
133
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
133
        if ( options.disableTests == false ) {
2796
133
            tests::test(op, result.second);
2797
133
        }
2798
2799
133
        postprocess(module, op, result);
2800
133
    }
2801
2802
120
    if ( options.noCompare == false ) {
2803
37
        compare(operations, results, data, size);
2804
37
    }
2805
120
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
199
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
199
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
199
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.66k
    do {
2691
1.66k
        auto op = getOp(&parentDs, data, size);
2692
1.66k
        auto module = getModule(parentDs);
2693
1.66k
        if ( module == nullptr ) {
2694
1.47k
            continue;
2695
1.47k
        }
2696
2697
186
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
186
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
1.65k
    } while ( parentDs.Get<bool>() == true );
2704
2705
199
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
195
#if 1
2711
195
    {
2712
195
        std::set<uint64_t> moduleIDs;
2713
195
        for (const auto& m : modules ) {
2714
80
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
80
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
80
            moduleIDs.insert(moduleID);
2722
80
        }
2723
2724
195
        std::set<uint64_t> operationModuleIDs;
2725
195
        for (const auto& op : operations) {
2726
107
            operationModuleIDs.insert(op.first->ID);
2727
107
        }
2728
2729
195
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
195
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
195
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
195
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
195
    }
2737
195
#endif
2738
2739
195
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
195
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
331
    for (size_t i = 0; i < operations.size(); i++) {
2747
136
        auto& operation = operations[i];
2748
2749
136
        auto& module = operation.first;
2750
136
        auto& op = operation.second;
2751
2752
136
        if ( i > 0 ) {
2753
96
            auto& prevModule = operations[i-1].first;
2754
96
            auto& prevOp = operations[i].second;
2755
2756
96
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
50
                auto& curModifier = op.modifier.GetVectorPtr();
2758
50
                if ( curModifier.size() == 0 ) {
2759
15.9k
                    for (size_t j = 0; j < 512; j++) {
2760
15.8k
                        curModifier.push_back(1);
2761
15.8k
                    }
2762
31
                } else {
2763
230
                    for (auto& c : curModifier) {
2764
230
                        c++;
2765
230
                    }
2766
19
                }
2767
50
            }
2768
96
        }
2769
2770
136
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
136
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
136
        const auto& result = results.back();
2777
2778
136
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
136
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
136
        if ( options.disableTests == false ) {
2796
136
            tests::test(op, result.second);
2797
136
        }
2798
2799
136
        postprocess(module, op, result);
2800
136
    }
2801
2802
195
    if ( options.noCompare == false ) {
2803
40
        compare(operations, results, data, size);
2804
40
    }
2805
195
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
139
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
139
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
139
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.95k
    do {
2691
1.95k
        auto op = getOp(&parentDs, data, size);
2692
1.95k
        auto module = getModule(parentDs);
2693
1.95k
        if ( module == nullptr ) {
2694
1.75k
            continue;
2695
1.75k
        }
2696
2697
206
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
206
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
1.95k
    } while ( parentDs.Get<bool>() == true );
2704
2705
139
    if ( operations.empty() == true ) {
2706
7
        return;
2707
7
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
132
#if 1
2711
132
    {
2712
132
        std::set<uint64_t> moduleIDs;
2713
132
        for (const auto& m : modules ) {
2714
66
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
66
            moduleIDs.insert(moduleID);
2722
66
        }
2723
2724
132
        std::set<uint64_t> operationModuleIDs;
2725
132
        for (const auto& op : operations) {
2726
100
            operationModuleIDs.insert(op.first->ID);
2727
100
        }
2728
2729
132
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
132
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
132
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
132
        for (const auto& id : addModuleIDs) {
2734
22
            operations.push_back({ modules.at(id), operations[0].second});
2735
22
        }
2736
132
    }
2737
132
#endif
2738
2739
132
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
132
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
254
    for (size_t i = 0; i < operations.size(); i++) {
2747
122
        auto& operation = operations[i];
2748
2749
122
        auto& module = operation.first;
2750
122
        auto& op = operation.second;
2751
2752
122
        if ( i > 0 ) {
2753
89
            auto& prevModule = operations[i-1].first;
2754
89
            auto& prevOp = operations[i].second;
2755
2756
89
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
48
                auto& curModifier = op.modifier.GetVectorPtr();
2758
48
                if ( curModifier.size() == 0 ) {
2759
11.2k
                    for (size_t j = 0; j < 512; j++) {
2760
11.2k
                        curModifier.push_back(1);
2761
11.2k
                    }
2762
26
                } else {
2763
266
                    for (auto& c : curModifier) {
2764
266
                        c++;
2765
266
                    }
2766
26
                }
2767
48
            }
2768
89
        }
2769
2770
122
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
122
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
122
        const auto& result = results.back();
2777
2778
122
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
122
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
122
        if ( options.disableTests == false ) {
2796
122
            tests::test(op, result.second);
2797
122
        }
2798
2799
122
        postprocess(module, op, result);
2800
122
    }
2801
2802
132
    if ( options.noCompare == false ) {
2803
33
        compare(operations, results, data, size);
2804
33
    }
2805
132
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
135
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
135
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
135
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.77k
    do {
2691
1.77k
        auto op = getOp(&parentDs, data, size);
2692
1.77k
        auto module = getModule(parentDs);
2693
1.77k
        if ( module == nullptr ) {
2694
1.60k
            continue;
2695
1.60k
        }
2696
2697
172
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
172
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
1.76k
    } while ( parentDs.Get<bool>() == true );
2704
2705
135
    if ( operations.empty() == true ) {
2706
11
        return;
2707
11
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
124
#if 1
2711
124
    {
2712
124
        std::set<uint64_t> moduleIDs;
2713
124
        for (const auto& m : modules ) {
2714
66
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
66
            moduleIDs.insert(moduleID);
2722
66
        }
2723
2724
124
        std::set<uint64_t> operationModuleIDs;
2725
124
        for (const auto& op : operations) {
2726
96
            operationModuleIDs.insert(op.first->ID);
2727
96
        }
2728
2729
124
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
124
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
124
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
124
        for (const auto& id : addModuleIDs) {
2734
22
            operations.push_back({ modules.at(id), operations[0].second});
2735
22
        }
2736
124
    }
2737
124
#endif
2738
2739
124
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
124
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
242
    for (size_t i = 0; i < operations.size(); i++) {
2747
118
        auto& operation = operations[i];
2748
2749
118
        auto& module = operation.first;
2750
118
        auto& op = operation.second;
2751
2752
118
        if ( i > 0 ) {
2753
85
            auto& prevModule = operations[i-1].first;
2754
85
            auto& prevOp = operations[i].second;
2755
2756
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
46
                auto& curModifier = op.modifier.GetVectorPtr();
2758
46
                if ( curModifier.size() == 0 ) {
2759
13.3k
                    for (size_t j = 0; j < 512; j++) {
2760
13.3k
                        curModifier.push_back(1);
2761
13.3k
                    }
2762
26
                } else {
2763
242
                    for (auto& c : curModifier) {
2764
242
                        c++;
2765
242
                    }
2766
20
                }
2767
46
            }
2768
85
        }
2769
2770
118
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
118
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
118
        const auto& result = results.back();
2777
2778
118
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
118
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
118
        if ( options.disableTests == false ) {
2796
118
            tests::test(op, result.second);
2797
118
        }
2798
2799
118
        postprocess(module, op, result);
2800
118
    }
2801
2802
124
    if ( options.noCompare == false ) {
2803
33
        compare(operations, results, data, size);
2804
33
    }
2805
124
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
141
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
141
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
141
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.19k
    do {
2691
2.19k
        auto op = getOp(&parentDs, data, size);
2692
2.19k
        auto module = getModule(parentDs);
2693
2.19k
        if ( module == nullptr ) {
2694
1.98k
            continue;
2695
1.98k
        }
2696
2697
212
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
212
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.18k
    } while ( parentDs.Get<bool>() == true );
2704
2705
141
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
137
#if 1
2711
137
    {
2712
137
        std::set<uint64_t> moduleIDs;
2713
137
        for (const auto& m : modules ) {
2714
76
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
76
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
76
            moduleIDs.insert(moduleID);
2722
76
        }
2723
2724
137
        std::set<uint64_t> operationModuleIDs;
2725
137
        for (const auto& op : operations) {
2726
113
            operationModuleIDs.insert(op.first->ID);
2727
113
        }
2728
2729
137
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
137
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
137
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
137
        for (const auto& id : addModuleIDs) {
2734
27
            operations.push_back({ modules.at(id), operations[0].second});
2735
27
        }
2736
137
    }
2737
137
#endif
2738
2739
137
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
137
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
277
    for (size_t i = 0; i < operations.size(); i++) {
2747
140
        auto& operation = operations[i];
2748
2749
140
        auto& module = operation.first;
2750
140
        auto& op = operation.second;
2751
2752
140
        if ( i > 0 ) {
2753
102
            auto& prevModule = operations[i-1].first;
2754
102
            auto& prevOp = operations[i].second;
2755
2756
102
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
58
                auto& curModifier = op.modifier.GetVectorPtr();
2758
58
                if ( curModifier.size() == 0 ) {
2759
19.4k
                    for (size_t j = 0; j < 512; j++) {
2760
19.4k
                        curModifier.push_back(1);
2761
19.4k
                    }
2762
38
                } else {
2763
286
                    for (auto& c : curModifier) {
2764
286
                        c++;
2765
286
                    }
2766
20
                }
2767
58
            }
2768
102
        }
2769
2770
140
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
140
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
140
        const auto& result = results.back();
2777
2778
140
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
140
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
140
        if ( options.disableTests == false ) {
2796
140
            tests::test(op, result.second);
2797
140
        }
2798
2799
140
        postprocess(module, op, result);
2800
140
    }
2801
2802
137
    if ( options.noCompare == false ) {
2803
38
        compare(operations, results, data, size);
2804
38
    }
2805
137
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
169
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
169
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
169
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.31k
    do {
2691
2.31k
        auto op = getOp(&parentDs, data, size);
2692
2.31k
        auto module = getModule(parentDs);
2693
2.31k
        if ( module == nullptr ) {
2694
2.06k
            continue;
2695
2.06k
        }
2696
2697
256
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
256
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.31k
    } while ( parentDs.Get<bool>() == true );
2704
2705
169
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
168
#if 1
2711
168
    {
2712
168
        std::set<uint64_t> moduleIDs;
2713
168
        for (const auto& m : modules ) {
2714
104
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
104
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
104
            moduleIDs.insert(moduleID);
2722
104
        }
2723
2724
168
        std::set<uint64_t> operationModuleIDs;
2725
168
        for (const auto& op : operations) {
2726
129
            operationModuleIDs.insert(op.first->ID);
2727
129
        }
2728
2729
168
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
168
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
168
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
168
        for (const auto& id : addModuleIDs) {
2734
41
            operations.push_back({ modules.at(id), operations[0].second});
2735
41
        }
2736
168
    }
2737
168
#endif
2738
2739
168
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
168
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
338
    for (size_t i = 0; i < operations.size(); i++) {
2747
170
        auto& operation = operations[i];
2748
2749
170
        auto& module = operation.first;
2750
170
        auto& op = operation.second;
2751
2752
170
        if ( i > 0 ) {
2753
118
            auto& prevModule = operations[i-1].first;
2754
118
            auto& prevOp = operations[i].second;
2755
2756
118
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
60
                auto& curModifier = op.modifier.GetVectorPtr();
2758
60
                if ( curModifier.size() == 0 ) {
2759
20.0k
                    for (size_t j = 0; j < 512; j++) {
2760
19.9k
                        curModifier.push_back(1);
2761
19.9k
                    }
2762
39
                } else {
2763
266
                    for (auto& c : curModifier) {
2764
266
                        c++;
2765
266
                    }
2766
21
                }
2767
60
            }
2768
118
        }
2769
2770
170
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
170
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
170
        const auto& result = results.back();
2777
2778
170
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
170
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
170
        if ( options.disableTests == false ) {
2796
170
            tests::test(op, result.second);
2797
170
        }
2798
2799
170
        postprocess(module, op, result);
2800
170
    }
2801
2802
168
    if ( options.noCompare == false ) {
2803
52
        compare(operations, results, data, size);
2804
52
    }
2805
168
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
135
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
135
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
135
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.90k
    do {
2691
2.90k
        auto op = getOp(&parentDs, data, size);
2692
2.90k
        auto module = getModule(parentDs);
2693
2.90k
        if ( module == nullptr ) {
2694
2.69k
            continue;
2695
2.69k
        }
2696
2697
214
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
214
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.89k
    } while ( parentDs.Get<bool>() == true );
2704
2705
135
    if ( operations.empty() == true ) {
2706
9
        return;
2707
9
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
126
#if 1
2711
126
    {
2712
126
        std::set<uint64_t> moduleIDs;
2713
126
        for (const auto& m : modules ) {
2714
82
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
82
            moduleIDs.insert(moduleID);
2722
82
        }
2723
2724
126
        std::set<uint64_t> operationModuleIDs;
2725
126
        for (const auto& op : operations) {
2726
110
            operationModuleIDs.insert(op.first->ID);
2727
110
        }
2728
2729
126
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
126
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
126
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
126
        for (const auto& id : addModuleIDs) {
2734
29
            operations.push_back({ modules.at(id), operations[0].second});
2735
29
        }
2736
126
    }
2737
126
#endif
2738
2739
126
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
126
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
265
    for (size_t i = 0; i < operations.size(); i++) {
2747
139
        auto& operation = operations[i];
2748
2749
139
        auto& module = operation.first;
2750
139
        auto& op = operation.second;
2751
2752
139
        if ( i > 0 ) {
2753
98
            auto& prevModule = operations[i-1].first;
2754
98
            auto& prevOp = operations[i].second;
2755
2756
98
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
51
                auto& curModifier = op.modifier.GetVectorPtr();
2758
51
                if ( curModifier.size() == 0 ) {
2759
12.8k
                    for (size_t j = 0; j < 512; j++) {
2760
12.8k
                        curModifier.push_back(1);
2761
12.8k
                    }
2762
26
                } else {
2763
285
                    for (auto& c : curModifier) {
2764
285
                        c++;
2765
285
                    }
2766
26
                }
2767
51
            }
2768
98
        }
2769
2770
139
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
139
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
139
        const auto& result = results.back();
2777
2778
139
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
139
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
139
        if ( options.disableTests == false ) {
2796
139
            tests::test(op, result.second);
2797
139
        }
2798
2799
139
        postprocess(module, op, result);
2800
139
    }
2801
2802
126
    if ( options.noCompare == false ) {
2803
41
        compare(operations, results, data, size);
2804
41
    }
2805
126
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
167
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
167
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
167
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.08k
    do {
2691
2.08k
        auto op = getOp(&parentDs, data, size);
2692
2.08k
        auto module = getModule(parentDs);
2693
2.08k
        if ( module == nullptr ) {
2694
1.84k
            continue;
2695
1.84k
        }
2696
2697
236
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
236
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.07k
    } while ( parentDs.Get<bool>() == true );
2704
2705
167
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
162
#if 1
2711
162
    {
2712
162
        std::set<uint64_t> moduleIDs;
2713
162
        for (const auto& m : modules ) {
2714
132
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
132
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
132
            moduleIDs.insert(moduleID);
2722
132
        }
2723
2724
162
        std::set<uint64_t> operationModuleIDs;
2725
162
        for (const auto& op : operations) {
2726
144
            operationModuleIDs.insert(op.first->ID);
2727
144
        }
2728
2729
162
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
162
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
162
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
162
        for (const auto& id : addModuleIDs) {
2734
55
            operations.push_back({ modules.at(id), operations[0].second});
2735
55
        }
2736
162
    }
2737
162
#endif
2738
2739
162
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
162
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
361
    for (size_t i = 0; i < operations.size(); i++) {
2747
199
        auto& operation = operations[i];
2748
2749
199
        auto& module = operation.first;
2750
199
        auto& op = operation.second;
2751
2752
199
        if ( i > 0 ) {
2753
133
            auto& prevModule = operations[i-1].first;
2754
133
            auto& prevOp = operations[i].second;
2755
2756
133
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
61
                auto& curModifier = op.modifier.GetVectorPtr();
2758
61
                if ( curModifier.size() == 0 ) {
2759
15.9k
                    for (size_t j = 0; j < 512; j++) {
2760
15.8k
                        curModifier.push_back(1);
2761
15.8k
                    }
2762
31
                } else {
2763
236
                    for (auto& c : curModifier) {
2764
236
                        c++;
2765
236
                    }
2766
30
                }
2767
61
            }
2768
133
        }
2769
2770
199
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
199
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
199
        const auto& result = results.back();
2777
2778
199
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
199
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
199
        if ( options.disableTests == false ) {
2796
199
            tests::test(op, result.second);
2797
199
        }
2798
2799
199
        postprocess(module, op, result);
2800
199
    }
2801
2802
162
    if ( options.noCompare == false ) {
2803
66
        compare(operations, results, data, size);
2804
66
    }
2805
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
149
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
149
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
149
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.73k
    do {
2691
1.73k
        auto op = getOp(&parentDs, data, size);
2692
1.73k
        auto module = getModule(parentDs);
2693
1.73k
        if ( module == nullptr ) {
2694
1.52k
            continue;
2695
1.52k
        }
2696
2697
204
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
204
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
1.72k
    } while ( parentDs.Get<bool>() == true );
2704
2705
149
    if ( operations.empty() == true ) {
2706
6
        return;
2707
6
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
143
#if 1
2711
143
    {
2712
143
        std::set<uint64_t> moduleIDs;
2713
143
        for (const auto& m : modules ) {
2714
74
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
74
            moduleIDs.insert(moduleID);
2722
74
        }
2723
2724
143
        std::set<uint64_t> operationModuleIDs;
2725
143
        for (const auto& op : operations) {
2726
98
            operationModuleIDs.insert(op.first->ID);
2727
98
        }
2728
2729
143
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
143
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
143
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
143
        for (const auto& id : addModuleIDs) {
2734
26
            operations.push_back({ modules.at(id), operations[0].second});
2735
26
        }
2736
143
    }
2737
143
#endif
2738
2739
143
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
143
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
267
    for (size_t i = 0; i < operations.size(); i++) {
2747
124
        auto& operation = operations[i];
2748
2749
124
        auto& module = operation.first;
2750
124
        auto& op = operation.second;
2751
2752
124
        if ( i > 0 ) {
2753
87
            auto& prevModule = operations[i-1].first;
2754
87
            auto& prevOp = operations[i].second;
2755
2756
87
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
44
                auto& curModifier = op.modifier.GetVectorPtr();
2758
44
                if ( curModifier.size() == 0 ) {
2759
13.3k
                    for (size_t j = 0; j < 512; j++) {
2760
13.3k
                        curModifier.push_back(1);
2761
13.3k
                    }
2762
26
                } else {
2763
355
                    for (auto& c : curModifier) {
2764
355
                        c++;
2765
355
                    }
2766
18
                }
2767
44
            }
2768
87
        }
2769
2770
124
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
124
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
124
        const auto& result = results.back();
2777
2778
124
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
124
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
124
        if ( options.disableTests == false ) {
2796
124
            tests::test(op, result.second);
2797
124
        }
2798
2799
124
        postprocess(module, op, result);
2800
124
    }
2801
2802
143
    if ( options.noCompare == false ) {
2803
37
        compare(operations, results, data, size);
2804
37
    }
2805
143
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
206
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
206
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
206
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.67k
    do {
2691
2.67k
        auto op = getOp(&parentDs, data, size);
2692
2.67k
        auto module = getModule(parentDs);
2693
2.67k
        if ( module == nullptr ) {
2694
2.40k
            continue;
2695
2.40k
        }
2696
2697
273
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
273
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.67k
    } while ( parentDs.Get<bool>() == true );
2704
2705
206
    if ( operations.empty() == true ) {
2706
11
        return;
2707
11
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
195
#if 1
2711
195
    {
2712
195
        std::set<uint64_t> moduleIDs;
2713
195
        for (const auto& m : modules ) {
2714
140
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
140
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
140
            moduleIDs.insert(moduleID);
2722
140
        }
2723
2724
195
        std::set<uint64_t> operationModuleIDs;
2725
195
        for (const auto& op : operations) {
2726
158
            operationModuleIDs.insert(op.first->ID);
2727
158
        }
2728
2729
195
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
195
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
195
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
195
        for (const auto& id : addModuleIDs) {
2734
59
            operations.push_back({ modules.at(id), operations[0].second});
2735
59
        }
2736
195
    }
2737
195
#endif
2738
2739
195
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
195
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
412
    for (size_t i = 0; i < operations.size(); i++) {
2747
217
        auto& operation = operations[i];
2748
2749
217
        auto& module = operation.first;
2750
217
        auto& op = operation.second;
2751
2752
217
        if ( i > 0 ) {
2753
147
            auto& prevModule = operations[i-1].first;
2754
147
            auto& prevOp = operations[i].second;
2755
2756
147
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
71
                auto& curModifier = op.modifier.GetVectorPtr();
2758
71
                if ( curModifier.size() == 0 ) {
2759
25.6k
                    for (size_t j = 0; j < 512; j++) {
2760
25.6k
                        curModifier.push_back(1);
2761
25.6k
                    }
2762
50
                } else {
2763
261
                    for (auto& c : curModifier) {
2764
261
                        c++;
2765
261
                    }
2766
21
                }
2767
71
            }
2768
147
        }
2769
2770
217
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
217
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
217
        const auto& result = results.back();
2777
2778
217
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
217
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
217
        if ( options.disableTests == false ) {
2796
217
            tests::test(op, result.second);
2797
217
        }
2798
2799
217
        postprocess(module, op, result);
2800
217
    }
2801
2802
195
    if ( options.noCompare == false ) {
2803
70
        compare(operations, results, data, size);
2804
70
    }
2805
195
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
136
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
136
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
136
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.42k
    do {
2691
2.42k
        auto op = getOp(&parentDs, data, size);
2692
2.42k
        auto module = getModule(parentDs);
2693
2.42k
        if ( module == nullptr ) {
2694
2.14k
            continue;
2695
2.14k
        }
2696
2697
277
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
277
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.41k
    } while ( parentDs.Get<bool>() == true );
2704
2705
136
    if ( operations.empty() == true ) {
2706
1
        return;
2707
1
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
135
#if 1
2711
135
    {
2712
135
        std::set<uint64_t> moduleIDs;
2713
135
        for (const auto& m : modules ) {
2714
128
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
128
            moduleIDs.insert(moduleID);
2722
128
        }
2723
2724
135
        std::set<uint64_t> operationModuleIDs;
2725
162
        for (const auto& op : operations) {
2726
162
            operationModuleIDs.insert(op.first->ID);
2727
162
        }
2728
2729
135
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
135
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
135
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
135
        for (const auto& id : addModuleIDs) {
2734
53
            operations.push_back({ modules.at(id), operations[0].second});
2735
53
        }
2736
135
    }
2737
135
#endif
2738
2739
135
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
135
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
350
    for (size_t i = 0; i < operations.size(); i++) {
2747
215
        auto& operation = operations[i];
2748
2749
215
        auto& module = operation.first;
2750
215
        auto& op = operation.second;
2751
2752
215
        if ( i > 0 ) {
2753
151
            auto& prevModule = operations[i-1].first;
2754
151
            auto& prevOp = operations[i].second;
2755
2756
151
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
81
                auto& curModifier = op.modifier.GetVectorPtr();
2758
81
                if ( curModifier.size() == 0 ) {
2759
23.0k
                    for (size_t j = 0; j < 512; j++) {
2760
23.0k
                        curModifier.push_back(1);
2761
23.0k
                    }
2762
45
                } else {
2763
257
                    for (auto& c : curModifier) {
2764
257
                        c++;
2765
257
                    }
2766
36
                }
2767
81
            }
2768
151
        }
2769
2770
215
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
215
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
215
        const auto& result = results.back();
2777
2778
215
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
215
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
215
        if ( options.disableTests == false ) {
2796
215
            tests::test(op, result.second);
2797
215
        }
2798
2799
215
        postprocess(module, op, result);
2800
215
    }
2801
2802
135
    if ( options.noCompare == false ) {
2803
64
        compare(operations, results, data, size);
2804
64
    }
2805
135
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
200
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
200
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
200
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.56k
    do {
2691
2.56k
        auto op = getOp(&parentDs, data, size);
2692
2.56k
        auto module = getModule(parentDs);
2693
2.56k
        if ( module == nullptr ) {
2694
2.30k
            continue;
2695
2.30k
        }
2696
2697
262
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
262
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.55k
    } while ( parentDs.Get<bool>() == true );
2704
2705
200
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
196
#if 1
2711
196
    {
2712
196
        std::set<uint64_t> moduleIDs;
2713
196
        for (const auto& m : modules ) {
2714
142
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
142
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
142
            moduleIDs.insert(moduleID);
2722
142
        }
2723
2724
196
        std::set<uint64_t> operationModuleIDs;
2725
196
        for (const auto& op : operations) {
2726
156
            operationModuleIDs.insert(op.first->ID);
2727
156
        }
2728
2729
196
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
196
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
196
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
196
        for (const auto& id : addModuleIDs) {
2734
60
            operations.push_back({ modules.at(id), operations[0].second});
2735
60
        }
2736
196
    }
2737
196
#endif
2738
2739
196
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
196
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
412
    for (size_t i = 0; i < operations.size(); i++) {
2747
216
        auto& operation = operations[i];
2748
2749
216
        auto& module = operation.first;
2750
216
        auto& op = operation.second;
2751
2752
216
        if ( i > 0 ) {
2753
145
            auto& prevModule = operations[i-1].first;
2754
145
            auto& prevOp = operations[i].second;
2755
2756
145
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
68
                auto& curModifier = op.modifier.GetVectorPtr();
2758
68
                if ( curModifier.size() == 0 ) {
2759
24.1k
                    for (size_t j = 0; j < 512; j++) {
2760
24.0k
                        curModifier.push_back(1);
2761
24.0k
                    }
2762
47
                } else {
2763
276
                    for (auto& c : curModifier) {
2764
276
                        c++;
2765
276
                    }
2766
21
                }
2767
68
            }
2768
145
        }
2769
2770
216
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
216
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
216
        const auto& result = results.back();
2777
2778
216
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
216
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
216
        if ( options.disableTests == false ) {
2796
216
            tests::test(op, result.second);
2797
216
        }
2798
2799
216
        postprocess(module, op, result);
2800
216
    }
2801
2802
196
    if ( options.noCompare == false ) {
2803
71
        compare(operations, results, data, size);
2804
71
    }
2805
196
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
169
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
169
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
169
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.42k
    do {
2691
2.42k
        auto op = getOp(&parentDs, data, size);
2692
2.42k
        auto module = getModule(parentDs);
2693
2.42k
        if ( module == nullptr ) {
2694
2.18k
            continue;
2695
2.18k
        }
2696
2697
241
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
241
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
2.42k
    } while ( parentDs.Get<bool>() == true );
2704
2705
169
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
167
#if 1
2711
167
    {
2712
167
        std::set<uint64_t> moduleIDs;
2713
167
        for (const auto& m : modules ) {
2714
128
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
128
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
128
            moduleIDs.insert(moduleID);
2722
128
        }
2723
2724
167
        std::set<uint64_t> operationModuleIDs;
2725
167
        for (const auto& op : operations) {
2726
137
            operationModuleIDs.insert(op.first->ID);
2727
137
        }
2728
2729
167
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
167
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
167
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
167
        for (const auto& id : addModuleIDs) {
2734
53
            operations.push_back({ modules.at(id), operations[0].second});
2735
53
        }
2736
167
    }
2737
167
#endif
2738
2739
167
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
167
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
357
    for (size_t i = 0; i < operations.size(); i++) {
2747
190
        auto& operation = operations[i];
2748
2749
190
        auto& module = operation.first;
2750
190
        auto& op = operation.second;
2751
2752
190
        if ( i > 0 ) {
2753
126
            auto& prevModule = operations[i-1].first;
2754
126
            auto& prevOp = operations[i].second;
2755
2756
126
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
56
                auto& curModifier = op.modifier.GetVectorPtr();
2758
56
                if ( curModifier.size() == 0 ) {
2759
18.9k
                    for (size_t j = 0; j < 512; j++) {
2760
18.9k
                        curModifier.push_back(1);
2761
18.9k
                    }
2762
37
                } else {
2763
276
                    for (auto& c : curModifier) {
2764
276
                        c++;
2765
276
                    }
2766
19
                }
2767
56
            }
2768
126
        }
2769
2770
190
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
190
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
190
        const auto& result = results.back();
2777
2778
190
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
190
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
190
        if ( options.disableTests == false ) {
2796
190
            tests::test(op, result.second);
2797
190
        }
2798
2799
190
        postprocess(module, op, result);
2800
190
    }
2801
2802
167
    if ( options.noCompare == false ) {
2803
64
        compare(operations, results, data, size);
2804
64
    }
2805
167
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
197
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
197
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
197
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.05k
    do {
2691
2.05k
        auto op = getOp(&parentDs, data, size);
2692
2.05k
        auto module = getModule(parentDs);
2693
2.05k
        if ( module == nullptr ) {
2694
1.73k
            continue;
2695
1.73k
        }
2696
2697
324
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
324
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
7
            break;
2702
7
        }
2703
2.05k
    } while ( parentDs.Get<bool>() == true );
2704
2705
197
    if ( operations.empty() == true ) {
2706
5
        return;
2707
5
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
192
#if 1
2711
192
    {
2712
192
        std::set<uint64_t> moduleIDs;
2713
192
        for (const auto& m : modules ) {
2714
130
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
130
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
130
            moduleIDs.insert(moduleID);
2722
130
        }
2723
2724
192
        std::set<uint64_t> operationModuleIDs;
2725
192
        for (const auto& op : operations) {
2726
179
            operationModuleIDs.insert(op.first->ID);
2727
179
        }
2728
2729
192
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
192
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
192
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
192
        for (const auto& id : addModuleIDs) {
2734
53
            operations.push_back({ modules.at(id), operations[0].second});
2735
53
        }
2736
192
    }
2737
192
#endif
2738
2739
192
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
192
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
424
    for (size_t i = 0; i < operations.size(); i++) {
2747
232
        auto& operation = operations[i];
2748
2749
232
        auto& module = operation.first;
2750
232
        auto& op = operation.second;
2751
2752
232
        if ( i > 0 ) {
2753
167
            auto& prevModule = operations[i-1].first;
2754
167
            auto& prevOp = operations[i].second;
2755
2756
167
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
95
                auto& curModifier = op.modifier.GetVectorPtr();
2758
95
                if ( curModifier.size() == 0 ) {
2759
35.9k
                    for (size_t j = 0; j < 512; j++) {
2760
35.8k
                        curModifier.push_back(1);
2761
35.8k
                    }
2762
70
                } else {
2763
305
                    for (auto& c : curModifier) {
2764
305
                        c++;
2765
305
                    }
2766
25
                }
2767
95
            }
2768
167
        }
2769
2770
232
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
232
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
232
        const auto& result = results.back();
2777
2778
232
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
232
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
232
        if ( options.disableTests == false ) {
2796
232
            tests::test(op, result.second);
2797
232
        }
2798
2799
232
        postprocess(module, op, result);
2800
232
    }
2801
2802
192
    if ( options.noCompare == false ) {
2803
65
        compare(operations, results, data, size);
2804
65
    }
2805
192
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
176
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
176
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
176
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
1.69k
    do {
2691
1.69k
        auto op = getOp(&parentDs, data, size);
2692
1.69k
        auto module = getModule(parentDs);
2693
1.69k
        if ( module == nullptr ) {
2694
1.50k
            continue;
2695
1.50k
        }
2696
2697
183
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
183
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
5
            break;
2702
5
        }
2703
1.68k
    } while ( parentDs.Get<bool>() == true );
2704
2705
176
    if ( operations.empty() == true ) {
2706
2
        return;
2707
2
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
174
#if 1
2711
174
    {
2712
174
        std::set<uint64_t> moduleIDs;
2713
174
        for (const auto& m : modules ) {
2714
70
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
70
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
70
            moduleIDs.insert(moduleID);
2722
70
        }
2723
2724
174
        std::set<uint64_t> operationModuleIDs;
2725
174
        for (const auto& op : operations) {
2726
101
            operationModuleIDs.insert(op.first->ID);
2727
101
        }
2728
2729
174
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
174
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
174
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
174
        for (const auto& id : addModuleIDs) {
2734
23
            operations.push_back({ modules.at(id), operations[0].second});
2735
23
        }
2736
174
    }
2737
174
#endif
2738
2739
174
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
174
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
298
    for (size_t i = 0; i < operations.size(); i++) {
2747
124
        auto& operation = operations[i];
2748
2749
124
        auto& module = operation.first;
2750
124
        auto& op = operation.second;
2751
2752
124
        if ( i > 0 ) {
2753
89
            auto& prevModule = operations[i-1].first;
2754
89
            auto& prevOp = operations[i].second;
2755
2756
89
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
46
                auto& curModifier = op.modifier.GetVectorPtr();
2758
46
                if ( curModifier.size() == 0 ) {
2759
13.8k
                    for (size_t j = 0; j < 512; j++) {
2760
13.8k
                        curModifier.push_back(1);
2761
13.8k
                    }
2762
27
                } else {
2763
244
                    for (auto& c : curModifier) {
2764
244
                        c++;
2765
244
                    }
2766
19
                }
2767
46
            }
2768
89
        }
2769
2770
124
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
124
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
124
        const auto& result = results.back();
2777
2778
124
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
124
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
124
        if ( options.disableTests == false ) {
2796
124
            tests::test(op, result.second);
2797
124
        }
2798
2799
124
        postprocess(module, op, result);
2800
124
    }
2801
2802
174
    if ( options.noCompare == false ) {
2803
35
        compare(operations, results, data, size);
2804
35
    }
2805
174
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2685
165
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2686
165
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2687
2688
165
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2689
2690
2.59k
    do {
2691
2.59k
        auto op = getOp(&parentDs, data, size);
2692
2.59k
        auto module = getModule(parentDs);
2693
2.59k
        if ( module == nullptr ) {
2694
2.33k
            continue;
2695
2.33k
        }
2696
2697
252
        operations.push_back( {module, op} );
2698
2699
        /* Limit number of operations per run to prevent time-outs */
2700
252
        if ( operations.size() == OperationType::MaxOperations() ) {
2701
6
            break;
2702
6
        }
2703
2.58k
    } while ( parentDs.Get<bool>() == true );
2704
2705
165
    if ( operations.empty() == true ) {
2706
4
        return;
2707
4
    }
2708
2709
    /* Enable this to run every operation on every loaded module */
2710
161
#if 1
2711
161
    {
2712
161
        std::set<uint64_t> moduleIDs;
2713
161
        for (const auto& m : modules ) {
2714
74
            const auto moduleID = m.first;
2715
2716
            /* Skip if this is a disabled module */
2717
74
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2718
0
                continue;
2719
0
            }
2720
2721
74
            moduleIDs.insert(moduleID);
2722
74
        }
2723
2724
161
        std::set<uint64_t> operationModuleIDs;
2725
161
        for (const auto& op : operations) {
2726
109
            operationModuleIDs.insert(op.first->ID);
2727
109
        }
2728
2729
161
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2730
161
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2731
161
        addModuleIDs.resize(it - addModuleIDs.begin());
2732
2733
161
        for (const auto& id : addModuleIDs) {
2734
26
            operations.push_back({ modules.at(id), operations[0].second});
2735
26
        }
2736
161
    }
2737
161
#endif
2738
2739
161
    if ( operations.size() < options.minModules ) {
2740
0
        return;
2741
0
    }
2742
2743
161
    if ( options.debug == true && !operations.empty() ) {
2744
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2745
0
    }
2746
296
    for (size_t i = 0; i < operations.size(); i++) {
2747
135
        auto& operation = operations[i];
2748
2749
135
        auto& module = operation.first;
2750
135
        auto& op = operation.second;
2751
2752
135
        if ( i > 0 ) {
2753
98
            auto& prevModule = operations[i-1].first;
2754
98
            auto& prevOp = operations[i].second;
2755
2756
98
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2757
55
                auto& curModifier = op.modifier.GetVectorPtr();
2758
55
                if ( curModifier.size() == 0 ) {
2759
14.3k
                    for (size_t j = 0; j < 512; j++) {
2760
14.3k
                        curModifier.push_back(1);
2761
14.3k
                    }
2762
28
                } else {
2763
226
                    for (auto& c : curModifier) {
2764
226
                        c++;
2765
226
                    }
2766
27
                }
2767
55
            }
2768
98
        }
2769
2770
135
        if ( options.debug == true ) {
2771
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2772
0
        }
2773
2774
135
        results.push_back( {module, std::move(callModule(module, op))} );
2775
2776
135
        const auto& result = results.back();
2777
2778
135
        if ( result.second != std::nullopt ) {
2779
0
            if ( options.jsonDumpFP != std::nullopt ) {
2780
0
                nlohmann::json j;
2781
0
                j["operation"] = op.ToJSON();
2782
0
                j["result"] = util::ToJSON(*result.second);
2783
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2784
0
            }
2785
0
        }
2786
2787
135
        if ( options.debug == true ) {
2788
0
            printf("Module %s result:\n\n%s\n\n",
2789
0
                    result.first->name.c_str(),
2790
0
                    result.second == std::nullopt ?
2791
0
                        "(empty)" :
2792
0
                        util::ToString(*result.second).c_str());
2793
0
        }
2794
2795
135
        if ( options.disableTests == false ) {
2796
135
            tests::test(op, result.second);
2797
135
        }
2798
2799
135
        postprocess(module, op, result);
2800
135
    }
2801
2802
161
    if ( options.noCompare == false ) {
2803
37
        compare(operations, results, data, size);
2804
37
    }
2805
161
}
2806
2807
/* Explicit template instantiation */
2808
template class ExecutorBase<component::Digest, operation::Digest>;
2809
template class ExecutorBase<component::MAC, operation::HMAC>;
2810
template class ExecutorBase<component::MAC, operation::UMAC>;
2811
template class ExecutorBase<component::MAC, operation::CMAC>;
2812
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2813
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2814
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2815
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2816
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2817
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2818
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2819
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2820
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2821
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2822
template class ExecutorBase<component::Key, operation::KDF_X963>;
2823
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2824
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2825
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2826
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2827
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2828
template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>;
2829
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2830
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2831
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2832
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2833
template class ExecutorBase<bool, operation::ECCSI_Verify>;
2834
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2835
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2836
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2837
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2838
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2839
template class ExecutorBase<bool, operation::DSA_Verify>;
2840
template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>;
2841
template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>;
2842
template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>;
2843
template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>;
2844
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2845
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2846
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2847
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2848
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>;
2849
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2850
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2851
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2852
template class ExecutorBase<bool, operation::ECC_Point_Cmp>;
2853
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2854
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2855
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2856
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2857
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2858
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2859
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2860
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2861
template class ExecutorBase<bool, operation::BLS_Verify>;
2862
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2863
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2864
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2865
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2866
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2867
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2868
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2869
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2870
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2871
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2872
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2873
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2874
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2875
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2876
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2877
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2878
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2879
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2880
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2881
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2882
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2883
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2884
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2885
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2886
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2887
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2888
template class ExecutorBase<component::G1, operation::BLS_G1_MultiExp>;
2889
template class ExecutorBase<Buffer, operation::Misc>;
2890
template class ExecutorBase<bool, operation::SR25519_Verify>;
2891
2892
} /* namespace cryptofuzz */